X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FGeomAPI%2FGeomAPI_Circ2d.cpp;h=9871e60fb0387d510778839af5823d79d59a9234;hb=60e95a5502a6940c6c27ce5d561b3c684b0b0a4f;hp=d5a67b8f81ec27ffa666ca3400702d061d1d8b71;hpb=747f357e1da638fc17654bf3e42ed7b1ace7b442;p=modules%2Fshaper.git diff --git a/src/GeomAPI/GeomAPI_Circ2d.cpp b/src/GeomAPI/GeomAPI_Circ2d.cpp index d5a67b8f8..9871e60fb 100644 --- a/src/GeomAPI/GeomAPI_Circ2d.cpp +++ b/src/GeomAPI/GeomAPI_Circ2d.cpp @@ -1,3 +1,5 @@ +// Copyright (C) 2014-20xx CEA/DEN, EDF R&D + // File: GeomAPI_Circ2d.cpp // Created: 29 May 2014 // Author: Artem ZHIDKOV @@ -41,25 +43,25 @@ static gp_Circ2d* newCirc2d(const double theCenterX, const double theCenterY, return newCirc2d(theCenterX, theCenterY, aDir, aRadius); } -GeomAPI_Circ2d::GeomAPI_Circ2d(const boost::shared_ptr& theCenter, - const boost::shared_ptr& theCirclePoint) +GeomAPI_Circ2d::GeomAPI_Circ2d(const std::shared_ptr& theCenter, + const std::shared_ptr& theCirclePoint) : GeomAPI_Interface( newCirc2d(theCenter->x(), theCenter->y(), theCirclePoint->x(), theCirclePoint->y())) { } -GeomAPI_Circ2d::GeomAPI_Circ2d(const boost::shared_ptr& theCenter, - const boost::shared_ptr& theDir, double theRadius) +GeomAPI_Circ2d::GeomAPI_Circ2d(const std::shared_ptr& theCenter, + const std::shared_ptr& theDir, double theRadius) : GeomAPI_Interface( newCirc2d(theCenter->x(), theCenter->y(), theDir->impl(), theRadius)) { } -const boost::shared_ptr GeomAPI_Circ2d::project( - const boost::shared_ptr& thePoint) const +const std::shared_ptr GeomAPI_Circ2d::project( + const std::shared_ptr& thePoint) const { - boost::shared_ptr aResult; + std::shared_ptr aResult; if (!MY_CIRC2D) return aResult; @@ -72,22 +74,22 @@ const boost::shared_ptr GeomAPI_Circ2d::project( if (Abs(aDist - MY_CIRC2D->Radius()) < Precision::Confusion()) { // Point on the circle - aResult = boost::shared_ptr( + aResult = std::shared_ptr( new GeomAPI_Pnt2d(thePoint->x(), thePoint->y())); } else { gp_Dir2d aDir(aPoint.XY() - aCenter.XY()); gp_XY aNewPoint = aCenter.XY() + aDir.XY() * MY_CIRC2D->Radius(); - aResult = boost::shared_ptr( + aResult = std::shared_ptr( new GeomAPI_Pnt2d(aNewPoint.X(), aNewPoint.Y())); } return aResult; } -const boost::shared_ptr GeomAPI_Circ2d::center() const +const std::shared_ptr GeomAPI_Circ2d::center() const { const gp_Pnt2d& aCenter = MY_CIRC2D->Location(); - return boost::shared_ptr(new GeomAPI_Pnt2d(aCenter.X(), aCenter.Y())); + return std::shared_ptr(new GeomAPI_Pnt2d(aCenter.X(), aCenter.Y())); } double GeomAPI_Circ2d::radius() const