2 #ifndef HYDROData_PolylineXY_HeaderFile
3 #define HYDROData_PolylineXY_HeaderFile
5 #include "HYDROData_IPolyline.h"
7 DEFINE_STANDARD_HANDLE(HYDROData_PolylineXY, HYDROData_IPolyline)
9 /**\class HYDROData_PolylineXY
10 * \brief Class that stores/retreives information about the
11 * parametric profile points.
13 class HYDROData_PolylineXY : public HYDROData_IPolyline
17 * Enumeration of tags corresponding to the persistent object parameters.
21 DataTag_First = HYDROData_IPolyline::DataTag_First + 100, ///< first tag, to reserve
25 DEFINE_STANDARD_RTTI(HYDROData_PolylineXY);
29 * Returns the kind of this object. Must be redefined in all objects of known type.
31 HYDRODATA_EXPORT virtual const ObjectKind GetKind() const {return KIND_POLYLINEXY;}
37 * Returns the 3D presentation of all points.
39 HYDRODATA_EXPORT virtual TopoDS_Wire GetWire() const;
43 * Returns number of sections.
45 HYDRODATA_EXPORT virtual int NbSections() const;
48 * Adds new one section.
49 * \param theIsClosed flag indicates type of polyline
51 HYDRODATA_EXPORT virtual void AddSection( const bool theIsClosed );
54 * Returns true if section with given index is closed.
55 * \param theSectionIndex index of section
57 HYDRODATA_EXPORT virtual bool IsClosedSection( const int theSectionIndex ) const;
60 * Removes section with given index.
61 * \param theSectionIndex index of section
63 HYDRODATA_EXPORT virtual void RemoveSection( const int theSectionIndex );
66 * Removes all sections.
68 HYDRODATA_EXPORT virtual void RemoveSections();
72 * Adds new point for section with index "theSectionIndex".
73 * \param theSectionIndex index of section
74 * \param thePoint point to add
75 * \param theBeforeIndex if not equal -1 then insert point in this pos
77 HYDRODATA_EXPORT virtual void AddPoint( const int theSectionIndex,
78 const Point& thePoint,
79 const int thePointIndex = -1 );
82 * Replaces point for section with index "theSectionIndex".
83 * \param theSectionIndex index of section
84 * \param thePointIndex index of point to replace
85 * \param thePoint new point
87 HYDRODATA_EXPORT virtual void SetPoint( const int theSectionIndex,
88 const int thePointIndex,
89 const Point& thePoint );
92 * Removes point from section with index "theSectionIndex".
93 * \param theSectionIndex index of section
94 * \param thePointIndex index of point
96 HYDRODATA_EXPORT virtual void RemovePoint( const int theSectionIndex,
97 const int thePointIndex );
101 * Returns list of points.
102 * \param theSectionIndex if not equal -1 then list of points returned
103 * only for section with this index
104 * \return list of points
106 HYDRODATA_EXPORT virtual PointsList GetPoints( const int theSectionIndex = -1 ) const;
110 friend class HYDROData_Profile;
111 friend class HYDROData_Iterator;
114 * Creates new object in the internal data structure. Use higher level objects
115 * to create objects with real content.
117 HYDRODATA_EXPORT HYDROData_PolylineXY();
120 * Destructs properties of the object and object itself, removes it from the document.
122 HYDRODATA_EXPORT ~HYDROData_PolylineXY();