I am trying to obtain a triangulation from a TopoDS_Face. According to what I've seen in the documentation and on the forum, it should be a pretty straightforward operation. Yet, the triangulation I obtain is just an empty object. I found several threads in which it is pointed out that this usually occurs when the triangulation hasn't been initialized, so I added an initialization via the BRepMesh::Mesh method. This isn't solving the problem though, and I really have no clue of what I'm missing here...
This is the code I'm using.
Handle(Poly_Triangulation) tri = BRep_Tool::Triangulation(trimmed_approx_face, loc);
cout BRepMesh::Mesh(trimmed_approx_face, 0.7);
I really hope that I made some stupid mistake here, but just in case... I might mention that my face is obtained in a peculiar way. I initially use GeomPlate_Surface to obtain the surface bounded by closed wire. I then approximate such plate surface with a Geom_BSplineSurface. Finally, I obtain my trimmed_approx_face by cutting the bspline surface with the original wire through BRepBuilderAPI_MakeFace. All these operations are successful and I can also export the face into an IGES file.