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();
41 * Returns the 3D presentation of all points.
43 HYDRODATA_EXPORT virtual double GetDepthFromDistance( const double& theDistance ) const;
47 * Returns number of sections.
49 HYDRODATA_EXPORT virtual int NbSections() const;
52 * Adds new one section.
53 * \param theSectName name of the section
54 * \param theSectionType type of section
55 * \param theIsClosed flag indicates closures of section
57 HYDRODATA_EXPORT virtual void AddSection( const TCollection_AsciiString& theSectName,
58 const SectionType theSectionType,
59 const bool theIsClosed );
62 * Returns name of section with given index.
63 * \param theSectionIndex index of section
65 HYDRODATA_EXPORT virtual TCollection_AsciiString GetSectionName( const int theSectionIndex ) const;
68 * Set name for section with given index.
69 * \param theSectionIndex index of section
70 * \param theSectionName new section name
72 HYDRODATA_EXPORT virtual void SetSectionName( const int theSectionIndex,
73 const TCollection_AsciiString& theSectionName );
76 * Returns type of section with given index.
77 * \param theSectionIndex index of section
79 HYDRODATA_EXPORT virtual SectionType GetSectionType( const int theSectionIndex ) const;
82 * Set type for section with given index.
83 * \param theSectionIndex index of section
84 * \param theSectionType new section type
86 HYDRODATA_EXPORT virtual void SetSectionType( const int theSectionIndex,
87 const SectionType theSectionType );
90 * Returns true if section with given index is closed.
91 * \param theSectionIndex index of section
93 HYDRODATA_EXPORT virtual bool IsClosedSection( const int theSectionIndex ) const;
96 * Set closed flag for section with given index.
97 * \param theSectionIndex index of section
98 * \param theIsClosed new closures state
100 HYDRODATA_EXPORT virtual void SetSectionClosed( const int theSectionIndex,
101 const bool theIsClosed );
104 * Removes section with given index.
105 * \param theSectionIndex index of section
107 HYDRODATA_EXPORT virtual void RemoveSection( const int theSectionIndex );
110 * Removes all sections.
112 HYDRODATA_EXPORT virtual void RemoveSections();
116 * Adds new point for section with index "theSectionIndex".
117 * \param theSectionIndex index of section
118 * \param thePoint point to add
119 * \param theBeforeIndex if not equal -1 then insert point in this pos
121 HYDRODATA_EXPORT virtual void AddPoint( const int theSectionIndex,
122 const Point& thePoint,
123 const int thePointIndex = -1 );
126 * Replaces point for section with index "theSectionIndex".
127 * \param theSectionIndex index of section
128 * \param thePoint new point
129 * \param thePointIndex index of point to replace
131 HYDRODATA_EXPORT virtual void SetPoint( const int theSectionIndex,
132 const Point& thePoint,
133 const int thePointIndex );
136 * Removes point from section with index "theSectionIndex".
137 * \param theSectionIndex index of section
138 * \param thePointIndex index of point
140 HYDRODATA_EXPORT virtual void RemovePoint( const int theSectionIndex,
141 const int thePointIndex );
145 * Returns list of points.
146 * \param theSectionIndex if not equal -1 then list of points returned
147 * only for section with this index
148 * \return list of points
150 HYDRODATA_EXPORT virtual PointsList GetPoints( const int theSectionIndex = -1 ) const;
154 friend class HYDROData_Iterator;
157 * Creates new object in the internal data structure. Use higher level objects
158 * to create objects with real content.
160 HYDRODATA_EXPORT HYDROData_ProfileUZ();
163 * Destructs properties of the object and object itself, removes it from the document.
165 HYDRODATA_EXPORT ~HYDROData_ProfileUZ();