20 #ifndef GeomData_Point2DArray_H_
21 #define GeomData_Point2DArray_H_
25 #include <GeomDataAPI_Point2DArray.h>
27 #include <TDataStd_RealArray.hxx>
28 #include <TDF_Label.hxx>
37 Handle_TDataStd_RealArray myArray;
42 GEOMDATA_EXPORT
virtual bool assign(std::shared_ptr<GeomDataAPI_Point2DArray> theOther);
45 GEOMDATA_EXPORT
virtual int size();
48 GEOMDATA_EXPORT
virtual void setSize(
const int theSize);
51 GEOMDATA_EXPORT
virtual void setPnt(
const int theIndex,
52 const double theX,
const double theY);
55 GEOMDATA_EXPORT
virtual void setPnt(
const int theIndex,
56 const std::shared_ptr<GeomAPI_Pnt2d>& thePoint);
59 GEOMDATA_EXPORT
virtual std::shared_ptr<GeomAPI_Pnt2d>
pnt(
const int theIndex);
Attribute that contains array of 2D point coordinates.
Definition: GeomDataAPI_Point2DArray.h:34
Attribute that contains an array of 2D points.
Definition: GeomData_Point2DArray.h:35
virtual void reinit()
Reinitializes the internal state of the attribute (may be needed on undo/redo, abort,...
Definition: GeomData_Point2DArray.cpp:37
GeomData_Point2DArray(TDF_Label &theLabel)
Initializes attributes.
Definition: GeomData_Point2DArray.cpp:31
virtual bool assign(std::shared_ptr< GeomDataAPI_Point2DArray > theOther)
Copy values from another array.
Definition: GeomData_Point2DArray.cpp:43
virtual void setSize(const int theSize)
Sets the new size of the array. The previous data is erased.
Definition: GeomData_Point2DArray.cpp:69
virtual int size()
Returns the size of the array (zero means that it is empty)
Definition: GeomData_Point2DArray.cpp:57
virtual void setPnt(const int theIndex, const double theX, const double theY)
Defines the value of the array by index [0; size-1].
Definition: GeomData_Point2DArray.cpp:98
virtual std::shared_ptr< GeomAPI_Pnt2d > pnt(const int theIndex)
Returns the value by the index.
Definition: GeomData_Point2DArray.cpp:114
General object of the application that allows to get/set attributes from the document and compute res...
Definition: Model_Data.h:61