-GeomAPI_Circ::GeomAPI_Circ(const boost::shared_ptr<GeomAPI_Pnt>& theCenter,
- const boost::shared_ptr<GeomAPI_Dir>& theDir,
- double theRadius)
- : GeomAPI_Interface(newCirc(theCenter->impl<gp_Pnt>(),
- theDir->impl<gp_Dir>(), theRadius))
+//=================================================================================================
+GeomAPI_Circ::GeomAPI_Circ(const std::shared_ptr<GeomAPI_Ax2> theAx2,
+ const double theRadius)
+: GeomAPI_Interface(new gp_Circ(theAx2->impl<gp_Ax2>(), theRadius))
+{
+
+}
+
+
+//=================================================================================================
+GeomAPI_Circ::GeomAPI_Circ(const std::shared_ptr<GeomAPI_Pnt>& theCenter,
+ const std::shared_ptr<GeomAPI_Dir>& theDir, double theRadius)
+ : GeomAPI_Interface(newCirc(theCenter->impl<gp_Pnt>(), theDir->impl<gp_Dir>(), theRadius))
+{
+}
+
+//=================================================================================================
+GeomAPI_Circ::GeomAPI_Circ(const GeomCurvePtr& theCurve)
+{
+ Handle(Geom_Curve) aCurve = theCurve->impl<Handle(Geom_Curve)>();
+ Handle(Geom_Circle) aCirc = Handle(Geom_Circle)::DownCast(aCurve);
+ if (aCirc.IsNull())
+ throw Standard_ConstructionError("GeomAPI_Circ: Curve is not a circle");
+ setImpl(new gp_Circ(aCirc->Circ()));
+}
+
+//=================================================================================================
+const std::shared_ptr<GeomAPI_Pnt> GeomAPI_Circ::center() const