From: vsr Date: Tue, 16 Jun 2009 04:57:18 +0000 (+0000) Subject: 0020064: EDF 877 VISU : NaN in scalar bar X-Git-Tag: V5_1_2rc3~3 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=fd9b835cf3a6b3a414ef3d00a76c70034e5e070a;p=modules%2Fvisu.git 0020064: EDF 877 VISU : NaN in scalar bar Print "NAN values in the presentation" error message to the terminal window in case of NAN values detection. --- diff --git a/src/PIPELINE/VISU_ColoredPL.cxx b/src/PIPELINE/VISU_ColoredPL.cxx index bc9bcd34..c7027903 100644 --- a/src/PIPELINE/VISU_ColoredPL.cxx +++ b/src/PIPELINE/VISU_ColoredPL.cxx @@ -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; diff --git a/src/PIPELINE/VISU_DeformedShapeAndScalarMapPL.cxx b/src/PIPELINE/VISU_DeformedShapeAndScalarMapPL.cxx index 194ff20b..2da76c09 100644 --- a/src/PIPELINE/VISU_DeformedShapeAndScalarMapPL.cxx +++ b/src/PIPELINE/VISU_DeformedShapeAndScalarMapPL.cxx @@ -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;