X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FGeomAPI%2FGeomAPI_Lin2d.cpp;h=3c784eefdbd7eb0c3b1ca1215aad9fea5128c5c5;hb=aa48919bb1ecb71f07d9ac5fcd1bad170e7ed547;hp=a59c5b4ea0fa801faa8ba7eb54ff97e3fb6afecf;hpb=4783f146b71a48c651523fcf0e12367bcf3d1fa8;p=modules%2Fshaper.git diff --git a/src/GeomAPI/GeomAPI_Lin2d.cpp b/src/GeomAPI/GeomAPI_Lin2d.cpp index a59c5b4ea..3c784eefd 100644 --- a/src/GeomAPI/GeomAPI_Lin2d.cpp +++ b/src/GeomAPI/GeomAPI_Lin2d.cpp @@ -1,9 +1,12 @@ +// Copyright (C) 2014-20xx CEA/DEN, EDF R&D + // File: GeomAPI_Lin2d.cpp // Created: 29 May 2014 // Author: Artem ZHIDKOV #include #include +#include #include #include @@ -34,6 +37,18 @@ GeomAPI_Lin2d::GeomAPI_Lin2d(const std::shared_ptr& theStart, { } +std::shared_ptr GeomAPI_Lin2d::location() +{ + gp_Pnt2d aLoc = impl().Location(); + return std::shared_ptr(new GeomAPI_Pnt2d(aLoc.X(), aLoc.Y())); +} + +std::shared_ptr GeomAPI_Lin2d::direction() +{ + const gp_Dir2d& aDir = impl().Direction(); + return std::shared_ptr(new GeomAPI_Dir2d(aDir.X(), aDir.Y())); +} + double GeomAPI_Lin2d::distance(const std::shared_ptr& theOther) const { return MY_LIN2D->Distance(theOther->impl());