SNL: vtkPointSet::FindCell can fail on non-convex meshes
This issue was created automatically from an original Mantis Issue. Further discussion may take place here.
I've noticed that sometimes vtkPointSet::FindCell claims it cannot find the cell containing a point, x, even though such a cell exists. I've tracked the problem down to the fact that it assumes the mesh is convex. Unfortunately, where concavities exist, there can be trouble. When FindCell calls v=FindPoint(x) and uses a mesh's reverse lookup table to find candidate cells attached to v, the cell it chooses may not have a neighbor on the face or edge closest to the input point, x. Rather than looping through the remaining cells in the reverse lookup table for v, it exits with an error.
So, I've attached a patch that loops through the remaining cells. There is some overhead as an extra vtkIdList must be created & destroyed, but the rest of the code will only be run when the old FindCell would have failed. Are there any objections to me checking in the patch?