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;}
34 * Dump object to Python script representation.
36 HYDRODATA_EXPORT virtual QStringList DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const;
41 * Returns the 3D presentation of all points.
43 HYDRODATA_EXPORT virtual TopoDS_Shape GetShape() const;
46 * Returns the depth for given distance.
48 HYDRODATA_EXPORT static double GetDepthFromDistance( const PointsList& thePoints,
49 const double& theDistance );
53 * Returns number of sections.
55 HYDRODATA_EXPORT virtual int NbSections() const;
58 * Adds new one section.
59 * \param theSectName name of the section
60 * \param theSectionType type of section
61 * \param theIsClosed flag indicates closures of section
63 HYDRODATA_EXPORT virtual void AddSection( const TCollection_AsciiString& theSectName,
64 const SectionType theSectionType,
65 const bool theIsClosed );
68 * Returns name of section with given index.
69 * \param theSectionIndex index of section
71 HYDRODATA_EXPORT virtual TCollection_AsciiString GetSectionName( const int theSectionIndex ) const;
74 * Set name for section with given index.
75 * \param theSectionIndex index of section
76 * \param theSectionName new section name
78 HYDRODATA_EXPORT virtual void SetSectionName( const int theSectionIndex,
79 const TCollection_AsciiString& theSectionName );
82 * Returns type of section with given index.
83 * \param theSectionIndex index of section
85 HYDRODATA_EXPORT virtual SectionType GetSectionType( const int theSectionIndex ) const;
88 * Set type for section with given index.
89 * \param theSectionIndex index of section
90 * \param theSectionType new section type
92 HYDRODATA_EXPORT virtual void SetSectionType( const int theSectionIndex,
93 const SectionType theSectionType );
96 * Returns true if section with given index is closed.
97 * \param theSectionIndex index of section
99 HYDRODATA_EXPORT virtual bool IsClosedSection( const int theSectionIndex ) const;
102 * Set closed flag for section with given index.
103 * \param theSectionIndex index of section
104 * \param theIsClosed new closures state
106 HYDRODATA_EXPORT virtual void SetSectionClosed( const int theSectionIndex,
107 const bool theIsClosed );
110 * Removes section with given index.
111 * \param theSectionIndex index of section
113 HYDRODATA_EXPORT virtual void RemoveSection( const int theSectionIndex );
116 * Removes all sections.
118 HYDRODATA_EXPORT virtual void RemoveSections();
122 * Adds new point for section with index "theSectionIndex".
123 * \param theSectionIndex index of section
124 * \param thePoint point to add
125 * \param theBeforeIndex if not equal -1 then insert point in this pos
127 HYDRODATA_EXPORT virtual void AddPoint( const int theSectionIndex,
128 const Point& thePoint,
129 const int thePointIndex = -1 );
132 * Replaces point for section with index "theSectionIndex".
133 * \param theSectionIndex index of section
134 * \param thePoint new point
135 * \param thePointIndex index of point to replace
137 HYDRODATA_EXPORT virtual void SetPoint( const int theSectionIndex,
138 const Point& thePoint,
139 const int thePointIndex );
142 * Removes point from section with index "theSectionIndex".
143 * \param theSectionIndex index of section
144 * \param thePointIndex index of point
146 HYDRODATA_EXPORT virtual void RemovePoint( const int theSectionIndex,
147 const int thePointIndex );
151 * Returns list of points.
152 * \param theSectionIndex if not equal -1 then list of points returned
153 * only for section with this index
154 * \return list of points
156 HYDRODATA_EXPORT virtual PointsList GetPoints( const int theSectionIndex = -1 ) const;
160 friend class HYDROData_Iterator;
163 * Creates new object in the internal data structure. Use higher level objects
164 * to create objects with real content.
166 HYDRODATA_EXPORT HYDROData_ProfileUZ();
169 * Destructs properties of the object and object itself, removes it from the document.
171 HYDRODATA_EXPORT ~HYDROData_ProfileUZ();