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);