Hi everyone,<div><br></div><div>I have a 3D triangular mesh (vtkPolyData) and what I want to do is to compute the N-ring neighbors of each vertex in the mesh. By N-ring of neighbors I mean the set of neighbors within a distance of N (integer) edges from the vertex being evaluated.</div>
<div><br></div><div>I&#39;ve already came up with an implementation (Python) that comprises two steps:</div><div>1. First get the set of 1-ring neighbors of each vertex, using GetPointCells and GetCellPoints methods of vtkPolyData. This implementation is really fast.</div>
<div>2. To compute the N-ring neighbors I simply iterate on each vertex and its set of 1-ring neighbors and repeat the procedure until I obtain the complete set of N-ring neighbors.</div><div><br></div><div>Step 2 uses nested loops and depending on the value of N and the size of the mesh it can take quite A LOT.</div>
<div><br></div><div>So my question is: is there any implementation, or vtk class, that allows the FAST computation of such N-ring neighborhood?</div><div><br></div><div>Thanks for any suggestion,</div><div>Miguel</div>