#include <BRep_Tool.hxx>
#include <Geom_Plane.hxx>
+#include <gp_Ax2.hxx>
+#include <gp_Circ.hxx>
+
boost::shared_ptr<GeomAPI_Shape> GeomAlgoAPI_EdgeBuilder::line(
boost::shared_ptr<GeomAPI_Pnt> theStart, boost::shared_ptr<GeomAPI_Pnt> theEnd)
{
aRes->setImpl(new TopoDS_Shape(anEdge));
return aRes;
}
+
+boost::shared_ptr<GeomAPI_Shape> GeomAlgoAPI_EdgeBuilder::lineCircle(
+ boost::shared_ptr<GeomAPI_Pnt> theCenter,
+ boost::shared_ptr<GeomAPI_Dir> theNormal, double theRadius)
+{
+ const gp_Pnt& aCenter = theCenter->impl<gp_Pnt>();
+ const gp_Dir& aDir = theNormal->impl<gp_Dir>();
+
+ gp_Circ aCircle(gp_Ax2(aCenter, aDir), theRadius);
+
+ BRepBuilderAPI_MakeEdge anEdgeBuilder(aCircle);
+ boost::shared_ptr<GeomAPI_Shape> aRes(new GeomAPI_Shape);
+ TopoDS_Edge anEdge = anEdgeBuilder.Edge();
+ aRes->setImpl(new TopoDS_Shape(anEdge));
+ return aRes;
+}