From c1dc5128a5e449873acef2a1af4cd6cc829e6af9 Mon Sep 17 00:00:00 2001 From: ouv Date: Tue, 10 May 2011 11:05:31 +0000 Subject: [PATCH] Bug IPAL22477: TC6.3.0: Cut lines gives exception --- src/VISU_I/VISU_CutLinesBase_i.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/VISU_I/VISU_CutLinesBase_i.cc b/src/VISU_I/VISU_CutLinesBase_i.cc index 81fa2d43..c88f2e60 100644 --- a/src/VISU_I/VISU_CutLinesBase_i.cc +++ b/src/VISU_I/VISU_CutLinesBase_i.cc @@ -440,15 +440,15 @@ VISU::CutLinesBase_i aXContIter = aXCont.end(); aXContIter--; vtkFloatingPointType aMaxDist = *aXContIter; - if(aMaxDist <= aMinDist) - throw std::runtime_error("CutPlanes_i::BuildTableOfReal aMaxDist <= aMinDist !!!"); + if(aMaxDist < aMinDist) + throw std::runtime_error("CutPlanes_i::BuildTableOfReal aMaxDist < aMinDist !!!"); aXContIter = aXCont.begin(); for(long i = 0; aXContIter != aXCont.end(); aXContIter++, i++){ vtkFloatingPointType aDist = *aXContIter; vtkFloatingPointType aXVal = aDist; if(theIsCutSegment){ aXVal -= aMinDist; - if(!IsUseAbsoluteLength()) + if(!IsUseAbsoluteLength() && fabs(aMaxDist - aMinDist) > EPS_machine) aXVal /= (aMaxDist - aMinDist); } aTableOfReal->PutValue(aXVal,1,i+1); -- 2.39.2