X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FGeomAPI%2FGeomAPI_Lin.cpp;fp=src%2FGeomAPI%2FGeomAPI_Lin.cpp;h=8b64190ba21c78a21df5824d9c4d04d5161122e9;hb=9aad36a6b453e73b05356af4662a66a32cb71f1e;hp=27bd3e0e297fdee97d63db8ed18e4d9ed2661d41;hpb=d04185a613955ab097c4484ce881aa4e35f424f7;p=modules%2Fshaper.git diff --git a/src/GeomAPI/GeomAPI_Lin.cpp b/src/GeomAPI/GeomAPI_Lin.cpp index 27bd3e0e2..8b64190ba 100644 --- a/src/GeomAPI/GeomAPI_Lin.cpp +++ b/src/GeomAPI/GeomAPI_Lin.cpp @@ -6,6 +6,7 @@ #include #include +#include #include #include @@ -42,6 +43,18 @@ GeomAPI_Lin::GeomAPI_Lin(const std::shared_ptr& theStart, { } +std::shared_ptr GeomAPI_Lin::location() +{ + gp_Pnt aLoc = impl().Location(); + return std::shared_ptr(new GeomAPI_Pnt(aLoc.X(), aLoc.Y(), aLoc.Z())); +} + +std::shared_ptr GeomAPI_Lin::direction() +{ + const gp_Dir& aDir = impl().Direction(); + return std::shared_ptr(new GeomAPI_Dir(aDir.X(), aDir.Y(), aDir.Z())); +} + double GeomAPI_Lin::distance(const std::shared_ptr& thePoint) const { return MY_LIN->Distance(thePoint->impl());