[vtk-developers] vtkPointSet::FindCell() bug/misfeature

David C. Thompson dcthomp at sandia.gov
Wed Jul 13 22:25:09 EDT 2005


Hi,
	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?

	David
-------------- next part --------------
A non-text attachment was scrubbed...
Name: betterFindCell.patch
Type: text/x-patch
Size: 3643 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20050713/7fc2ecaa/attachment-0001.bin>


More information about the vtk-developers mailing list