Salome HOME
patch for install error on Linux
[modules/hydro.git] / src / HYDROData / HYDROData_DTM.h
index fec5fe05e3855d5b418ba49a780b146fb98ed4c7..2a60f75a9335caa10c45e3b01fb009dc37f35ec0 100644 (file)
@@ -21,6 +21,7 @@
 
 #include "HYDROData_Bathymetry.h"
 #include <vector>
+#include <set>
 #include <gp_Pnt2d.hxx>
 
 class Handle_HYDROData_Profile;
@@ -84,11 +85,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;
@@ -96,6 +98,7 @@ public:
   private:
     double myXcurv;
     gp_Vec2d myProfileDir;
+    double myDeltaZ;
   };
 
 protected:
@@ -123,11 +126,12 @@ protected:
                                      double theXCurv, double theMinZ, double theMaxZ, double theDDZ,
                                      CurveUZ& theMidPointCurve,
                                      CurveUZ& theWidthCurve,
+                                     int& intersection_nb,
                                      double theTolerance = 1E-6 );
 
   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,
@@ -139,13 +143,15 @@ protected:
       double theXCurvA,
       const Handle_HYDROData_Profile& theProfileB,
       double theXCurvB,
-      double theDDZ, int theNbSteps, bool isAddSecond );
+      double theDDZ, int theNbSteps, bool isAddSecond,
+      int& inter_nb_1, int& inter_nb_2 );
 
   static AltitudePoints Interpolate( const std::vector<Handle_HYDROData_Profile>& theProfiles,
                                      double theDDZ, double theSpatialStep,
                                      AltitudePoints& theLeft,
                                      AltitudePoints& theRight,
-                                     std::vector<AltitudePoints>& theMainProfiles );
+                                     std::vector<AltitudePoints>& theMainProfiles,
+                                     std::set<int>& invalInd );
 
   static void PointToWire(const AltitudePoints& pnts, TopoDS_Wire& W );
 
@@ -169,10 +175,15 @@ protected:
                              TopoDS_Shape& OutInlet,
                              TopoDS_Shape& OutOutlet,
                              bool Create3dPres,
-                             bool Create2dPres );
+                             bool Create2dPres,
+                             std::set<int>& InvInd,
+                             bool& WireIntersections);
+
+  static bool Get2dFaceFrom3dPres(const TopoDS_Compound& cmp, TopoDS_Face& outF );
+  
+  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,
@@ -182,17 +193,20 @@ protected:
 public:
 
   HYDRODATA_EXPORT static void CreateProfilesFromDTM ( const HYDROData_SequenceOfObjects& InpProfiles,
-                                      double ddz,
-                                      double step, 
-                                      AltitudePoints& points,
-                                      TopoDS_Shape& Out3dPres,
-                                      TopoDS_Shape& Out2dPres,
-                                      TopoDS_Shape& OutLeftB,
-                                      TopoDS_Shape& OutRightB,
-                                      TopoDS_Shape& OutInlet,
-                                      TopoDS_Shape& OutOutlet,
-                                      bool Create3dPres,
-                                      bool Create2dPres );
+                                                       double ddz,
+                                                       double step, 
+                                                       AltitudePoints& points,
+                                                       TopoDS_Shape& Out3dPres,
+                                                       TopoDS_Shape& Out2dPres,
+                                                       TopoDS_Shape& OutLeftB,
+                                                       TopoDS_Shape& OutRightB,
+                                                       TopoDS_Shape& OutInlet,
+                                                       TopoDS_Shape& OutOutlet,
+                                                       bool Create3dPres,
+                                                       bool Create2dPres,
+                                                       std::set<int>& InvInd,
+                                                       int thePntsLimit,
+                                                       bool& WireIntersections);
 };