using namespace VISU;
using namespace std;
+static float EPS_machine = 1.0E-7;
+
#ifdef _DEBUG_
static int MYDEBUG = 0;
#else
for(int i = 0; i < aNbPoints; i++){
aDataSet->GetPoint(i,aPnt);
Sub(aPnt,aBasePnt,aVect);
- aDist = vtkMath::Dot(aVect,aDirLn) / aBoundPrjLn[2];
- // the workaround
- if(aDist < 0.0) aDist = 0.0;
- if(aDist > 1.0) aDist = 1.0;
+ if ( fabs(aBoundPrjLn[2]) < EPS_machine )
+ aDist = 0.5;
+ else
+ {
+ aDist = vtkMath::Dot(aVect,aDirLn) / aBoundPrjLn[2];
+ // the workaround
+ if(aDist < 0.0) aDist = 0.0;
+ if(aDist > 1.0) aDist = 1.0;
+ }
aXYMap[aDist] = aScalars->GetTuple1(i);
}
if(aFilter){