X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FGeomAPI%2FGeomAPI_Pnt2d.cpp;h=e1cdf3d283e53b2627bee83afb0681b542f28b1a;hb=d34bc15bf8fafedd9188f47ff5962b5a1661d5b0;hp=1b4ee554bfb82bde1c9bdc1338b246635bbe2489;hpb=81dad1acf409fa5e71090501bc1aa7e0b7d80cde;p=modules%2Fshaper.git diff --git a/src/GeomAPI/GeomAPI_Pnt2d.cpp b/src/GeomAPI/GeomAPI_Pnt2d.cpp index 1b4ee554b..e1cdf3d28 100644 --- a/src/GeomAPI/GeomAPI_Pnt2d.cpp +++ b/src/GeomAPI/GeomAPI_Pnt2d.cpp @@ -4,6 +4,9 @@ #include #include +#include +#include +#include #include @@ -37,6 +40,16 @@ void GeomAPI_Pnt2d::setY(const double theY) return MY_PNT2D->SetY(theY); } +boost::shared_ptr GeomAPI_Pnt2d::to3D(const boost::shared_ptr& theOrigin, + const boost::shared_ptr& theDirX, + const boost::shared_ptr& theDirY) +{ + boost::shared_ptr aSum = theOrigin->xyz()->added( + theDirX->xyz()->multiplied(x()))->added(theDirY->xyz()->multiplied(y())); + + return boost::shared_ptr(new GeomAPI_Pnt(aSum)); +} + const boost::shared_ptr GeomAPI_Pnt2d::xy() { return boost::shared_ptr(new GeomAPI_XY(MY_PNT2D->X(), MY_PNT2D->Y()));