X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FGeomDataAPI%2FGeomDataAPI_Point2D.cpp;h=3a72ceaccd3d53910a260a9b58712746aaf62d31;hb=85b662214060cf733b44ac7822e3e4db49e2da4b;hp=dd8b39ec5d5c6bae09e425d7ad6dba8a783f7aef;hpb=8babac25037f2666dcb422dd68a66dd2ed1383d8;p=modules%2Fshaper.git diff --git a/src/GeomDataAPI/GeomDataAPI_Point2D.cpp b/src/GeomDataAPI/GeomDataAPI_Point2D.cpp index dd8b39ec5..3a72ceacc 100644 --- a/src/GeomDataAPI/GeomDataAPI_Point2D.cpp +++ b/src/GeomDataAPI/GeomDataAPI_Point2D.cpp @@ -6,6 +6,7 @@ #include +#include void GeomDataAPI_Point2D::move(const double theDeltaX, const double theDeltaY) { @@ -17,6 +18,22 @@ std::string GeomDataAPI_Point2D::attributeType() return typeId(); } +std::shared_ptr GeomDataAPI_Point2D::getPoint2D( + const DataPtr& theData, const std::string& theAttribute) +{ + std::shared_ptr aPointAttr; + if (!theData) + return aPointAttr; + + std::shared_ptr anAttr = std::dynamic_pointer_cast< + ModelAPI_AttributeRefAttr>(theData->attribute(theAttribute)); + if (anAttr && anAttr->attr()) { + aPointAttr = std::dynamic_pointer_cast(anAttr->attr()); + } + return aPointAttr; +} + + GeomDataAPI_Point2D::GeomDataAPI_Point2D() { }