pub fn sketch_display_payload(
profile: Option<&SketchProfile>,
segments: &[(String, Vec<NurbsCurve>)],
) -> DisplaySolidPayloadExpand description
Native display payload for a whole committed SKETCH: its profile SHEET (when the sketch closes a region) PLUS every model SEGMENT the sheet does not already draw.
sketch_profile_display_payload draws a sketch through its closed profile,
and that is the only display a committed sketch had. A sketch that closes
NOTHING — one line, an open chain, a trajectory drawn alongside a closed loop —
publishes no profile at all, so it was handed to the sheet builder as None
and drew nothing: invisible in 3D, and unpickable there (the 2026-09-02 report,
“Sketch with single edge not visible in 3D”). Its geometry was never missing,
only unaccepted — the SKETCH feature already publishes one world curve per
model segment under {sketchId}:G{gid}, which is exactly what segments
carries here.
Each such segment draws as one NAMED edge (the same name a downstream
reference_selection stores, so picking the drawn line resolves) with its
endpoints as vertices. A segment whose name the sheet already drew is SKIPPED,
so a closed sketch draws each boundary edge exactly once and a mixed sketch
draws its loop and its open chain side by side. Endpoints are deduped against
the points already drawn — consecutive segments of one chain share a junction.
Like its sheet sibling this registers no solid: the payload is synthesized directly from the profile and the curves.