BUG in vtkCellLocator::FindCellsAlongLine
This issue was created automatically from an original Mantis Issue. Further discussion may take place here.
I think I have found a bug in vtkCellLocator, which is very similar to a bug, which already was fixed previously at a different location:
http://www.vtk.org/gitweb?p=VTK.git;a=commitdiff;h=07a9667a44194de355ece2380d00436c0d528bcf
There is a missing "tMax = sqrt( tMax );" after the for loop, which computes tMax (around line 1850)
This bug was fixed in the function IntersectWithLine in September 2008, by Zhanping Liu. But the fix was not applied to the function FindCellsAlongLine.
I was searching for the reason why a cell intersection was not found, even though there should have been several intersections. It seemed unlikely to be related to numerical accuracy (nearly equilateral triangles, intersection nearly in center of triangle, perpendicular to triangle). After adding the missing sqrt, the intersections were found correctly.