Salome HOME
merge V5_1_4
[modules/smesh.git] / src / StdMeshersGUI / StdMeshersGUI_DistrPreview.cxx
index b3b101afb23997cb9de410761ec028a2092e4bd7..fb493741754333b6b4b9ecb9d0daa7a51014236f 100644 (file)
@@ -50,6 +50,8 @@
 #ifdef WIN32
 # include <algorithm>
 #endif
+#include <math.h>
+#include <limits>
 
 #include <Basics_Utils.hxx>
 
@@ -262,6 +264,15 @@ void StdMeshersGUI_DistrPreview::update()
       showError();
       return;
     }
+#ifdef WIN32
+    if ( std::fabs(y[i]) >= HUGE_VAL)
+      y[i] = HUGE_VAL/100.;
+#else
+    if ( isinf(y[i]))
+      y[i] = std::numeric_limits<double>::max()/100.;
+#endif
+//     if ( y[i] > 1e3 )
+//       y[i] = 1e3;
     if( i==0 || y[i]<min_y )
       min_y = y[i];
     if( i==0 || y[i]>max_y )