Comparing 3D Boolean Libraries

In computational geometry and CAD modeling, 3D boolean operations streamline crucial processes across various industries. These operations rapidly combine, subtract, or intersect geometric shapes, essential for tasks like rapid prototyping in product design, medical device development, or even in creating intricate sculptures. Efficiency and accuracy are paramount in these applications.

In this article, we’ll compare the performance of different 3D boolean libraries under various scenarios to help you make an informed decision.

Popular open-source Mesh boolean libraries​

Meshlib 2.4.0.85
MCut
Manifold
CinoLib + RobustMesh
CGAL
Libigl
Trimesh-Manifold
Trimesh-Blender
License
Licensing options
LGPL 3/Paid support
Apache 2.0
MIT
Open-Source / Commercial
GPL 3, MPL 2
MIT
MIT

We selected these open-source libraries for their popularity, industry usage, and ease of reproducibility on different testing machines. Their open nature ensures transparency and allows others to replicate our results. Covering a diverse range of functionalities, these libraries are widely used and relevant for comparison. Our aim is to provide valuable insights for developers and researchers seeking the best solution for their needs.

Testing Setup – Windows 11, Intel Core i7-12700H processor, 32GB of RAM, NVIDIA RTX 3060m with 6GB of VRAM

For access to input and result meshes used in our tests, visit this link.

3D Boolean Comparison Results

Nefertiti Case

This scenario involves large meshes (2M Triangles each) with complex topology, representing a common challenge in 3D boolean operations.

Mashlib% filename%

Union

Meshes were slightly shifted.

Mashlib% filename%

Intersection

Meshes were slightly shifted.

Mashlib% filename%

Difference A-B

Meshes were slightly shifted.

Mashlib% filename%

Union with Noise

Two almost identical meshes, with the second having some noise. 

 

Meshlib 2.4.0.85
MCut
Manifold
CinoLib + RobustMesh
CGAL
Libigl
Trimesh-Manifold
Trimesh-Blender
Nefertity – Union
1.2 (1.4)
59
1.3 (2.8)
6.1
7.5
40.6
3.6
3.4
Nefertity – Intersection
0.7 (0.9)
46
1.0 (2.5)
8.1
6.7
43.6
2.9
36
Nefertity – Difference
0.9 (1.1)
47
1.1 (2.6)
6.2
7
41.4
3.1
30

Annotations

  • All the results are in Seconds.
  • Red numbers: Indicate that the operation was performed, but the result is incorrect.
  • (Numbers in braces): Denote necessary geometric computations that should be performed once.
  • N/D: Stands for “No Data,” meaning it was not measured.

Dental Case

In this case, we simulate dental models (≈500K Triangles) with degeneracies and coinciding surfaces, reflecting real-world scenarios encountered in medical applications.

Mashlib% filename%

Union

Mashlib% filename%

Intersection

Mashlib% filename%

Difference A-B

Meshlib 2.4.0.85
MCut
Manifold
CinoLib + RobustMesh
CGAL
Libigl
Trimesh-Manifold
Trimesh-Blender
Dental – Union
0.18 (0.21)
Fail
0.24 (0.50)
0.7
1.6
5.2
0.6
6.3
Dental – Intersection
0.17 (0.20)
Fail
0.21 (0.52)
0.7
1.6
5.1
0.5
4.5
Dental – Difference A-B
0.20 (0.22)
Fail
0.25 (0.47)
0.7
1.7
5.1
0.5
5.4

Annotations

  • All the results are in Seconds.
  • Red numbers: Indicate that the operation was performed, but the result is incorrect.
  • (Numbers in braces): Denote necessary geometric computations that should be performed once.
  • Fail: Indicates that the library rejected to process the operation.

Simple Objects Case

In this case, we compare how algorithms behave when handling complex geometries.

Mashlib% filename%

Holed, Not Intersected

Boolean Union of meshes, one with a hole aside from the intersection part.

Mashlib% filename%

Holed Intersected

Boolean Union of meshes, one with a hole into the intersection part.

Mashlib% filename%

Self-Intersections​

Boolean Union of meshes, one with self-intersections into meshes’ intersection part.

Meshlib 2.4.0.85
MCut
Manifold
CinoLib + RobustMesh
CGAL
Libigl
Trimesh-Manifold
Trimesh-Blender
Holed, Not Intersected​
Yes
Yes
No
Yes
Yes
No
No
Yes
Holed, Intersected​
No*
No
No
Yes
No
No
No
Yes
Self-Intersections​
No**
No
Yes
Yes
No
Yes
Yes
Yes

Annotations

  • Yes – the operation is supported.
  • No – the operation is not supported.
  • Red: Indicate that the operation was performed, but the result is incorrect.

 

* MeshLib does not support the representation of non-manifold meshes and automatically converts them to a manifold form.
** The results of such operations are not well-defined, leading to a mesh with numerous inconsistencies, such as self-intersections and degeneracies.

Why choose MeshLib SDK for 3D boolean operations?

MeshLib leads in 3D processing, offering advanced 3D boolean operations, known for their speed and precision. As an open-source 3D geometry library, it supports both C++ and Python, offering versatility and easy integration into various projects. MeshLib’s recognition as the fastest tool for 3D boolean operations on the market accelerates project timelines, while its accuracy ensures the highest quality of 3D models. Besides MeshLib is based on robust algorithms and calculations you may learn more about here link. This combination of features makes MeshLib an essential resource for anyone looking to develop undertake sophisticated 3D modeling and application development. 

Play Video