Skip to main content

Module intersection_graph

Module intersection_graph 

Source

Structs§

IntersectionGraph
Everything classification and assembly need.
Piece
One output fragment: a sub-triangle of an arranged input triangle, or an untouched whole triangle. v is wound to match the input mesh’s outward orientation; vi are the interned ids of the same three vertices.
VertInterner
Exact-point interner: one id per distinct point, with two disjoint key spaces. f64-representable points (all input vertices, and any constructed point that rounds exactly) key on their coordinate bits — no rational hashing, so untouched input triangles intern for the cost of a HashMap probe. Only genuinely non-representable constructed points use the rational map. verts_f64 caches the correctly rounded approximation of every id (exact for bit-keyed points), which downstream float filters and output assembly reuse instead of re-rounding.

Functions§

build_graph
Build the intersection graph for soups p and q (each triangle wound outward; degenerate triangles are dropped here, paper §5).
edge_key

Type Aliases§

EdgeKey
Canonical (sorted) edge between two interned vertex ids. Downstream stages (classify rings, propagate flood fill) key their maps on these integers instead of exact rational point pairs — vertex interning at piece-emission time makes id equality coincide with exact geometric identity.