Accessing Poly_Triangulation for Shape after BRepMesh_IncrementalMesh

I am migrating from an older version to 7.4.0. My prior version code loads a TopoDS_Shape from STEP, performs BRepMesh_IncrementalMesh and then used STLMesh to iterate over triangles, mapping g_Pnts and implied edges into an adjacency graph.

I can understand how to do this mapping with a Poly_Triangulation object. However, I can't seem to find anywhere in the documentation how to get the Poly_Triangulation handle of the TopoDS_Shape to get the process started.

What am I missing?

Forum supervisor's picture

Hello James,

Poly_Triangulation objects are stored in TopoDS_Face objects that are nodes of the complete graph of topological entities that describes TopoDS_Shape object.

So you need to extract faces from your shape and retrieve triangulation from each of them.

If you wish to use our professional assistance in your development, please, consider our support services.

For further information and advice, please, do not hesitate to contact us!

Best regards,

Forum supervisor