1 // File: GeomAlgoAPI_Boolean.cpp
2 // Created: 02 Sept 2014
3 // Author: Vitaly Smetannikov
5 #include "GeomAlgoAPI_Boolean.h"
7 #include <BRepAlgoAPI_Cut.hxx>
10 boost::shared_ptr<GeomAPI_Shape> GeomAlgoAPI_Boolean::makeCut(
11 boost::shared_ptr<GeomAPI_Shape> theShape,
12 boost::shared_ptr<GeomAPI_Shape> theTool)
14 const TopoDS_Shape& aShape = theShape->impl<TopoDS_Shape>();
15 const TopoDS_Shape& aTool = theTool->impl<TopoDS_Shape>();
17 BRepAlgoAPI_Cut aCut(aShape, aTool);
19 boost::shared_ptr<GeomAPI_Shape> aResult(new GeomAPI_Shape());
20 aResult->setImpl(new TopoDS_Shape(aCut.Shape()));
23 return boost::shared_ptr<GeomAPI_Shape>();