Tue, 02/06/2007 - 18:20
Hi there,
I'm having a problem when cutting shapes. I'm trying to cut a TopoDS_Shape at a certain edge using a cutting plane that includes said edge. But the cut could result in more than just 2 new TopoDS_Shapes that are not connected with each other.
Is it possible to use
BRepAlgoAPI_Cut aCut(objectShape, cutPlane1);
TopoDS_Shape aResult1 = aCut.Shape();
if the cut shape 'aResult1' includes 2 not connected shapes? and is there a function to find out which parts of the result make a connected shape?
Or is there another Cutting function that allows cutting into 3 or more new shapes?
I've looked for one but couldn't find any. Maybe I was looking at the wrong places, but I'm a bit lost right now. I'd appreciate any help that any of you could give me.
--
Christian
Sat, 10/11/2008 - 05:05
Hi, Christian, did you ever get an answer to this one? I have the same issue.
Sat, 10/11/2008 - 13:04
I suppose if the result includes 2 or more shapes, Shape() method returns shape of type TopAbs_COMPOUND or TopAbs_COMPSOLID. This compound shape includes all sub shapes that you need. Just explore the result shape with TopExp_Explorer.
Sat, 10/11/2008 - 16:42
Sweet, thanks! I'll give that a try. So obvious!
Mon, 10/13/2008 - 09:42
Is it possible to get the "topds_shape's" from the compound or compsolid ? I only able to get the
sub-shapes - faces/edges/vertices and not the 'shape' from the compound.
For example I have a box,cylinder,cone,sphere and I make a compound out of it. How to get
the 4 top level sub-shapes from this compound.
Mon, 10/13/2008 - 09:49
Use TopAbs_SOLID for the explorer, or TopAbs_COMPOUND if you're storing compounds into a compound object. In other words: check first what the box, cylinder, cone and sphere are before adding them to the compound (they're probably solids or shells), then use a explorer with the corresponding TopAbs_* when exploring the compound.
Mon, 10/13/2008 - 10:45
Or use TopoDS_Iterator. It will iterate on the direct subshapes of the given shape.
Tue, 10/14/2008 - 00:02
According to a comment in a Salome source file the boolean operations always return compound shape.