Keep faces colors on boolean operations

This commit is contained in:
wmayer
2012-05-30 15:18:37 +02:00
parent 5f54bfa899
commit 7fadf83ff5
12 changed files with 119 additions and 32 deletions

View File

@@ -40,12 +40,8 @@ Cut::Cut(void)
{
}
TopoDS_Shape Cut::runOperation(const TopoDS_Shape& base, const TopoDS_Shape& tool) const
BRepAlgoAPI_BooleanOperation* Cut::makeOperation(const TopoDS_Shape& base, const TopoDS_Shape& tool) const
{
// Let's call algorithm computing a cut operation:
BRepAlgoAPI_Cut mkCut(base, tool);
// Let's check if the cut has been successful
if (!mkCut.IsDone())
throw Base::Exception("Cut failed");
return mkCut.Shape();
return new BRepAlgoAPI_Cut(base, tool);
}