MantisBT - VTK
View Issue Details
0012659VTK(No Category)public2011-10-15 17:352013-04-05 20:30
Bryn Lloyd 
Andy Bauer 
normalminorhave not tried
closedfixed 
5.8.0 
 
Release
incorrect functionality
0012659: BUG in vtkCellLocator::FindCellsAlongLine
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.
No tags attached.
cxx test-CellLocatorBug.cxx (4,210) 2011-10-31 16:40
https://www.vtk.org/Bug/file/9055/test-CellLocatorBug.cxx
png faulty.png (34,022) 2011-10-31 16:42
https://www.vtk.org/Bug/file/9056/faulty.png
png

png fixed.png (34,141) 2011-10-31 16:42
https://www.vtk.org/Bug/file/9057/fixed.png
png
Issue History
2011-10-15 17:35Bryn LloydNew Issue
2011-10-30 18:08Andy BauerNote Added: 0027624
2011-10-31 16:40Bryn LloydFile Added: test-CellLocatorBug.cxx
2011-10-31 16:42Bryn LloydFile Added: faulty.png
2011-10-31 16:42Bryn LloydFile Added: fixed.png
2011-10-31 16:45Bryn LloydNote Added: 0027631
2011-11-28 11:46Andy BauerNote Added: 0027736
2011-11-28 11:46Andy BauerAssigned To => Andy Bauer
2011-11-28 11:46Andy BauerStatusbacklog => tabled
2011-11-28 11:46Andy BauerStatustabled => active development
2011-11-28 11:46Andy BauerResolutionopen => fixed
2011-11-29 23:13Andy BauerStatusactive development => gatekeeper review
2011-11-29 23:15Andy BauerNote Added: 0027746
2011-11-29 23:15Andy BauerStatusgatekeeper review => customer review
2011-12-02 14:28Andy BauerNote Added: 0027766
2013-04-05 20:30Berk GeveciStatuscustomer review => closed

Notes
(0027624)
Andy Bauer   
2011-10-30 18:08   
Can you share your example that fails without the fix and passes with the fix? I'm not that familiar with this but can take a look at it if you get me pointed in the right direction.
(0027631)
Bryn Lloyd   
2011-10-31 16:45   
Hi Andy

I lost the original test data. But using a random search (see the attached code) I quickly found a case, which reproduces the bug. The screenshots also illustrate the reproduced case.

It would be great if the fix could be in the next release.

Thanks
Bryn
(0027736)
Andy Bauer   
2011-11-28 11:46   
This has been fixed in VTK. I still need to make the fix available for the VTK that ParaView points to.
(0027746)
Andy Bauer   
2011-11-29 23:15   
Please verify that this is working properly now. If it isn't please reopen the issue. If it is please close the issue.
(0027766)
Andy Bauer   
2011-12-02 14:28   
This has now been fixed in the paraview repo as well -- http://paraview.org/Bug/view.php?id=12750 [^]