NGD & rendering
Normalized Geometry Document (NGD) is the engine’s consumer-independent output. It contains a canvas, an ordered element list, and explicit paint layers.
flowchart LR NGD["NGD"] --> Group["NgdGroup"] NGD --> Edge["NgdEdge"] NGD --> Node["NgdNode"] NGD --> Vector["NgdVector<br/>typed primitives"] NGD --> Label["NgdLabel"] Group --> Renderer["renderSvg()"] Edge --> Renderer Node --> Renderer Vector --> Renderer Label --> Renderer Renderer --> SVG["layered SVG"]
Resolved means resolved
Section titled “Resolved means resolved”NGD carries node rectangles, route points, perimeter anchors, measured text boxes and baselines, group-label chips, decoration primitives, semantic paint roles, and canvas dimensions. It never carries raw SVG or product-specific artwork.
renderSvg() owns only the SVG shell and layer ordering. Element serializers
own the documented shape vocabulary. The renderer cannot remeasure, resize,
route, or nudge.
Structured decorations
Section titled “Structured decorations”Sequence lifelines, activation bars, rack breaks, and legends use typed path, rectangle, circle, and text primitives. Paints remain semantic tokens until the harness skin resolves them. Their explicit layer decides whether they appear with groups, edges, nodes, or labels.