From: ouv Date: Tue, 10 May 2011 11:05:31 +0000 (+0000) Subject: Bug IPAL22477: TC6.3.0: Cut lines gives exception X-Git-Tag: V6_3_BR20110512~2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=c1dc5128a5e449873acef2a1af4cd6cc829e6af9;p=modules%2Fvisu.git Bug IPAL22477: TC6.3.0: Cut lines gives exception --- 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);