Skip to main content

Module mesh_boolean

Module mesh_boolean 

Source
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§

BooleanOp
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.