Skip to main content

assemble_polylines

Function assemble_polylines 

Source
pub fn assemble_polylines(
    segments: &[IntersectionSegment],
) -> GeomResult<Vec<Polyline>>
Expand description

Stitch segments into maximal connected polylines.

Pure integer graph traversal: nodes are symbolic names, so joining two segments is an equality test rather than a distance comparison. No tolerance is involved at any point.

ยงErrors

Refuses a node of degree three or more. On a clean pair of closed surfaces the intersection curve is a 1-manifold, so every node has one or two neighbours; a branch means the input is self-intersecting or non-manifold, and continuing would silently pick one arbitrary path.