diff --git a/Plant3D2026/P_Rec_Annot/docs/dcf-control-comparison.md b/Plant3D2026/P_Rec_Annot/docs/dcf-control-comparison.md index f7e44fd..2eb72c3 100644 --- a/Plant3D2026/P_Rec_Annot/docs/dcf-control-comparison.md +++ b/Plant3D2026/P_Rec_Annot/docs/dcf-control-comparison.md @@ -1,3 +1,26 @@ -# DCF control comparison +# CONTROL versus DryRun DCF comparison -`DBMOD` covers only the active DWG. DCF and project metadata require paired control and DryRun fixture copies created from one fully closed state. This comparison has not yet been executed, so plugin-only DCF and metadata deltas remain unverified. Apply remains blocked. +DBMOD covers only the active drawing. This procedure separately compares +content-bearing project files after identical CONTROL and DryRun sessions. + +1. With Plant 3D closed and the Launcher session `RolledBack`, copy the local + fixture to ``. +2. Create `` and `` from that same frozen + state; calculate complete local SHA-256 inventories before each run. +3. Open model and Ortho drawings in CONTROL through the same Launcher DryRun + launch contract, but invoke no P_Rec_Annot command. Close without saving, + wait for Launcher rollback, then calculate the after inventory. +4. Repeat with DRYRUN and invoke each supported command twice. Close without + saving, wait for rollback, then calculate the after inventory. +5. Compare deltas by logical relative path. Classify each content-bearing file + as `UNCHANGED`, `AUTODESK_BASELINE_CHANGE`, `PLUGIN_ONLY_CHANGE`, or + `INCONCLUSIVE`. + +Content-bearing groups include model DWG, Ortho DWG, `Piping.dcf`, remaining +DCF/database files, `Project.xml` or equivalent project metadata, and Ortho +metadata. Lock, cache, session, log, preview, and temporary files are reported +separately and cannot establish project invariance. + +Any `PLUGIN_ONLY_CHANGE` blocks Apply. Full paths and hashes remain local; +repository evidence contains only logical fixture markers, groups, counts, and +classifications. diff --git a/Plant3D2026/P_Rec_Annot/docs/ortho-viewport-membership.md b/Plant3D2026/P_Rec_Annot/docs/ortho-viewport-membership.md index 4d034c0..30d9fb4 100644 --- a/Plant3D2026/P_Rec_Annot/docs/ortho-viewport-membership.md +++ b/Plant3D2026/P_Rec_Annot/docs/ortho-viewport-membership.md @@ -1,5 +1,32 @@ # Ortho viewport membership -Every source snapshot has an explicit `ViewMembershipStatus`. The current Plant 3D 2026 adapter has no confirmed official object-to-view mapping API, so the seven source objects are `NotResolved` and skipped with `VIEW_MEMBERSHIP_NOT_RESOLVED`. Source presence is not treated as viewport membership. +## Runtime path -No geometric heuristic is used as an exact mapping. The next step requires a confirmed generated-entity linkage or documented view mapping. +`EntryPoint.RunDiagnostic` reads each `OrthoViewportInfo` and calls +`PlantObjectReader.ReadObjects`. The reader resolves source Piping rows, then +`PlantViewportMembershipReader.Read` evaluates the stored query for that exact +view. It maps `MdObjectId.PrjObjectId` to a source DataLinks row and assigns a +membership status to every independent `PlantObjectSnapshot`. + +| Status | Meaning | Diagnostic evidence | +| --- | --- | --- | +| `Resolved` | The source row was returned by the exact view query. | `VIEW_MEMBERSHIP_FROM_CONFIRMED_PNP_ID` | +| `ObjectOutsideView` | The source row was not returned by that confirmed query. | `VIEW_MEMBERSHIP_OBJECT_OUTSIDE_CLIP` | +| `NotResolved` | The view contract is unavailable, ambiguous, or failed. | `VIEW_MEMBERSHIP_API_UNSUPPORTED` | + +No source object is treated as visible solely because it belongs to the same +model drawing. No geometry-only result is upgraded to `Resolved`. + +## Plan effect + +`AnnotationPlanBuilder` includes membership status in its canonical plan input. +`ObjectOutsideView`, unsupported, and unresolved objects are `Skip` operations +with stable reason codes. `Resolved` membership can progress only through the +existing annotation rules; this DryRun slice never writes an annotation. + +## Runtime evidence still required + +The API contract and build/test coverage are complete, but the exact counts of +resolved and outside-view objects require the next Launcher Next DryRun on the +local Ortho fixture. The runtime report must record the command-pair PlanIds, +summary equality, DBMOD, and automatic rollback. diff --git a/Plant3D2026/P_Rec_Annot/docs/research/ortho-viewport-membership-api.md b/Plant3D2026/P_Rec_Annot/docs/research/ortho-viewport-membership-api.md new file mode 100644 index 0000000..39fe20c --- /dev/null +++ b/Plant3D2026/P_Rec_Annot/docs/research/ortho-viewport-membership-api.md @@ -0,0 +1,56 @@ +# Ortho viewport membership API + +## Scope + +This report records the Plant 3D 2026 contract used to map source-model +DataLinks objects to one Ortho view. Autodesk binaries were inspected in +`` and are not part of this repository. + +## Confirmed Plant 3D 2026 contract + +| Assembly | Version | Type/member | Purpose | +| --- | --- | --- | --- | +| `PnPDwg2dDef` | `0.0.0.0` | `IDwgViewDef.DwgQuery` | Returns the query stored by an Ortho view. | +| `PnPDwg2dDef` | `0.0.0.0` | `DwgQueryByBox.Execute(StringCollection, StringCollection)` | Executes the stored view selection and returns `IDwgSet`. | +| `PnPDwg2dDef` | `0.0.0.0` | `IDwgSet.GetItem(int, ref MdObjectId)` | Enumerates selected source identities. | +| `PnPDwg2dUtil` | `0.0.0.0` | `MdObjectId.PrjObjectId` | Exposes the selected project object identity. | +| `PnPDataLinks` | `17.0.60.1` | `DataLinksManager.FindAcPpRowId(PpObjectId)` | Maps a selected project object to its DataLinks row. | + +`DwgQueryByBox` also exposes `CoordinateSystem`, `XLength`, `YLength`, +`ZLength`, and `SelectionMask`. `DwgViewDef` exposes orientation, clipping, +and layout fields. They are not used as a heuristic in this slice because the +query result provides a stronger project-object identity. + +## Selected implementation + +`PlantViewportMembershipReader.Read` locates exactly one view by the stable +ID already generated from the sheet GUID and view name. It executes that +view's stored `DwgQuery`, converts every returned `MdObjectId.PrjObjectId` +through `DataLinksManager.FindAcPpRowId`, and intersects the result with the +source drawing's Piping rows. + +Matching rows receive `Resolved` with +`VIEW_MEMBERSHIP_FROM_CONFIRMED_PNP_ID`. Source rows absent from the confirmed +query result receive `ObjectOutsideView` with +`VIEW_MEMBERSHIP_OBJECT_OUTSIDE_CLIP`. An unsupported or ambiguous runtime +contract stays `NotResolved` with `VIEW_MEMBERSHIP_API_UNSUPPORTED`; the code +does not guess alternate Autodesk properties or select an arbitrary view. + +## Legacy analysis + +The read-only legacy source at +`\\phpsrv03\NBIM\code\CS\P_Rec_Annot\v1.0.4\repo` was available. Its +`UpdateOrthoDrawings/Commands.cs` configured `DwgQuery.ModelFiles` and called +`DwgQuery.Execute`; `OrthoAutoAnnotate/Commands.cs` and +`AutoAnnotateView/ViewPorts.cs` also used viewport and entity extents. Those +extents checks are a geometric filter, not an authoritative object identity, +so they were not ported as `Resolved` membership. + +## Side effects and failure handling + +The reader opens no Autodesk write transaction and calls no persistence API. +It does not modify DWG, DCF, or project metadata. `DLException` while mapping +an individual generated identity is ignored only for that non-Piping identity; +other failures yield the stable API diagnostic and preserve no false positive. +Runtime DryRun and paired control/DryRun hash comparison remain required to +verify actual no-write behavior.