It seems that FindClosestPoint (both versions) ocasionally produce incorrect points - where FindClosestNPoints works correctly every time. Here is sample code and the data file it is intended to work with. The correct index of the closest point is 1, but FindClosestPoint returns 121. I heard there was a known issue caused by some floating point rounding or something along those lines, but these points are VERY far apart (the squared distance to the target point for the correct closest point is ~9 and for the incorrect closest point is ~3722).<br>
<br>Here is the code and the data set:<br><a href="http://rpi.edu/%7Edoriad/VTK_List/ClosestPointBug/" target="_blank">http://rpi.edu/~doriad/VTK_List/ClosestPointBug/</a><br><br>I am using the latest CVS VTK. This seems to be a VERY big problem (potentially breaking many peoples code without them even knowing about it?) if I haven't done anything wrong. Can anyone confirm or deny? I will put it on Mantis if I don't hear people shouting that I just did something incorrectly! haha<br>

<br>Thanks,<br><br>David<br>