
Tue, 07/17/2018 - 19:34
Hello forum,
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.
Any idea?
Thanks a lot
Giovanni
Tue, 07/17/2018 - 22:05
Auto-triangulation is enabled by default in AIS_InteractiveContext (for compatibility with old applications).
Check Prs3d_Drawer::SetAutoTriangulation() documentation ("vdefaults -autoTriang 0" in Draw Harness).
Tue, 07/17/2018 - 22:25
Thank you very much Kirill for your help
Giovanni
Wed, 10/12/2022 - 19:08
Hello Giovanni Bettega!
I am trying to use Netgen library in my project for triangulating .step drawings. I would be very grateful if you could share your code for triangulation and/or your experience with building and configuring Netgen library into your project. Your experience could be very valuable to me.
I'd appreciate all the help I can get.
Artem