X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FGeomData%2FGeomData_Point2D.cpp;h=334d2070a320b1c19d0f9cf73450d143eca4f868;hb=98be939e3a6c58498b6dd763301d3e5fa50bf397;hp=8af702953a020f407e2360e2b054f1ec87f60820;hpb=277db1718bb7a3226515e4cc2272d83b463b3434;p=modules%2Fshaper.git diff --git a/src/GeomData/GeomData_Point2D.cpp b/src/GeomData/GeomData_Point2D.cpp index 8af702953..334d2070a 100644 --- a/src/GeomData/GeomData_Point2D.cpp +++ b/src/GeomData/GeomData_Point2D.cpp @@ -5,6 +5,7 @@ #include "GeomData_Point2D.h" #include "Model_Events.h" #include +#include using namespace std; @@ -19,6 +20,11 @@ void GeomData_Point2D::setValue(const double theX, const double theY) } } +void GeomData_Point2D::setValue(const boost::shared_ptr& thePoint) +{ + setValue(thePoint->x(), thePoint->y()); +} + double GeomData_Point2D::x() const { return myCoords->Value(0); @@ -29,6 +35,13 @@ double GeomData_Point2D::y() const return myCoords->Value(1); } +boost::shared_ptr GeomData_Point2D::pnt() +{ + boost::shared_ptr aResult( + new GeomAPI_Pnt2d(myCoords->Value(0), myCoords->Value(1))); + return aResult; +} + GeomData_Point2D::GeomData_Point2D(TDF_Label& theLabel) { // check the attribute could be already presented in this doc (after load document)