I used Netgen for meshing a TopoDS_Shape. The resulting mesh is good enough for a FEM calculation.
Now I would like to store the surface mesh into the shape, fully replacing the stl mesh
generated by the BRepMesh_IncrementalMesh for visualization purposes (shaded view).
These are the steps::
1) clean the "automatic" triangulation using BRepTools::clean.
then, foreach face:
2) convert the mesh of the j-th face into Poly_triangulation Tj
3) BRepMesh_ShapeTool::AddInFace(<j-th face>, T), where j-th is a TopoDS_Face
As a test I retrieve for each face of the TopoDS_Shape the triangulation, using BRep_Tool::Triangulation,
and I plot all the triangles, which obviously overlap the original view of the surface mesh. So, the shape
triangulation is updated.
Unfortunately when Display is called on the AIS_Shape(TopoDS_Shape) the shaded view does not
reflect the change: a triangulation from BRepMesh_IncrementalMesh is used again, instead of the new one.
I'm sure I'm missing something.
Thanks a lot