Sat, 06/09/2007 - 11:02
Forums:
Hi,
I'm using TopExp_Explorer to traverse through the faces of a shape, create a mesh for every single face (I was having some crashes when attaching meshes to entire shapes, some copy using BRepBuilderAPI_Copy, I've heard that it doesn't work too well) and then make a triangulation using Brep_Tool::Triangulation. After I process all the triangles, I try deleting the created handle to Poly_Triangulation, but in the next iteration of the explorer, I get an exception when creating a mesh of a face.
So how can I safely delete the mesh and the triangulation once I'm done with them, to save some memory? I'm dealing with geometries that yield millions of triangles, so memory management is key.
Thanks,
Janko Jerinic
Sun, 06/10/2007 - 02:15
BRepTools::Clean should do the job
Stephane
Thu, 10/04/2007 - 01:08
Hi, Stephane,
I do not understand why BRepTools::Clean(const TopoDS_Shape &) can clean triangulation data? It seems that it only destroys TopoDS_Shape.
Another question is that how to clear data from BRepMesh::Mesh()
Best regards,
Wei
Thu, 10/04/2007 - 04:13
Sry that BRepTools::Clean(const TopoDS_Shape &) is for remove the triangulation data. I just read the comments and at first I thought that it is for removing the information of TopoDS_Shape.
Another question then is that TopoDS_Shape::Nullify() will destroy all information in current TopoDS_Shape, is that ture?