X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FGeomAPI%2FGeomAPI_Circ.cpp;h=87662f275a42cdc2e18a4510c50b4bb8ed2621d9;hb=f60dc9dd94d5d4b0ea07e3e3cbfd5b3028f0942d;hp=63743cc7d06caaa327758599ccf7f7953ad6f019;hpb=a94fc319f2aa64b43c9a73b5ff7063923648faec;p=modules%2Fshaper.git diff --git a/src/GeomAPI/GeomAPI_Circ.cpp b/src/GeomAPI/GeomAPI_Circ.cpp index 63743cc7d..87662f275 100644 --- a/src/GeomAPI/GeomAPI_Circ.cpp +++ b/src/GeomAPI/GeomAPI_Circ.cpp @@ -56,6 +56,16 @@ GeomAPI_Circ::GeomAPI_Circ(const std::shared_ptr& theCenter, { } +//================================================================================================= +GeomAPI_Circ::GeomAPI_Circ(const GeomCurvePtr& theCurve) +{ + Handle(Geom_Curve) aCurve = theCurve->impl(); + 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_Circ::center() const {