Salome HOME
Merge remote-tracking branch 'origin/pre/IMPS_2016' into BR_HYDRO_IMPS_2016
[modules/hydro.git] / src / HYDROData / HYDROData_DTM.h
index 4835cef14578d30dc088a1b6ebe8acdbfca3a4d6..0e4f746cf1286e297860640b9eae08a1fab8f326 100644 (file)
@@ -35,6 +35,8 @@ class TopoDS_Face;
 class TopoDS_Compound;
 class Handle_Geom_Plane;
 class TopTools_IndexedMapOfOrientedShape;
+class TopTools_DataMapOfShapeListOfShape;
+class TopTools_SequenceOfShape;
 
 DEFINE_STANDARD_HANDLE( HYDROData_DTM, HYDROData_Bathymetry )
 
@@ -85,11 +87,12 @@ public:
   class CurveUZ : public std::vector<PointUZ>
   {
   public:
-    CurveUZ( double theXcurv, const gp_Vec2d& theProfileDir = gp_Vec2d() );
+    CurveUZ( double theXcurv, const gp_Vec2d& theProfileDir, double theDeltaZ );
     ~CurveUZ();
 
     double Xcurv() const;
-    gp_Vec2d ProfileDir() const; 
+    gp_Vec2d ProfileDir() const;
+    double DeltaZ() const;
 
     CurveUZ operator + ( const CurveUZ& ) const;
     CurveUZ operator * ( double ) const;
@@ -97,6 +100,7 @@ public:
   private:
     double myXcurv;
     gp_Vec2d myProfileDir;
+    double myDeltaZ;
   };
 
 protected:
@@ -129,7 +133,7 @@ protected:
 
   static void CurveTo3D( const Handle_Geom2d_BSplineCurve& theHydraulicAxis,
                          const CurveUZ& theMidCurve, const CurveUZ& theWidthCurve,
-                         AltitudePoints& thePoints, double dz );
+                         AltitudePoints& thePoints );
   
   static void Interpolate( const CurveUZ& theCurveA, const CurveUZ& theCurveB, 
                            int theNbSteps, std::vector<CurveUZ>& theInterpolation,
@@ -153,7 +157,8 @@ protected:
 
   static void PointToWire(const AltitudePoints& pnts, TopoDS_Wire& W );
 
-  static void ProjWireOnPlane(const TopoDS_Wire& inpWire, const Handle_Geom_Plane& RefPlane, TopoDS_Wire& outWire);
+  static void ProjWireOnPlane(const TopoDS_Shape& inpWire, const Handle_Geom_Plane& RefPlane,
+    TopTools_DataMapOfShapeListOfShape* E2PE);
 
   static TopTools_IndexedMapOfOrientedShape Create3DShape(const AltitudePoints& left,
                                                           const AltitudePoints& right,
@@ -174,10 +179,15 @@ protected:
                              TopoDS_Shape& OutOutlet,
                              bool Create3dPres,
                              bool Create2dPres,
-                             std::set<int>& InvInd );
+                             std::set<int>& InvInd,
+                             bool& WireIntersections);
+
+  static bool Get2dFaceFrom3dPres(const TopoDS_Compound& cmp, TopoDS_Face& outF, 
+    TopTools_SequenceOfShape* Boundr = NULL, std::set<int> ind = std::set<int>() );
+  
+  static int EstimateNbPoints( const std::vector<Handle_HYDROData_Profile>& theProfiles,
+                               double theDDZ, double theSpatialStep );
 
-  static void Get2dFaceFrom3dPres(const TopoDS_Compound& cmp, TopoDS_Face& outF );
-    
   void GetPresentationShapes( TopoDS_Shape& Out3dPres,
                               TopoDS_Shape& Out2dPres,
                               TopoDS_Shape& OutLeftB,
@@ -198,7 +208,9 @@ public:
                                                        TopoDS_Shape& OutOutlet,
                                                        bool Create3dPres,
                                                        bool Create2dPres,
-                                                       std::set<int>& InvInd );
+                                                       std::set<int>& InvInd,
+                                                       int thePntsLimit,
+                                                       bool& WireIntersections);
 };