Open CASCADE, the 3D modelling kernel
3D modeling & numerical simulation

Search the Forums
See All Topics

Using BRepAlgoAPI_Cut to subtract from a shell

Using BRepAlgoAPI_Cut to subtract from a shell
Kevin Malachowski 2012/06/12 21:37
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.
You have to be logged in to download the attached file
Kevin Malachowski 2012/06/12 21: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.
Kevin Malachowski 2012/06/13 01: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,
jelle 2012/06/13 11:38
Thanks Kevin, that's meaningful to share here...
Sharad Verma 2012/06/13 13:17
This is useful

Thanks.. :)
Umesh Worlikar 2012/07/08 22:45
Useful indeed!

Latest news
  • Open CASCADE CAD Assistant for iOS platform is available!
  • Open CASCADE Technology 6.9.0 is available for download!
  • JT Assistant for Android

  • © OPEN CASCADE 2000 - 2015  |  Search  |  Contacts   |  Site map