Tue, 05/26/2020 - 01:27
I try cut a box with a strict smaller inner box but it seems that BRepAlgoAPI_Cut doesn't give the real cutted solid.
auto box1 = BRepPrimAPI_MakeBox(gp_Pnt(0,0,0), gp_Pnt(3, 3, 3)); auto box2 = BRepPrimAPI_MakeBox(gp_Pnt(1,1,1), gp_Pnt(2, 2, 2)); auto cut = BRepAlgoAPI_Cut(box1, box2); std::vector<TopoDS_Solid> listSolid; TopExp_Explorer Ex; for (Ex.Init(cut, TopAbs_SOLID); Ex.More(); Ex.Next()) listSolid.push_back(TopoDS::Solid(Ex.Current());
listSolid is composed of one solid but strictly the same as box1 i.e. without box2....
Is there something wrong the way i cut ?
Thanks for your help !
Wed, 05/27/2020 - 14:57
A solid without holes contains a single shell.
In your situation you have a solid that contains 2 shells:
The first shell is the outer. (Orientation=forward) the second shell is the inner.
Here you see small example: BoxInBox