2 #ifndef HYDROData_ProfileUZ_HeaderFile
3 #define HYDROData_ProfileUZ_HeaderFile
5 #include "HYDROData_IPolyline.h"
7 DEFINE_STANDARD_HANDLE(HYDROData_ProfileUZ, HYDROData_IPolyline)
9 /**\class HYDROData_ProfileUZ
10 * \brief Class that stores/retreives information about the
11 * parametric profile points.
13 class HYDROData_ProfileUZ : 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_ProfileUZ);
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_PROFILEUZ;}
36 * Returns the 3D presentation of all points.
38 HYDRODATA_EXPORT virtual TopoDS_Shape GetShape() const;
41 * Returns the depth for given distance.
43 HYDRODATA_EXPORT static double GetDepthFromDistance( const PointsList& thePoints,
44 const double& theDistance );
48 * Returns number of sections.
50 HYDRODATA_EXPORT virtual int NbSections() const;
53 * Adds new one section.
54 * \param theSectName name of the section
55 * \param theSectionType type of section
56 * \param theIsClosed flag indicates closures of section
58 HYDRODATA_EXPORT virtual void AddSection( const TCollection_AsciiString& theSectName,
59 const SectionType theSectionType,
60 const bool theIsClosed );
63 * Returns name of section with given index.
64 * \param theSectionIndex index of section
66 HYDRODATA_EXPORT virtual TCollection_AsciiString GetSectionName( const int theSectionIndex ) const;
69 * Set name for section with given index.
70 * \param theSectionIndex index of section
71 * \param theSectionName new section name
73 HYDRODATA_EXPORT virtual void SetSectionName( const int theSectionIndex,
74 const TCollection_AsciiString& theSectionName );
77 * Returns type of section with given index.
78 * \param theSectionIndex index of section
80 HYDRODATA_EXPORT virtual SectionType GetSectionType( const int theSectionIndex ) const;
83 * Set type for section with given index.
84 * \param theSectionIndex index of section
85 * \param theSectionType new section type
87 HYDRODATA_EXPORT virtual void SetSectionType( const int theSectionIndex,
88 const SectionType theSectionType );
91 * Returns true if section with given index is closed.
92 * \param theSectionIndex index of section
94 HYDRODATA_EXPORT virtual bool IsClosedSection( const int theSectionIndex ) const;
97 * Set closed flag for section with given index.
98 * \param theSectionIndex index of section
99 * \param theIsClosed new closures state
101 HYDRODATA_EXPORT virtual void SetSectionClosed( const int theSectionIndex,
102 const bool theIsClosed );
105 * Removes section with given index.
106 * \param theSectionIndex index of section
108 HYDRODATA_EXPORT virtual void RemoveSection( const int theSectionIndex );
111 * Removes all sections.
113 HYDRODATA_EXPORT virtual void RemoveSections();
117 * Adds new point for section with index "theSectionIndex".
118 * \param theSectionIndex index of section
119 * \param thePoint point to add
120 * \param theBeforeIndex if not equal -1 then insert point in this pos
122 HYDRODATA_EXPORT virtual void AddPoint( const int theSectionIndex,
123 const Point& thePoint,
124 const int thePointIndex = -1 );
127 * Replaces point for section with index "theSectionIndex".
128 * \param theSectionIndex index of section
129 * \param thePoint new point
130 * \param thePointIndex index of point to replace
132 HYDRODATA_EXPORT virtual void SetPoint( const int theSectionIndex,
133 const Point& thePoint,
134 const int thePointIndex );
137 * Removes point from section with index "theSectionIndex".
138 * \param theSectionIndex index of section
139 * \param thePointIndex index of point
141 HYDRODATA_EXPORT virtual void RemovePoint( const int theSectionIndex,
142 const int thePointIndex );
146 * Returns list of points.
147 * \param theSectionIndex if not equal -1 then list of points returned
148 * only for section with this index
149 * \return list of points
151 HYDRODATA_EXPORT virtual PointsList GetPoints( const int theSectionIndex = -1 ) const;
155 friend class HYDROData_Iterator;
158 * Creates new object in the internal data structure. Use higher level objects
159 * to create objects with real content.
161 HYDRODATA_EXPORT HYDROData_ProfileUZ();
164 * Destructs properties of the object and object itself, removes it from the document.
166 HYDRODATA_EXPORT ~HYDROData_ProfileUZ();