]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
Bug IPAL22477: TC6.3.0: Cut lines gives exception
authorouv <ouv@opencascade.com>
Tue, 10 May 2011 11:05:31 +0000 (11:05 +0000)
committerouv <ouv@opencascade.com>
Tue, 10 May 2011 11:05:31 +0000 (11:05 +0000)
src/VISU_I/VISU_CutLinesBase_i.cc

index 81fa2d4350bf04fa125e1d1280621f12f534d54e..c88f2e603c3a7721e10c490e0bce275e57071cb2 100644 (file)
@@ -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);