1 // File: GeomData_Point2D.cxx
2 // Created: 24 Apr 2014
3 // Author: Mikhail PONIKAROV
5 #include "GeomData_Point2D.h"
9 void GeomData_Point2D::setValue(const double theX, const double theY)
11 myCoords->SetValue(0, theX);
12 myCoords->SetValue(1, theY);
15 double GeomData_Point2D::x() const
17 return myCoords->Value(0);
20 double GeomData_Point2D::y() const
22 return myCoords->Value(1);
25 GeomData_Point2D::GeomData_Point2D(TDF_Label& theLabel)
27 // check the attribute could be already presented in this doc (after load document)
28 if (!theLabel.FindAttribute(TDataStd_RealArray::GetID(), myCoords)) {
29 // create attribute: not initialized by value yet, just zero
30 myCoords = TDataStd_RealArray::Set(theLabel, 0, 1);