Is there a function to get the triangulation from a TopoDS_Shape? I make a triangulation on a face with
Handle (BRepMesh_Discret) mesh = new BRepMesh_Discret(
TRUE,//this tells that the trangulation will be stored in the shape
The objective is to get the triangulation from that face in the form of Poly_Triangulation or something else. In fact I'm interested to get the coordinates of the nodes and the triangles with the node indices. I saw that BRepMesh_Discret has a member Triangle but this returns a BRepMesh_Triangle which has only edges and orientations. So to get the nine(3x3) coordinates of a triangle I have to ask for every edge the endpoints, compare them to not store duplicates and so one, while Poly_Triangulation is a more elegant class having the nodes with their coordinates and triangles with indices. I tried to get with
Handle (Poly_Triangulation) facing = BRep_Tool::Triangulation(my_Face,L), but it is very strange because it gives me a Poly_Triangulation even if it wasn't triangulated with the Discret method. I don't know if BRep_Tool::Triangulation makes himself a triangulation or not?
Another question would be, how can I control the coarseness of the generated triangulation. With the above settings I get a very fine triangulation for any shape I tried to triangulate. I don't understand the meaning of the deflection. It is the minimum distance between the generated node and the surface?