]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
0020064: EDF 877 VISU : NaN in scalar bar
authorvsr <vsr@opencascade.com>
Tue, 16 Jun 2009 04:57:18 +0000 (04:57 +0000)
committervsr <vsr@opencascade.com>
Tue, 16 Jun 2009 04:57:18 +0000 (04:57 +0000)
Print "NAN values in the presentation" error message to the terminal window in case of NAN values detection.

src/PIPELINE/VISU_ColoredPL.cxx
src/PIPELINE/VISU_DeformedShapeAndScalarMapPL.cxx

index bc9bcd34c41fc15d5fa752697488d86186ed5b7f..c7027903e2755055070260663e2680933f630f20 100644 (file)
@@ -170,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;
   
index 194ff20ba4565d9f22382ea97ee05aff1aa827d2..2da76c099d091acea9427c1654b6d5442f1892c8 100644 (file)
@@ -435,7 +435,7 @@ VISU_DeformedShapeAndScalarMapPL
 ::SetScalarRange(vtkFloatingPointType theRange[2])
 {
   if (isnan(theRange[0]) || isnan(theRange[1]))
-    throw std::runtime_error("Arithmetic exception detected");
+    throw std::runtime_error("NAN values in the presentation");
 
   if(VISU::CheckIsSameRange(theRange, GetScalarRange()))
     return;