feat: resolve Ortho views to source model drawings
This commit is contained in:
@@ -76,6 +76,62 @@ public sealed record PlantRuntimeContext
|
||||
public interface IPlantRuntimeContextReader { PlantRuntimeContext ReadCurrentContext(); }
|
||||
public interface IOrthoViewportReader { IReadOnlyList<OrthoViewportInfo> ReadViewports(CancellationToken cancellationToken); }
|
||||
|
||||
public enum SourceDrawingResolutionStatus { Resolved, NotReferenced, Ambiguous, MissingFromProject, Unsupported, Failed }
|
||||
|
||||
public sealed record OrthoSourceDrawingReference
|
||||
{
|
||||
public required string StableId { get; init; }
|
||||
public required string DisplayName { get; init; }
|
||||
public string? ProjectRelativePath { get; init; }
|
||||
public long? ProjectDrawingRowId { get; init; }
|
||||
public required SourceDrawingResolutionStatus Status { get; init; }
|
||||
public IReadOnlyList<string> EvidenceCodes { get; init; } = Array.Empty<string>();
|
||||
}
|
||||
|
||||
public sealed record SourcePlantObjectSnapshot
|
||||
{
|
||||
public required string StableObjectKey { get; init; }
|
||||
public required string ClassName { get; init; }
|
||||
public string? SourceDrawingStableId { get; init; }
|
||||
public string? LineGroupStableKey { get; init; }
|
||||
public IReadOnlyDictionary<string, string?> Properties { get; init; } = new Dictionary<string, string?>();
|
||||
}
|
||||
|
||||
public sealed record SourceDrawingReadResult
|
||||
{
|
||||
public required OrthoSourceDrawingReference Source { get; init; }
|
||||
public IReadOnlyList<SourcePlantObjectSnapshot> Objects { get; init; } = Array.Empty<SourcePlantObjectSnapshot>();
|
||||
public IReadOnlyList<RuntimeDiagnostic> Diagnostics { get; init; } = Array.Empty<RuntimeDiagnostic>();
|
||||
}
|
||||
|
||||
public interface IOrthoSourceDrawingResolver
|
||||
{
|
||||
IReadOnlyList<OrthoSourceDrawingReference> Resolve(OrthoDrawingSnapshot drawing);
|
||||
}
|
||||
|
||||
public sealed record OrthoDrawingSnapshot
|
||||
{
|
||||
public required string StableId { get; init; }
|
||||
public IReadOnlyList<OrthoViewSourceSnapshot> Views { get; init; } = Array.Empty<OrthoViewSourceSnapshot>();
|
||||
}
|
||||
|
||||
public sealed record OrthoViewSourceSnapshot
|
||||
{
|
||||
public required string ViewStableId { get; init; }
|
||||
public IReadOnlyList<string> ReferencedDrawingPaths { get; init; } = Array.Empty<string>();
|
||||
}
|
||||
|
||||
public interface ISourceDrawingDataLinksReader
|
||||
{
|
||||
SourceDrawingReadResult Read(PlantProjectContext project, OrthoSourceDrawingReference source);
|
||||
}
|
||||
|
||||
public sealed record PlantProjectContext
|
||||
{
|
||||
public required string StableProjectId { get; init; }
|
||||
public string? ProjectDisplayName { get; init; }
|
||||
}
|
||||
|
||||
public enum AnnotationOperationKind { Create, Update, Skip, Conflict, Unsupported }
|
||||
|
||||
public sealed record AnnotationOperationPlan
|
||||
|
||||
Reference in New Issue
Block a user