[vtkusers] How can I get the IDs of points connected to a single point (first-order neighbors) of polydata.
David.Pont at ForestResearch.co.nz
David.Pont at ForestResearch.co.nz
Tue Oct 29 15:36:15 EST 2002
> How can I get the IDs of points connected to a single point (first-order
neighbors) of polydata.
Hi Mike,
Just took a quick look at the documentation for vtkPolyData, I am using
vtk 3.1 but probably the following is valid in later versions:
Use BuildLinks to allow topological queries. Use GetPointCells with the
target point to get all cells that point belongs to. For each cell use
GetCellPoints to get the list of points used by the cell. For each point,
(if it is not the target point) use IsEdge with the target point and the
current candidate point, if true add this point to a list. That list should
be the set of first-order neighbours. Something like that anyway...
regards, Dave Pont
More information about the vtkusers
mailing list