Structs§
- Intersection
Graph - Everything classification and assembly need.
- Piece
- One output fragment: a sub-triangle of an arranged input triangle, or an
untouched whole triangle.
vis wound to match the input mesh’s outward orientation;viare the interned ids of the same three vertices. - Vert
Interner - 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_f64caches the correctly rounded approximation of every id (exact for bit-keyed points), which downstream float filters and output assembly reuse instead of re-rounding. Order invariance: both maps are probe-only (get/entry, never iterated); ids come fromverts.len()at insertion time, so they depend only on the sequential call order, not on the hasher.
Functions§
- build_
graph - Build the intersection graph for soups
pandq(each triangle wound outward; degenerate triangles are dropped here, paper §5). - build_
graph_ with_ progress build_graph_with_tokenthat also reports its five phases toprogress(seecrate::progress).Noneis exactlybuild_graph_with_token: no counter is touched and no branch is taken inside any inner loop.- build_
graph_ with_ token build_graphwith cooperative cancellation. ReturnsNonewhen the token fires. Checks run per triangle in every phase and inside the arrangement sweeps — heavily self-intersecting inputs spend minutes in per-triangle quadratic loops, and a cancel that only top-level phases notice can overshoot its deadline by that much (Thingi10K #42211 ran 565 s past a 60 s cancel before this plumbing).- 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.