Mon, 08/02/2004 - 17:03
Forums:
Hello!
First we have a TopoDS_Shape then we call "BRepMesh::Mesh(result, 0.05).
After this, we call BRepTool::Triangulation(F,L) (F = TopoDS_Face, L = TopLoc_Location) in a loop for every face in the tree (with TopExp_Explorer...). Now we can get the triangulation data for every face. Is it possible to get all triangles from a compound solid at once without iterating over all its faces. We have to get a triangle strip of a compound solid for visualization.
Thanks,
Benjamin
Mon, 04/24/2017 - 23:50
Hi all,
Was there ever a follow-up to this? I would also like to get a triangulation of a solid all at once, and then a list of triangle strips (or some other compact representation), rather than having to iterate over the faces of shape and getting individual meshes. There is a certain amount of redundancy in the later approach, and a list of individual triangles uses more memory than is necessary (as opposed to a more compact data structure).
Thanks!
Tue, 04/25/2017 - 07:07
Hello,
There is no built-in way to do this. This is caused by fact that OCCT kernel tries to create a mesh for topologically invalid objects. As a result, triangle strips may not exist.
qa qa
Mon, 05/22/2017 - 13:01
Hi Benjamin, Here is an example how to get the triangulation of a shape:
See: MeshFromShape
Hope it helps?
Guido