Tue, 06/12/2012 - 23:37
Forums:
I need to create a hole in a shell and after some google searches I found many people suggested using the boolean subtraction operation "Cut". So I did a cut of a solid from a relatively simple shell to do this, but instead of it removing the intersection, it returned only the intersection. What am I doing wrong?
Here is basically how I called it:
TopoDS_Shape shell = ...;
TopoDS_Shape solid = ...;
TopoDS_Shape cut = BRepAlgoAPI_Cut(shell, solid);
Attached is an infographic showing you exactly what happened.
Attachments:
Tue, 06/12/2012 - 23:51
Never mind. Turn out if I use BRepAlgoAPI_Common it works exactly as I want it to... even though the names seem completely backwards, at least in my opinion.
Wed, 06/13/2012 - 03:37
Another correction: The reason my code was acting as the opposite as I previously expected was because I was careless in the direction of adding points to my solid. For anyone who doesn't know, it is important to notice the direction of the cross-vector of a plane. Clockwise points means the vector points out, counterclockwise means it points in. These are important to notice when using the boolean operations,
Wed, 06/13/2012 - 13:38
Thanks Kevin, that's meaningful to share here...
Wed, 06/13/2012 - 15:17
This is useful
Thanks.. :)
Mon, 07/09/2012 - 00:45
Useful indeed!
Thanks.