Mon, 06/15/2009 - 19:25
Forums:
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.
BRepMesh::Mesh(lCompound,1);
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
Mon, 06/15/2009 - 20:10
Check if this thread answers your question:
http://www.opencascade.org/org/forum/thread_14748/
Mon, 06/15/2009 - 21:51
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()