Salome HOME
IMP 0017328: min and max scalar map of results given at gauss points. A fix for the...
[modules/visu.git] / src / PIPELINE / VISU_ColoredPL.cxx
index d1b88f139cec4be3b4553fbf646f22bba3e924b7..c7027903e2755055070260663e2680933f630f20 100644 (file)
 #include <vtkPassThroughFilter.h>
 #include <vtkDoubleArray.h>
 
+#ifdef WNT
+#include <float.h>
+#define isnan _isnan
+#endif
 
 //----------------------------------------------------------------------------
 VISU_ColoredPL
@@ -166,6 +170,9 @@ void
 VISU_ColoredPL
 ::SetScalarRange( vtkFloatingPointType theRange[2] )
 {
+  if (isnan(theRange[0]) || isnan(theRange[1]))
+    throw std::runtime_error("NAN values in the presentation");
+
   if ( theRange[0] > theRange[1] ) 
     return;
   
@@ -498,7 +505,7 @@ VISU_ColoredPL
   myExtractor->GetOutput()->GetScalarRange( theRange );
   
   if (isnan(theRange[0]) || isnan(theRange[1]))
-    throw std::runtime_error("Arithmetic exception detected");
+    throw std::runtime_error("NAN values in the presentation");
 }
 
 void