if(MYDEBUG) MESSAGE("CutPlanes_i::BuildTableOfReal iLine = "<<iLine<<"; aNbPoints = "<<aNbPoints);
aLineIdCont[iLine] = jLine++;
TXYMap& aXYMap = aXYMapCont[iLine];
- vtkFloatingPointType aPnt[3], aVect[3], aDist, aTopBnd;
+ vtkFloatingPointType aPnt[3], aVect[3], aDist, aTopBnd, aDivide;
aTopBnd = aBoundPrjLn[2];
+ aDivide = aBoundPrjLn[2];
if( !IsUseAbsoluteLength() ){
aTopBnd = 1.0;
}
+ else aDivide = 1.0;
+
for(int i = 0; i < aNbPoints; i++){
aDataSet->GetPoint(i,aPnt);
Sub(aPnt,aBasePnt,aVect);
aDist = 0.5;
else
{
- aDist = vtkMath::Dot(aVect,aDirLn)/aTopBnd;
+ aDist = vtkMath::Dot(aVect,aDirLn)/aDivide;
// the workaround
if(aDist < 0.0) aDist = 0.0;
if(aDist > aTopBnd) aDist = aTopBnd;
// Warning: value '1.0' come from workaround:
// see also aDist = vtkMath::Dot(aVect,aDirLn) / aBoundPrjLn[2];
// aDist >= 0 and aDist<=1.0
- aNewXYMap[1.0 - *aIter] = aXYMap[*aIter];
+ vtkFloatingPointType aTopBnd = aBoundPrjLn[2];
+ if( !IsUseAbsoluteLength() ){
+ aTopBnd = 1.0;
+ }
+ aNewXYMap[aTopBnd - *aIter] = aXYMap[*aIter];
}
TXYMap::const_iterator aNewXYMapIter = aNewXYMap.begin();
aXYMap.clear();