How to Cycle on all object in db and retrieve the type for everyone

Hi,
what is the documentation that explain me how to cycle on all the object in a OCC db and to know the type for every object.
Thanks in advance.

cmollozzo's picture

Nobody knows the solution, please ?

Rob Bachrach's picture

I guess it depends on what kind of DB you have. If you have a top level TopoDS_Shape, you can use TopoDS_Iterator to iterate over its subshapes or TopExp_Explorer to perform a more controlled iteration. For each TopoDS_Shape, you can look at the ShapeType to see if it is a solid, face, edge, etc. You can access the underlying geometry of faces, edges, and vertexes with the functions in BRep_Tool.