Converting OCCT object to mesh ?

Hi,
I want to read a IGES file and convert it into mesh. I used IGESControl_Reader and got OCCT object using TopoDS_Shape sh = myIgesReader.OneShape();
How to convert it into mesh. I searched in forums an documentation but no success. Thanks in advance.

Alexey's picture

Hello! Are you need the triangulation of shape or the finite element mesh for simulations?

sahilagnihotri's picture

I need triangulation of shape. I was using a library which uses Mesh as input and output from Open cascade will be feed into that.

Shing Liu's picture

Hi saagn,

After use the BRepMesh::Mesh(aShape, theDeflection) you can get the triangulation of the shape by
Handle_Poly_Triangulation theTriangulation = BRep_Tool::Triangulation(aFace, theLocation);
for every face of the shape.

Shing Liu's picture

Hi saagn,

If you only use the mesh for visulization, you can use the function:
BRepMesh::Mesh(theShape, theDeflection);