[vtkusers] Get neighboring points of a point in a polydata
David Doria
daviddoria+vtk at gmail.com
Thu Aug 13 10:18:37 EDT 2009
I would like to get a list of all the points that point A is connected to
(via edges of a mesh - if a polydata with triangle cells can be interpreted
like that?). It looks like I could call
BuildLinks<http://www.vtk.org/doc/release/4.0/html/classvtkPolyData.html#a36>()
and then
IsEdge <http://www.vtk.org/doc/release/4.0/html/classvtkPolyData.html#a43>(A,
int v2) where v2 would loop over all other points in the polydata and
then collect all of the points which IsEdge returned true - but that seems
horribly inefficient. I guess you could get the cell that the point belongs
to, get the cell's neighbor cells, then test IsEdge with all of those cell's
points - is this the best way to go? Can we add that idea (if it doesn't
already exist and I'm missing it!) as a GetPointNeighbors() (following
along, since GetCellNeighbors() already exists) to vtkPolyData?
Thanks,
David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20090813/911c4f84/attachment.htm>
More information about the vtkusers
mailing list