TriangleList from Face

I need to access the trianglelist from a discretized face in correct order. Currently I´m only able to get the polytriangulation but I´m not able to access the trianglelist (and also found no example for that). How can i do this? Any idea.

for (TopExp_Explorer lExplorer(lCompound,TopAbs_FACE); lExplorer.More(); lExplorer.Next())
lCurrentFace = TopoDS::Face(lTopExplorer.Current());
Handle (Poly_Triangulation) lTriangulation = BRep_Tool::Triangulation(lCurrentFace, Location);

Thanks in advance - Stefan

Rob Bachrach's picture

Check if this thread answers your question:

jelle's picture

perhaps this helps a little:

T = BRep_Tool().Triangulation( face, face.Location())
print 'Number of Triangles: %s ' % (T.Triangles().Length()) * 12
return T.Nodes(), T.UVNodes(), T.Triangles()