Module arrangement

Module arrangement 

Source
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.
MultiArrangement
The conforming arrangement of n operand meshes over one shared interner. subtris[k] is mesh k’s conforming sub-triangles; there is no separate owner/index table — a sub-triangle’s originating mesh is simply its position k in subtris.

Enums§

BoolOp
Boolean operation.

Functions§

arrange
Compute the conforming arrangement of operand meshes a and b.
arrange_many
Conforming arrangement of meshes (N operands) over ONE interner.
boolean
Compute the boolean op of operand meshes a and b, 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) shape union_all already returns for the N-ary union. boolean() computes this exact arrangement and discards the signal on purpose (its graceful degrade when unrecovered > 0 is intentional; see its doc comment, and contrast difference_all’s hard reject). This function changes no behaviour — it is an observation-only companion for callers (tests, diagnostics) that want to inspect the signal boolean() throws away, without altering boolean()’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_all but 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 same changed bit difference_all returns.
difference_all_lenient_with_conformity
difference_all_lenient plus whether the arrangement CONFORMED (unrecovered == 0). A non-conforming changed == false is not proof that no cutter reaches a: straddling sub-triangles can be misclassified (#5362 review), so a caller must not read it as “disjoint”.
union_all
∪ meshes as a watertight triangle list — the N-ary union.

Type Aliases§

Tri