2 #ifndef HYDROData_Channel_HeaderFile
3 #define HYDROData_Channel_HeaderFile
5 #include "HYDROData_ArtificialObject.h"
7 #include <TopoDS_Face.hxx>
8 #include <TopoDS_Wire.hxx>
10 class Handle(HYDROData_Polyline3D);
11 class Handle(HYDROData_Profile);
12 class TopTools_SequenceOfShape;
13 class TopTools_ListOfShape;
15 DEFINE_STANDARD_HANDLE(HYDROData_Channel, HYDROData_ArtificialObject)
17 /**\class HYDROData_Channel
21 class HYDROData_Channel : public HYDROData_ArtificialObject
29 TopoDS_Wire myLeftBank;
30 TopoDS_Wire myRightBank;
37 * Enumeration of tags corresponding to the persistent object parameters.
41 DataTag_First = HYDROData_ArtificialObject::DataTag_First + 100, ///< first tag, to reserve
48 DEFINE_STANDARD_RTTI(HYDROData_Channel);
53 * Creates the presentations(2D and 3D) by given guide line and profile.
55 HYDRODATA_EXPORT static bool CreatePresentations( const Handle(HYDROData_Polyline3D)& theGuideLine,
56 const Handle(HYDROData_Profile)& theProfile,
57 PrsDefinition& thePrs );
62 * Returns the kind of this object. Must be redefined in all objects of known type.
64 HYDRODATA_EXPORT virtual const ObjectKind GetKind() const {return KIND_CHANNEL;}
67 * Dump object to Python script representation.
69 HYDRODATA_EXPORT virtual QStringList DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const;
72 * Returns the list of all reference objects of this object.
74 HYDRODATA_EXPORT virtual HYDROData_SequenceOfObjects GetAllReferenceObjects() const;
77 * Returns the top shape of the object.
79 HYDRODATA_EXPORT virtual TopoDS_Shape GetTopShape() const;
82 * Returns the 3d shape of the object.
84 HYDRODATA_EXPORT virtual TopoDS_Shape GetShape3D() const;
87 * Update the shape presentations of stream.
88 * Call this method whenever you made changes for channel data.
90 HYDRODATA_EXPORT virtual void Update();
93 * Checks that object has 2D presentation. Reimlemented to retun true.
95 HYDRODATA_EXPORT virtual bool IsHas2dPrs() const;
98 * Returns default filling color for new channel.
100 HYDRODATA_EXPORT static QColor DefaultFillingColor();
103 * Returns default border color for new channel.
105 HYDRODATA_EXPORT static QColor DefaultBorderColor();
109 // Public methods to work with Channel
112 * Sets reference guide line object for channel.
114 HYDRODATA_EXPORT virtual bool SetGuideLine( const Handle(HYDROData_Polyline3D)& theGuideLine );
117 * Returns reference guide line object of channel.
119 HYDRODATA_EXPORT virtual Handle(HYDROData_Polyline3D) GetGuideLine() const;
122 * Remove reference guide line object from channel.
124 HYDRODATA_EXPORT virtual void RemoveGuideLine();
128 * Sets reference profile object for channel.
130 HYDRODATA_EXPORT virtual bool SetProfile( const Handle(HYDROData_Profile)& theProfile );
133 * Returns reference profile object of channel.
135 HYDRODATA_EXPORT virtual Handle(HYDROData_Profile) GetProfile() const;
138 * Remove reference profile object from channel.
140 HYDRODATA_EXPORT virtual void RemoveProfile();
146 * Returns default filling color for new object.
148 HYDRODATA_EXPORT virtual QColor getDefaultFillingColor() const;
151 * Returns default border color for new object.
153 HYDRODATA_EXPORT virtual QColor getDefaultBorderColor() const;
156 * Returns the type of child altitude object.
157 * Reimplemented to create chanel altitude object.
159 HYDRODATA_EXPORT virtual ObjectKind getAltitudeObjectType() const;
163 friend class HYDROData_Iterator;
166 * Creates new object in the internal data structure. Use higher level objects
167 * to create objects with real content.
169 HYDRODATA_EXPORT HYDROData_Channel();
172 * Destructs properties of the object and object itself, removes it from the document.
174 virtual HYDRODATA_EXPORT ~HYDROData_Channel();