kigumi performs regularized Boolean set operations on 3D regions defined by triangular boundary meshes. It is written in C++ and based on CGAL.
With kigumi, you can:
- Handle regions defined by open and/or non-manifold meshes.
- Handle regions composed of disjoint components.
- Handle special regions: the empty set and the universe.
- Apply multiple Boolean operators simultaneously.
- Attach custom data to mesh faces that propagate through Boolean operations.
- Save regions in a portable binary format.
For details of the API, check Region.h and Boolean_region_builder.h.
On Windows • On macOS • On Ubuntu
The following conditions must be satisfied so that Boolean operations work properly. If some are not met, the result is undefined (may emit warnings, crash, or fail silently).
- Boundary meshes must not have degenerate (zero-area) faces.
- Boundary meshes must not self-intersect, i.e., every pair of distinct faces must meet one of the following
conditions:
- They share an edge but do not intersect elsewhere.
- They share a vertex but do not intersect elsewhere.
- They do not intersect at all.
- Open boundary meshes must be clipped with a common convex region.
Additional notes:
- Faces that have more than three vertices are interpreted as triangle fans.
Note
The result of each Boolean operation is regularized, i.e., the interior and then the closure of the result is taken.
An enhanced version of the algorithm described in [1] is used.
- [1] Barki, H., Guennebaud, G., & Foufou, S. (2015). Exact, robust, and efficient regularized Booleans on general 3D meshes. Computers & Mathematics With Applications, 70(6), 1235–1254. https://doi.org/10.1016/j.camwa.2015.06.016