Salome HOME
SIP: HYDROData_Digue is included.
[modules/hydro.git] / src / HYDROPy / HYDROData_Stream.sip
1 // Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
2 //
3 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5 //
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
10 //
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14 // Lesser General Public License for more details.
15 //
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
19 //
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 //
22
23 %ExportedHeaderCode
24 #include "HYDROData_Stream.h"
25 %End
26
27 class HYDROData_Stream : public HYDROData_NaturalObject
28 {
29 %TypeHeaderCode
30 #include "HYDROData_Stream.h"
31 %End
32
33 public:
34   /**
35    * Update the shape presentations of stream.
36    */
37   virtual void UpdatePrs();
38
39   /**
40    * Returns default filling color for new stream.
41    */
42   static QColor DefaultFillingColor();
43
44   /**
45    * Returns default border color for new stream.
46    */
47   static QColor DefaultBorderColor();
48
49   /**
50    * Returns true if given polyline can be used as stream axis.
51    */
52   static bool IsValidAsAxis( const Handle(HYDROData_PolylineXY)& theAxis );
53
54 public:      
55   // Public methods to work with Stream presentation
56   
57   /**
58    * Returns the left edge of the stream.
59    */
60 //  virtual TopoDS_Shape GetLeftShape() const;
61
62   /**
63    * Returns the right edge of the stream.
64    */
65 //  virtual TopoDS_Shape GetRightShape() const;
66
67   /**
68    * Returns the inlet edge of the stream.
69    */
70 //  virtual TopoDS_Shape GetInletShape() const;
71
72   /**
73    * Returns the outlet edge of the stream.
74    */
75 //  virtual TopoDS_Shape GetOutletShape() const;
76
77
78 public:      
79   // Public methods to work with Stream data fields
80
81   /**
82    * Sets reference hydraulic axis object for stream.
83    */
84   virtual bool SetHydraulicAxis( const Handle(HYDROData_PolylineXY)& theAxis );
85
86   /**
87    * Returns reference hydraulic axis object of stream.
88    */
89   virtual Handle(HYDROData_PolylineXY) GetHydraulicAxis() const;
90
91   /**
92    * Remove reference hydraulic axis object from stream.
93    */
94   virtual void RemoveHydraulicAxis();
95
96   /**
97    * Returns true if profile has the intersection with the given hydraulic axis.
98    * Returns the parameter of inresection point on axis if axis is presented by one curve,
99    * if axis presented by set of edges the <outPar> returns a common length of segments till the intersection point. 
100    */
101   static bool HasIntersection( const Handle(HYDROData_PolylineXY)& theHydAxis, 
102                                                 const Handle(HYDROData_Profile)& theProfile, const TopoDS_Face& thePlane,
103                                                                                                                         Standard_Real& outPar);
104
105   /**
106    * Returns true if profile has the intersection with reference hydraulic axis.
107    * Returns the parameter of inresection point on axis if axis is presented by one curve,
108    * if axis presented by set of edges the <outPar> returns a common length of segments till the intersection point. 
109    */
110   virtual bool HasIntersection( const Handle(HYDROData_Profile)& theProfile, const TopoDS_Face& thePlane,
111                                                                                                                          Standard_Real& outPar) const;
112
113    /**
114    * Builds a planar face
115    */
116   virtual bool BuildFace( const Handle(HYDROData_PolylineXY)& theHydAxis, TopoDS_Face& thePlane) const;
117
118   /**
119    * Add new one reference profile object for stream.
120    */
121   virtual bool AddProfile( const Handle(HYDROData_Profile)& theProfile );
122
123   /**
124    * Returns all reference profile objects of stream.
125    */
126   virtual HYDROData_SequenceOfObjects GetProfiles() const;
127
128   /**
129    * Removes reference profile object from stream.
130    */
131   virtual bool RemoveProfile( const Handle(HYDROData_Profile)& theProfile );
132
133   /**
134    * Removes all reference profile objects from stream.
135    */
136   virtual void RemoveProfiles();
137   
138 protected:
139   /**
140    * Creates new object in the internal data structure. Use higher level objects 
141    * to create objects with real content.
142    */
143   HYDROData_Stream();
144
145   /**
146    * Destructs properties of the object and object itself, removes it from the document.
147    */
148   virtual ~HYDROData_Stream();
149 };