[vtkusers] Get neighboring points of a point in a polydata

David Doria daviddoria+vtk at gmail.com
Fri Aug 14 07:31:50 EDT 2009


On Thu, Aug 13, 2009 at 10:41 AM, Yang, Jinzhong <jinzhong76 at gmail.com>wrote:

>  Didn’t you check the methods GetPointCells() and Get CellPoints()? If the
> cells are simply the triangles or lines, it is quite easy to do that. If the
> cells are more complicated, you may need some additional processing.
>
>
>
> -Jinzhong
>
>
>
Jinzhong - thanks for the reply, but please reply to the list rather than
just me so everyone can share the discussion :)

I see, so do something like this:

GetPointNeighbors()
---------------------
cells = GetPointCells(queryPoint)
for each cell in cells
   points = GetCellPoints()
   for each point in points
       IsEdge(queryPoint, point)

Can that be added as function to vtkPolyData? It seems like this would be a
very common operation.

Thanks,

David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20090814/dac01a73/attachment.htm>


More information about the vtkusers mailing list