Fastest way to mesh large amount of planar faces


i have a performance problem with the OpenCASCADE Meshing algorithm. In my example i am showing lots of objects (10 thousands) which consist only of planar faces (they all have in most cases 4 edges).

The geometry of the surfaces is always GeomAbs_Plane and the geometry of edges is GeomAbs_Line.

The time needed to show such objects differs from 0.1 to (maximal for some cases) 1 second.

With that amount of objects i need 3 minutes to create the TopoDS_Shapes and more than 7 minutes to create the meshes.

I mesh the TopoDS_Shape objects with BRepMesh_IncrementalMesh lMesh(shape, 0.001);

I dont want to run the algorithm parallel, becuase the TopoDS_Shapes are already created in a parallel mode.

Any ideas or maybe hints what do i do wrong or how can i speed the process up?

Robert W.'s picture


Any ideas?

Cauchy Ding's picture

Hi Robert,

Since your shapes are created in parallel mode, why not tessellate them immediately at the same parallel pipeline. BRepMesh_IncrementalMesh is thread-safe. Just try it.

Another solution is to use Delaunay Triangulator. That's a public work by Jonathan Richard Shewchuk. Lots of companies and institutes use his code. But I am not sure whether it is thread-safe.


Robert W.'s picture

Hi Cauchy,

Sorry, i thought i wrote it a little bit more precisely, the shapes are also tesselated in the parallel process.

As for the Delaunay Triangulator, is there any implementation for OpenCascade? I was unable to find any.

Fernando Ghedin's picture

Not sure if it will fulfill your requirements, but I'd suggest you to take a look at Netgen - which is a mesher that can read geometries in BRep/STEP/IGES formats.

Additionally, you could contact OpenCASCADE SAS in order to evaluate their commercially available mesher toolkits (Express Mesh and Mesh Framework).