Module tritri

Module tritri 

Source
Expand description

Triangle–triangle intersection machinery — exact, predicate-driven.

Classifies a triangle against another’s plane (via exact orient3d) and constructs the edge∩plane intersection points as LPI implicit points. The full intersection segment (interval overlap along the planes’ crossing line) and the in-plane re-triangulation build on this.

Every intersection point is an LPI carried symbolically over the original input coordinates — never materialised — so downstream predicates stay exact and platform-deterministic.

Enums§

TriTri
Result of an exact triangle–triangle intersection test.

Functions§

crossing_lpis
For a Crosses { apex } triangle, the two LPI points where the apex’s two edges cross plane — the triangle’s interval endpoints on the crossing line.
edge_plane_lpi
The implicit point where edge a→b crosses the plane through plane.
tri_tri_intersection
Exact triangle–triangle intersection: the overlap of each triangle’s plane-interval along line L = [max(lo1,lo2), min(hi1,hi2)]. Handles clean crossings AND Touches (on-plane vertices/edges). Coplanar is deferred to coplanar.rs; a single shared point returns Point (no cut).