Salome HOME
0020871: EDF 1411 SMESH: Distribution with analytical density crashes Salome
authoreap <eap@opencascade.com>
Wed, 12 May 2010 08:05:52 +0000 (08:05 +0000)
committereap <eap@opencascade.com>
Wed, 12 May 2010 08:05:52 +0000 (08:05 +0000)
   * avoid passing infinite value to qwt

src/StdMeshersGUI/StdMeshersGUI_DistrPreview.cxx

index b3b101afb23997cb9de410761ec028a2092e4bd7..1c3a179a986637ba5b24d7ee5e83e9657b41db3d 100644 (file)
@@ -50,6 +50,7 @@
 #ifdef WIN32
 # include <algorithm>
 #endif
+#include <math.h>
 
 #include <Basics_Utils.hxx>
 
@@ -262,6 +263,10 @@ void StdMeshersGUI_DistrPreview::update()
       showError();
       return;
     }
+    if ( isinf(y[i]))
+      y[i] = std::numeric_limits<double>::max()/100.;
+//     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 )