Salome HOME
Comments moved.
[modules/hydro.git] / src / HYDROData / HYDROData_Stream.h
index 4c09d9d5e6341a1d0a313909eca7108310f5b97e..e7bec1950525accfbaba3acdfa31092779f17533 100644 (file)
@@ -4,10 +4,12 @@
 
 #include "HYDROData_NaturalObject.h"
 #include <TopoDS_Face.hxx>
+#include <Geom_BSplineCurve.hxx>
 DEFINE_STANDARD_HANDLE(HYDROData_Stream, HYDROData_NaturalObject)
 
 class Handle(HYDROData_PolylineXY);
 class Handle(HYDROData_Profile);
+class TColStd_Array1OfReal;
 
 /**\class HYDROData_Stream
  * \brief 
@@ -24,6 +26,7 @@ protected:
     DataTag_First = HYDROData_NaturalObject::DataTag_First + 100, ///< first tag, to reserve
     DataTag_HydraulicAxis,     ///< reference hydraulic axis
     DataTag_Profile,           ///< reference profiles
+    DataTag_ParamsArray        ///< parameters array
   };
 
 public:
@@ -60,6 +63,16 @@ public:
    */
   HYDRODATA_EXPORT virtual void Update();
 
+  /**
+   * Returns default filling color for new stream.
+   */
+  HYDRODATA_EXPORT static QColor DefaultFillingColor();
+
+  /**
+   * Returns default border color for new stream.
+   */
+  HYDRODATA_EXPORT static QColor DefaultBorderColor();
+
 
 public:      
   // Public methods to work with Stream
@@ -88,6 +101,10 @@ public:
   HYDRODATA_EXPORT virtual bool HasIntersection( const Handle(HYDROData_Profile)& theProfile, const TopoDS_Face& thePlane,
                                                                                                Standard_Real& outPar) const;
 
+   /**
+   * Builds a planar face
+   */
+  HYDRODATA_EXPORT virtual bool BuildFace( const Handle(HYDROData_PolylineXY)& theHydAxis, TopoDS_Face& thePlane) const;
 
   /**
    * Add new one reference profile object for stream.
@@ -108,20 +125,47 @@ public:
    * Removes all reference profile objects from stream.
    */
   HYDRODATA_EXPORT virtual void RemoveProfiles();
-
-
+  
 protected:
 
   /**
    * Insert one profile in to the stream profiles order.
    */
-  void insertProfileInToOrder( const Handle(HYDROData_Profile)& theProfile );
+  void insertProfileInToOrder( const Handle(HYDROData_Profile)& theProfile,
+                               const int                        theBeforeIndex = -1 );
 
   /**
    * Fully recompute the order of all profiles in accordance with reference hydraulic axis.
    * If hydraulic axis is not set all profiles will be removed from order.
    */
   void updateProfilesOrder();
+  
+  /**
+   * Builds b-spline using interpolation algorithm.
+   */
+  Handle(Geom_BSplineCurve) buildInterpolationCurve(const   Handle(TColgp_HArray1OfPnt)& theArrayOfPnt);
+
+  /**
+   * Returns default filling color for new object.
+   */
+  HYDRODATA_EXPORT virtual QColor getDefaultFillingColor() const;
+
+  /**
+   * Returns default border color for new object.
+   */
+  HYDRODATA_EXPORT virtual QColor getDefaultBorderColor() const;
+
+private:
+  
+  void setParametersArray( const TColStd_Array1OfReal& theArray );
+
+  TColStd_Array1OfReal* getParametersArray() const;
+
+  void removeParametersArray();
+
+  int insertParameter( const Standard_Real& theParam );
+
+  void removeParameter( const int& theIndex );
 
 protected: