Optimizing Mesh Booleans by Being Lazy (System Description)
摘要
Mesh Boolean operations (union, difference, intersection) enable the combination of simpler shapes into complex forms, and are essential in modeling software such as OpenSCAD, a popular functional programming language in the Maker community. Although these operations are intuitive to users, existing implementations often suffer from performance or robustness issues. Manifold is a new open source library designed for robust and efficient mesh Boolean operations. It is up to hundreds of times faster than traditional methods using exact arithmetic, and more robust than conventional float-based techniques. In this paper, we describe a crucial design decision that enabled this level of performance while maintaining a simple user-facing API: implementing a functional and lazy API design, coupled with expression tree rewriting before evaluation. Manifold has recently been integrated into projects such as OpenSCAD (nightly builds), Blender, and has bindings for various languages.