Tue, 09/14/2021 - 20:29
Forums:
I have a complex TopoDS_Solid geometry. It consists of several elementary geometries. Is there any way to split the complex solid into some elementary shapes?
additional comments:
When I do shp.ShapeType(), it gives me TopoDs_Solid
Also, NbChildren() is 1, so I dont think TopoDS_Iterator will work.
Wed, 09/15/2021 - 21:54
Hi Ying Zhang,
CompSolid is a shape consisting of Solids. So, the simplest and the most natural way is to use TopoDS_Iterator on Comsolid to get access to its direct children.
To know shared faces you may use the method TopExp::MapShapesAndAncestors, which will allow you to iterate by faces and see in which solids each face is contained.
Mikhail
Thu, 09/16/2021 - 22:07
Thank you for your answers. But I feel I made some mistakes. My part is actually recognized as a solid, not compsolid, but the geometry is pretty complex. Is there any way to split it into some elementary shapes?
Thu, 09/16/2021 - 22:38
For example, I have a geometry like the one in the figure. I want to split it into two cylinders. Is it possible?
Right now, the shape type is TopoDS_Solid.
Fri, 09/17/2021 - 03:09
If your shape is a solid then it contains a shell composed of faces. You can only explore it on faces and recognize if the underlying surface is a cylindrical one.
Tue, 09/21/2021 - 19:49
Hi, Mikhail, thanks for your response. In this case, is it possible to determine if two faces are connected? like connected with face and edge? Any suggestion on what function should I looking for? Thanks a lot!!!
Tue, 09/21/2021 - 22:24
Connected faces have at least one common edge.