Expand description
Mesh arrangement — the conforming intersection of two operand meshes.
For every pair of triangles (one per operand) that cross, the intersection segment becomes a constraint for BOTH triangles (it lies on both planes), and each crossed triangle is re-triangulated with its accumulated constraints. All re-triangulations share ONE interner, so a vertex created on the intersection of A’s triangle and B’s triangle gets the SAME symbolic Vid in both surfaces — i.e. the two operands’ meshes CONFORM along the intersection. The result is a single intersection-free complex, ready for L4 winding classification.
Broadphase is a hand-rolled AABB BVH (super::broadphase) that filters
candidate triangle pairs before the exact per-pair tri_tri_intersection
test; that test itself resolves both the proper-crossing Segment case and
the on-plane-vertex/edge Touches degeneracies (folded into Segment/
Chord, see tritri::PlaneInterval). Coplanar overlaps are handled
separately via coplanar_clip and accumulated alongside the segment
constraints before re-triangulation.
Structs§
- Arrangement
- The conforming arrangement of two operand meshes over a shared interner.
- Multi
Arrangement - The conforming arrangement of
noperand meshes over one shared interner.subtris[k]is meshk’s conforming sub-triangles; there is no separate owner/index table — a sub-triangle’s originating mesh is simply its positionkinsubtris.
Enums§
- BoolOp
- Boolean operation.
Functions§
- arrange
- Compute the conforming arrangement of operand meshes
aandb. - arrange_
many - Conforming arrangement of
meshes(N operands) over ONE interner. - boolean
- Compute the boolean
opof operand meshesaandb, materialised to f64 triangles.A−B = (A outside B) ∪ flip(B inside A);A∪B = (A outside B) ∪ (B outside A);A∩B = (A inside B) ∪ (B inside A). - boolean_
manifest - Cross-platform full-boolean determinism manifest:
cube[0,2]³ − cube[1,3]³. - boolean_
topology_ hash - Topology fingerprint of a boolean result: each oriented Vid triangle rotated min-first (canonical start vertex, winding preserved), the list sorted, FNV-1a-hashed. Platform-stable — Vids are deterministic symbolic identities and the ray-cast classification is FMA-free f64.
- boolean_
with_ conformity - Like
boolean, but also returns whether the underlying pairwise arrangement was CONFORMING (Arrangement::unrecovered == 0) — the same(result, conforming)shapeunion_allalready returns for the N-ary union.boolean()computes this exact arrangement and discards the signal on purpose (its graceful degrade whenunrecovered > 0is intentional; see its doc comment, and contrastdifference_all’s hard reject). This function changes no behaviour — it is an observation-only companion for callers (tests, diagnostics) that want to inspect the signalboolean()throws away, without alteringboolean()’s own return type or any existing caller. - box_
mesh - Axis-aligned box
[lo,hi]as 12 outward-wound triangles. - cube_
mesh - Axis-aligned cube
[lo,hi]³. - difference_
all a − (∪ comps)for PAIRWISE-DISJOINT, per-component-closed, OUTWARD-wound cutter components, computed in ONE conforming arrangement (disjoint-cutter batching).- difference_
all_ lenient - Like
difference_allbut WITHOUT the conformity gate — returns the batched difference even when an unrecovered constraint leaves it non-conforming. The exact batched topology is cleaner than the sequential re-jitter on dense faceted-reveal walls (issue #098), but its centroid classification can over/under-cut volume, so the caller (subtract_many) VERIFIES the removed volume against a sequential reference before trusting it. The second element is the samechangedbitdifference_allreturns. - difference_
all_ lenient_ with_ conformity difference_all_lenientplus whether the arrangement CONFORMED (unrecovered == 0). A non-conformingchanged == falseis not proof that no cutter reachesa: straddling sub-triangles can be misclassified (#5362 review), so a caller must not read it as “disjoint”.- union_
all ∪ meshesas a watertight triangle list — the N-ary union.