Skip to main content

Module shared_edge

Module shared_edge 

Source
Expand description

Shared edge detection and collinear contact classification. Ported from polygon.move::has_exact_shared_edge, edges_match_exactly, segments_contact, and shared_edge_relation.

Used for topology validation (parts must connect via shared edges, not just vertices, and partial collinear contact is rejected as a T-junction).

Enums§

ContactKind
Classification of how two polygon parts touch along their boundaries.

Functions§

classify_contact
Classify the contact between two polygon parts.
has_exact_shared_edge
True if polygon A and polygon B share at least one exact edge. An “exact shared edge” is an edge (v_i, v_{i+1}) that appears in both polygons, possibly in reverse order.
segments_contact
True if two line segments are collinear and overlap along a non-degenerate interval. Contact means: parallel, collinear, and 1D intervals strictly overlap. Touching at a single endpoint is NOT contact (strict overlap required).