Salome HOME
patch for problems on SALOME 8.2.0
[modules/hydro.git] / src / HYDROData / HYDROData_Stream.h
index 7abc7c299b94730c6b3a22911b830413b201de6e..923c23f55fe73a390c9809a133781348a4d08793 100644 (file)
 #include <Geom_BSplineCurve.hxx>
 #include <vector>
 
-DEFINE_STANDARD_HANDLE(HYDROData_Stream, HYDROData_NaturalObject)
-
-class Handle(HYDROData_PolylineXY);
-class Handle(HYDROData_Polyline3D);
-class Handle(HYDROData_Profile);
+class HYDROData_DTM;
+class HYDROData_PolylineXY;
+class HYDROData_Polyline3D;
+class HYDROData_Profile;
 class HYDROData_IProfilesInterpolator;
-class TColStd_Array1OfReal;
-class Handle(TopTools_HArray1OfShape);
-class Handle_HYDROData_DTM;
-class TopTools_ListOfShape;
+class TopTools_HArray1OfShape;
 
 
 /**\class HYDROData_Stream
@@ -52,10 +48,10 @@ public:
   {
     TopoDS_Shape myPrs3D;
     TopoDS_Shape myPrs2D;
-    TopoDS_Edge  myLeftBank;   // 3d curve of the left bank
-    TopoDS_Edge  myRightBank;  // 3d curve of the right bank
-    TopoDS_Edge  myInlet;      // first (inlet) 2d profile 
-    TopoDS_Edge  myOutlet;     // last (inlet) 2d profile 
+    TopoDS_Wire  myLeftBank;   // 3d curve of the left bank
+    TopoDS_Wire  myRightBank;  // 3d curve of the right bank
+    TopoDS_Wire  myInlet;      // first (inlet) 2d profile 
+    TopoDS_Wire  myOutlet;     // last (inlet) 2d profile 
   };
 
 protected:
@@ -72,25 +68,20 @@ protected:
   };
 
 public:
-
-  DEFINE_STANDARD_RTTI(HYDROData_Stream);
+  DEFINE_STANDARD_RTTIEXT(HYDROData_Stream, HYDROData_NaturalObject);
 
 public:
 
   /**
    * Creates the presentations(2D and 3D) by given hydraulic axis and profiles.
    */
-  HYDRODATA_EXPORT static bool CreatePresentations( const Handle_HYDROData_DTM& theDTM,
-                                                    PrsDefinition&              thePrs );
+  HYDRODATA_EXPORT static bool CreatePresentations( const Handle(HYDROData_DTM)& theDTM,
+                                                    PrsDefinition&               thePrs );
 
-  /**
-   * Creates the presentations(2D and 3D) by given first points, last points and profiles.
-   * If 2D profiles is null - they will not used in the presentation.
-   */
-  HYDRODATA_EXPORT static bool CreatePresentations( const TopoDS_Edge&          theLeftBank,
-                                                    const TopoDS_Edge&          theRightBank,
-                                                    const std::vector<TopoDS_Wire>& theProfiles3d,
-                                                    PrsDefinition&              thePrs );
+  HYDRODATA_EXPORT static void CreatePresentations( const Handle(TColgp_HArray1OfPnt)     theArrayOfFPnt,
+                                                    const Handle(TColgp_HArray1OfPnt)     theArrayOfLPnt,
+                                                    const Handle(TopTools_HArray1OfShape) theArrOfProfiles,
+                                                    PrsDefinition&                        thePrs );
 
 public:
 
@@ -124,7 +115,7 @@ public:
   /**
    * Update the shape presentations of stream.
    */
-  HYDRODATA_EXPORT void UpdatePrs( const Handle_HYDROData_DTM& );
+  HYDRODATA_EXPORT void UpdatePrs( const Handle(HYDROData_DTM)& );
 
   /**
    *
@@ -212,8 +203,7 @@ public:
   /**
   * Builds a planar face
   */
-  HYDRODATA_EXPORT static bool BuildFace( const Handle(HYDROData_PolylineXY)& theHydAxis,
-                                          TopoDS_Face&                        thePlane );
+  HYDRODATA_EXPORT static void BuildRefFace( TopoDS_Face& thePlane );
 
   /**
    * Add new one reference profile object for stream.
@@ -301,7 +291,7 @@ protected:
 
 private:
   
-  void setParametersArray( const TColStd_Array1OfReal& theArray );
+  void setParametersArray( const QVector<double>& theArray );
 
   TColStd_Array1OfReal* getParametersArray() const;
 
@@ -311,7 +301,7 @@ private:
 
   void removeParameter( const int& theIndex );
 
-  Handle_HYDROData_DTM DTM() const;
+  Handle(HYDROData_DTM) DTM() const;
 
 
 protected: