Salome HOME
Lot 2: change bathy associated to natural object propagated to all cases without...
[modules/hydro.git] / src / HYDROData / HYDROData_DTM.cxx
index ec4537bbfb6f28359997262732b5f7572683913a..7cf256fc472db88d0a48453d766203b70ca1bde0 100644 (file)
@@ -824,7 +824,7 @@ void HYDROData_DTM::ProfileDiscretization( const Handle(HYDROData_Profile)& theP
   for( double z1 = theMinZ; z1 <= theMaxZ; z1 += theDDZ )
   {
     Handle(Geom2d_Line) aLine = new Geom2d_Line( gp_Pnt2d( 0, z1 ), gp_Dir2d( 1, 0 ) );
-    std::set<double> intersections;
+    std::set<double> intersections;    //TODO the solutions should be treated with some epsilon~1e-8 (computation error of intersector)
     Bnd_Box2d intersect_bndbox;
     for( size_t i = 0; i < n; i++ )
     {
@@ -864,7 +864,8 @@ void HYDROData_DTM::ProfileDiscretization( const Handle(HYDROData_Profile)& theP
     }
     double xmin, ymin, xmax, ymax;
     intersect_bndbox.Get(xmin, ymin, xmax, ymax);
-    if (Abs(xmax-xmin)>PREC)
+    //if (Abs(xmax-xmin)>PREC)
+    if (intersection_nb >= 1)
     {
       double u_mid, u_wid;
       if( !CalcMidWidth( intersect_bndbox, u_mid, u_wid ) )