Repository navigation
General view: nest packages in their owner frame and draw cross-package edges - #98
Conversation
…the General view (closes #87) Bump DemaConsulting.Rendering.* to 0.3.0-beta.2. GeneralViewLayoutStrategy now builds package folders parent-first so a nested package is drawn inside its owner's folder (including enclosing folders with no direct items), declares every model edge in the lowest common ancestor scope so cross-package edges are routed to the actual endpoint boxes, counts package nesting in the depth limit, and pairs truncation labels with boxes by node identity instead of box order. Adds gallery example 11 and refreshes the stale gallery images; updates requirements, design, verification, user guide, and ROADMAP. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…o not cross (closes #87) The layered engine places a package folder's contents without knowing where the folder's relationships to the outside lead, and stacks unconnected groups by insertion order, so declaration order could force connector crossings (Hybrid declared after Chassis in the nested-package gallery model). GeneralViewLayoutStrategy now lays out once, orders each folder's items by the mean vertical center of the boxes their external relationships lead to (barycenter, one refinement pass, no-op when no order changes), and lays out again. The nested-package gallery image is re-rendered: Hybrid sits above Chassis, no connectors cross or run in parallel. The 13 px spacing of the two arrowheads at Engine's west face is an engine fallback and is documented as such. Adds the ExternalEdgeOrdering requirement and an OTS requirement pinning the engine's insertion-order behavior, with tests, design and verification updates. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🟡 Changes recommended
Two active findings remain in GeneralViewLayoutStrategy: nested-package relationships can be misclassified for ordering, and child-scope graphs may merge distinct parallel relationships, risking incorrect layout and lost connectors.
2 open issues
What changed in this PR
This pull request updates the General View layout to preserve nested package hierarchy and render relationships between definitions across package boundaries. It upgrades the DemaConsulting.Rendering dependencies to 0.3.0-beta.2 and adds corresponding tests, requirements, documentation, and gallery examples.
Changes:
- Nests package folders and scopes cross-package edges to their lowest common layout container.
- Adds package-aware depth truncation, truncation labeling, and external-edge ordering.
- Updates rendering dependencies, verification materials, user documentation, requirements traceability, and gallery assets.
| File | Description |
|---|---|
| test/DemaConsulting.SysML2Tools.Tests/Layout/GeneralViewLayoutStrategyTests.cs | Adds regression coverage for nested packages, cross-package edges, truncation, ordering, and gallery behavior. |
| test/DemaConsulting.SysML2Tools.Tests/DemaConsulting.SysML2Tools.Tests.csproj | Updates the test renderer package references to DemaConsulting.Rendering 0.3.0-beta.2. |
| src/DemaConsulting.SysML2Tools.Tool/DemaConsulting.SysML2Tools.Tool.csproj | Updates the tool's SVG and CanvasNet renderer package references to 0.3.0-beta.2. |
| src/DemaConsulting.SysML2Tools.Core/Layout/Internal/GeneralViewLayoutStrategy.cs | Implements nested package folders, lowest-common-scope edge routing, package-aware truncation, and external-edge ordering. |
| src/DemaConsulting.SysML2Tools.Core/DemaConsulting.SysML2Tools.Core.csproj | Updates the core rendering dependency to DemaConsulting.Rendering 0.3.0-beta.2. |
| ROADMAP.md | Records that the updated rendering engine enables cross-hierarchy edge support and future interconnection-view work. |
| docs/verification/sysml2-tools-core/layout/internal/general-view-layout-strategy.md | Documents verification criteria and scenarios for nested packages, cross-package edges, truncation, and ordering. |
| docs/verification/ots/dema-rendering.md | Documents the rendering-engine behavior required for cross-hierarchy routing and insertion ordering. |
| docs/user_guide/introduction.md | Explains nested package rendering, cross-package connectors, and package-aware depth limits. |
| docs/reqstream/sysml2-tools-core/layout/internal/general-view-layout-strategy.yaml | Adds requirements covering nested folders, cross-container edges, ordering, and truncation decoration. |
| docs/reqstream/sysml2-tools-core/layout/internal.yaml | Includes the revised General View requirements in the internal layout requirement set. |
| docs/reqstream/quality.yaml | Adds the rendering-engine requirements to quality traceability. |
| docs/reqstream/ots/dema-rendering.yaml | Defines OTS requirements for cross-hierarchy routing and component insertion order. |
| docs/gallery/svg/VehiclePackagesGeneralView.svg | Adds the rendered nested-package vehicle diagram with cross-package connectors. |
| docs/gallery/svg/MissionControlGeneralView.svg | Refreshes the MissionControl General View diagram with nested package folders. |
| docs/gallery/svg/GroundSegmentRecursiveView.svg | Refreshes the recursive GroundSegment gallery rendering. |
| docs/gallery/svg/GroundSegmentDirectChildrenView.svg | Refreshes the direct-children GroundSegment gallery rendering. |
| docs/gallery/README.md | Documents the updated package rendering behavior and adds the nested-package gallery example. |
| docs/gallery/models/11-nested-packages-general.sysml | Adds a model demonstrating nested packages and relationships across package boundaries. |
| docs/design/sysml2-tools-core/layout/internal/general-view-layout-strategy.md | Documents the revised package planning, edge scoping, truncation, and ordering design. |
Review effort: Lite
…rdering with tests; clarify ExternalAnchor scope docs Review follow-up for two Copilot comments: (1) MergeParallelEdges - it is set on the root graph and cascades to every nested package-folder and definition-container scope, now pinned by two tests; (2) ComputeItemOrder external-partner ordering for a definition whose partners are in sibling nested packages - pinned by a test, ExternalAnchor docs corrected. Neither reproduced as a defect, so no behavior change. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🔵 Needs a closer look
The change relies on beta.2 cross-hierarchy routing, insertion-order behavior, and a geometry-dependent two-pass heuristic alongside unresolved engine issues, so runtime visual validation is still required.
No open issues 🎉
2 resolved since last review
Review effort: Lite


Pull Request
Description
Makes the General view draw nested packages inside their owning package frame (SysML v2 §8.2.3.5 / Table 3) and draw edges between elements in different package frames. It also updates the layout engine to
DemaConsulting.Rendering0.3.0-beta.2, which adds cross-hierarchy edge support (demaconsulting/Rendering#47).DemaConsulting.Rendering.*references move from 0.3.0-beta.1 to 0.3.0-beta.2.GeneralViewLayoutStrategy:--walk-depthtruncation counts package nesting. Truncation labels are matched per scope rather than by engine box order.11-nested-packages-general.sysml(README section 11).What you get now
New example: nested packages with cross-package edges. Before, Powertrain, Body and Vehicle were drawn as three unrelated frames and every relationship between them was missing. After, Body and Powertrain sit inside Vehicle, and Hybrid→Engine (specialization), Engine→Car and Chassis→Car (part membership) are drawn between the actual elements.
Existing MissionControl view.
RadioNetworkis declared insideGroundSegment, but before it was drawn as a sibling frame. It is now drawn insideGroundSegment, and everything sits insideMissionControl.Type of Change
Related Issues
Closes #87
Pre-Submission Checklist
Before submitting this pull request, ensure you have completed the following:
Build and Test
pwsh ./build.ps1. Passed: 3237 tests, 0 failed.Code Quality
Quality Checks
pwsh ./lint.ps1. Passed (exit 0).Testing
Documentation
Additional Notes
GroundSegment*gallery images were refreshed because the committed copies were stale relative tomain.