1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
3 // File: GeomDataAPI_Point2D.cpp
4 // Created: 24 Apr 2014
5 // Author: Mikhail PONIKAROV
8 #include <GeomDataAPI_Point2D.h>
9 #include <ModelAPI_AttributeRefAttr.h>
11 void GeomDataAPI_Point2D::move(const double theDeltaX, const double theDeltaY)
13 setValue(x() + theDeltaX, y() + theDeltaY);
16 std::string GeomDataAPI_Point2D::attributeType()
21 std::shared_ptr<GeomDataAPI_Point2D> GeomDataAPI_Point2D::getPoint2D(
22 const DataPtr& theData, const std::string& theAttribute)
24 std::shared_ptr<GeomDataAPI_Point2D> aPointAttr;
28 std::shared_ptr<ModelAPI_AttributeRefAttr> anAttr = std::dynamic_pointer_cast<
29 ModelAPI_AttributeRefAttr>(theData->attribute(theAttribute));
30 if (anAttr && anAttr->attr()) {
31 aPointAttr = std::dynamic_pointer_cast<GeomDataAPI_Point2D>(anAttr->attr());
37 GeomDataAPI_Point2D::GeomDataAPI_Point2D()
41 GeomDataAPI_Point2D::~GeomDataAPI_Point2D()