At the moment I have a a TopoDS_Shape which I want to cut using a plane.
At first I create a TopoDS_Shape for the cutting plane as well. Next I get the Intersection between the plane and the object using
TopoDS_Shape Intersection = BRepAlgo_Section(object, plane);
Then I calculate the actual cut using
BRepAlgoAPI_Cut aCut(objectShape, cutPlane1);
TopoDS_Shape aResult1 = aCut.Shape();
But the resulting cut object happens to 'open' where I cut them, therefore I use the Intersection I calculated to close it again and sew them together using
This works perfectly but I was wondering if there was a way to cut the object with the plane without having to 'close' the cut object afterwards.
Another problem that I'm wondering about is:
What if the cutting plane doesn't create only one new shape but 2 or more (I'll try to show what I mean)
Let this be the object I want to cut:
if I want to cut it right there with this plane
------------ | |
the upper part results in 2 new objects which are not connected, but the cutting operation only returns 1 TopoDS_Shape.
Would the cutting actually work and is there a way find out how many individual objects there are in the cut object and to separate them into individual TopoDS_Shapes ?
I hope this made some sense, since English is not my native language.
I would be very happy if someone could help me with one of my questions. If not, I still want to thank you for reading it.