vtkTriangle::IntersectWithLine
This issue was created automatically from an original Mantis Issue. Further discussion may take place here.
line 508 if (this->EvaluatePosition(x, closestPoint, subId, pcoords, dist2, weights) >= 0) { if ( dist2 <= tol2 ) { pcoords[2] = 0.0; return 1; } }
doesn't allow for the case that x is outside the triangle and outside the tolerance in which case the method should return 0.
Something like this does:
switch (this->EvaluatePosition(x, closestPoint, subId, pcoords, dist2, weights)) { case 0: if ( dist2 <= tol2 ) { pcoords[2] = 0.0; return 1; } return 0; case 1: return 1; }