Expand description
Mesh boolean operations: union, intersection, and difference
Implements CSG (Constructive Solid Geometry) using a BSP-tree approach.
Each closed TriangleMesh is converted into a set of Polygons, which are
inserted into a BSP tree. The classic three-step clip/invert/build sequences
then produce the desired solid.
Limitations
- Meshes must be closed (watertight) and have outward-facing normals.
- Very thin or near-degenerate triangles may be dropped (area <
EPSILON²). - Shared planar faces are handled via coplanar classification but exact floating-point coincidence can produce small artefacts at seam edges.
Enums§
- Boolean
Op - Which boolean operation to perform.
Functions§
- mesh_
boolean - Perform a mesh boolean operation on two closed triangle meshes.
- mesh_
difference - Compute the boolean difference of two closed triangle meshes (A minus B).
- mesh_
intersection - Compute the boolean intersection of two closed triangle meshes.
- mesh_
union - Compute the boolean union of two closed triangle meshes.