2 #ifndef HYDROData_Polyline3D_HeaderFile
3 #define HYDROData_Polyline3D_HeaderFile
5 #include "HYDROData_Object.h"
7 DEFINE_STANDARD_HANDLE(HYDROData_Polyline3D, HYDROData_Object)
9 class Handle(HYDROData_PolylineXY);
10 class Handle(HYDROData_ProfileUZ);
13 /**\class HYDROData_Polyline3D
17 class HYDROData_Polyline3D : public HYDROData_Object
21 typedef gp_XYZ Polyline3DPoint;
22 typedef NCollection_Sequence<Polyline3DPoint> Polyline3DPoints;
26 * Enumeration of tags corresponding to the persistent object parameters.
30 DataTag_First = HYDROData_Object::DataTag_First + 100, ///< first tag, to reserve
31 DataTag_PolylineXY, ///< reference hydraulic axis
32 DataTag_ProfileUZ, ///< reference profiles
36 DEFINE_STANDARD_RTTI(HYDROData_Polyline3D);
39 * Returns the kind of this object. Must be redefined in all objects of known type.
41 HYDRODATA_EXPORT virtual const ObjectKind GetKind() const {return KIND_POLYLINE;}
44 * Dump object to Python script representation.
46 HYDRODATA_EXPORT virtual QStringList DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const;
49 * Returns the list of all reference objects of this object.
51 HYDRODATA_EXPORT virtual HYDROData_SequenceOfObjects GetAllReferenceObjects() const;
54 * Returns the top shape of the object.
56 HYDRODATA_EXPORT virtual TopoDS_Shape GetTopShape() const;
59 * Returns the 3d shape of the object.
61 HYDRODATA_EXPORT virtual TopoDS_Shape GetShape3D() const;
64 * Update the shape presentations of stream.
65 * Call this method whenever you made changes for stream data.
67 HYDRODATA_EXPORT virtual void Update();
70 * Returns default filling color for new 3D polyline.
72 HYDRODATA_EXPORT static QColor DefaultFillingColor();
75 * Returns default border color for new 3D polyline.
77 HYDRODATA_EXPORT static QColor DefaultBorderColor();
81 // Public methods to work with 3D polyline
84 * Sets reference x,y polyline object for 3D polyline.
86 HYDRODATA_EXPORT virtual bool SetPolylineXY( const Handle(HYDROData_PolylineXY)& thePolyline );
89 * Returns reference x,y polyline object of 3D polyline.
91 HYDRODATA_EXPORT virtual Handle(HYDROData_PolylineXY) GetPolylineXY() const;
94 * Remove reference x,y polyline object from 3D polyline.
96 HYDRODATA_EXPORT virtual void RemovePolylineXY();
100 * Sets reference u,z profile object for 3D polyline.
102 HYDRODATA_EXPORT virtual bool SetProfileUZ( const Handle(HYDROData_ProfileUZ)& theProfile );
105 * Returns reference u,z profile object of 3D polyline.
107 HYDRODATA_EXPORT virtual Handle(HYDROData_ProfileUZ) GetProfileUZ() const;
110 * Remove reference u,z profile object from 3D polyline.
112 HYDRODATA_EXPORT virtual void RemoveProfileUZ();
118 * Returns default filling color for new object.
120 HYDRODATA_EXPORT virtual QColor getDefaultFillingColor() const;
123 * Returns default border color for new object.
125 HYDRODATA_EXPORT virtual QColor getDefaultBorderColor() const;
128 * Checks and if necessary create child 3D object.
129 * Reimplemented to prevent creation of 3D child object.
131 HYDRODATA_EXPORT virtual void checkAndSetObject3D() {}
136 friend class HYDROData_Iterator;
139 * Creates new object in the internal data structure. Use higher level objects
140 * to create objects with real content.
142 HYDRODATA_EXPORT HYDROData_Polyline3D();
145 * Destructs properties of the object and object itself, removes it from the document.
147 virtual HYDRODATA_EXPORT ~HYDROData_Polyline3D();