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​

Library

Meshlib 2.4.0.85

MCut

Manifold

CinoLib + RobustMesh

CGAL

Libigl

Trimesh-Manifold

Trimesh-Blender

License

LGPL 3/Paid support

Apache 2.0

MIT

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.

Union

Meshes were slightly shifted.

Intersection

Meshes were slightly shifted.

Difference A-B

Meshes were slightly shifted.

 

Union with Noise

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

 

Library

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

34

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

Nefertity Noise Union

63

N/D

10

50

N/D

Hang

15.5

180

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.

Union

Intersection

Difference A-B

Library

Meshlib 2.4.0.85

MCut

Manifold

CinoLib + RobustMesh

CGAL

Libigl

Trimesh-Manifold

Trimesh-Blender

Dental - Union

0.18 (0.21)

N/A

0.24 (0.50)

0.7

1.6

5.2

0.6

6.3

Dental - Intersection

0.17 (0.20)

N/A

0.21 (0.52)

0.7

1.6

5.1

0.5

4.5

Dental - Difference A-B

0.20 (0.22)

N/A

0.25 (0.47)

0.7

1.7

5.1

0.6

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.
  • N/A: Indicates that the library rejected to process the operation.

Simple Objects Case

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

Holed Not Isec​

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

Holed Isec

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

Self Isec​

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

Library

Meshlib 2.4.0.85

MCut

Manifold

CinoLib + RobustMesh

CGAL

Libigl

Trimesh-Manifold

Trimesh-Blender

Holed Not Isec

Yes

Yes

No

Yes

Yes

No

No

Yes

Holed Isec

No

No

No

Yes

Yes

No

No

Yes

Self Isec

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 vs CGAL comparison table​

License

MeshLib

-

MCut

Commercial

Manifold

1.2 (1.4)

CinoLib + RobustMesh

7.5

CGAL

0.7 (0.9)

Libigl

6.7

Trimesh-Manifold

0.9 (1.1)

Trimesh-Blender

7

Nefertiti-U

MeshLib

1.2 (1.4)

MCut

59

Manifold

1.3 (2.8)

CinoLib + RobustMesh

6.1

CGAL

7.5

Libigl

40.6

Trimesh-Manifold

3.6

Trimesh-Blender

34

Nefertiti-I

MeshLib

0.7 (0.9)

MCut

46

Manifold

1.0 (2.5)

CinoLib + RobustMesh

8.1

CGAL

6.7

Libigl

43.6

Trimesh-Manifold

2.9

Trimesh-Blender

36

Nefertiti-Dif

MeshLib

0.9 (1.1)

MCut

47

Manifold

1.1(2.6)

CinoLib + RobustMesh

6.2

CGAL

7

Libigl

41.4

Trimesh-Manifold

3.1

Trimesh-Blender

30

Nefertity Noise U

MeshLib

63

MCut

N/D

Manifold

10

CinoLib + RobustMesh

50

CGAL

N/D

Libigl

Hang

Trimesh-Manifold

15.5

Trimesh-Blender

180

Degen U

MeshLib

0.18 (0.21)

MCut

N/A

Manifold

0.24 (0.50)

CinoLib + RobustMesh

0.7

CGAL

1.6

Libigl

5.2

Trimesh-Manifold

0.6

Trimesh-Blender

6.3

Degen I

MeshLib

0.17

MCut

N/A

Manifold

0.21 (0.52)

CinoLib + RobustMesh

0.7

CGAL

1.6

Libigl

5.1

Trimesh-Manifold

0.5

Trimesh-Blender

4.5

Degen Dif

MeshLib

0.20 (0.22)

MCut

N/A

Manifold

0.25 (0.47)

CinoLib + RobustMesh

0.7

CGAL

1.7

Libigl

5.1

Trimesh-Manifold

0.6

Trimesh-Blender

5.4

Holed Not Isec

MeshLib

YES

MCut

YES

Manifold

NO

CinoLib + RobustMesh

YES

CGAL

YES

Libigl

NO

Trimesh-Manifold

NO

Trimesh-Blender

YES

Holed Isec

MeshLib

NO

MCut

NO

Manifold

NO

CinoLib + RobustMesh

YES

CGAL

YES

Libigl

NO

Trimesh-Manifold

NO

Trimesh-Blender

YES

Self Isec

MeshLib

NO

MCut

NO

Manifold

YES

CinoLib + RobustMesh

YES

CGAL

NO

Libigl

YES

Trimesh-Manifold

YES

Trimesh-Blender

YES

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