+
+ std::shared_ptr<GeomAPI_Ax2> anAxis;
+ anAxis = std::shared_ptr<GeomAPI_Ax2>(new GeomAPI_Ax2(theBasePoint,
+ theEdge->line()->direction()));
+
+ GeomAlgoAPI_Cone aConeAlgo(anAxis, theBaseRadius, theTopRadius, theHeight);
+
+ static const std::string aMsg("Cone builder");
+ return runAlgoAndCheckShape(aConeAlgo, aMsg);
+ }
+
+ //===============================================================================================
+ std::shared_ptr<GeomAPI_Shape> GeomAlgoAPI_ShapeAPI::makeCone(
+ double theBaseRadius, double theTopRadius,
+ double theHeight)
+ {
+ std::shared_ptr<GeomAPI_Pnt> aBasePoint =
+ std::shared_ptr<GeomAPI_Pnt>(new GeomAPI_Pnt(0.,0.,0.));
+ std::shared_ptr<GeomAPI_Edge> aEdge = GeomAlgoAPI_EdgeBuilder::line(0., 0., 1.);
+ std::shared_ptr<GeomAPI_Ax2> anAxis;
+ anAxis = std::shared_ptr<GeomAPI_Ax2>(new GeomAPI_Ax2(aBasePoint,
+ aEdge->line()->direction()));
+
+ GeomAlgoAPI_Cone aConeAlgo(anAxis, theBaseRadius, theTopRadius, theHeight);
+
+ static const std::string aMsg("Cone builder");
+ return runAlgoAndCheckShape(aConeAlgo, aMsg);