[vtkusers] How to traverse edges in vtkPolyData?

David Doria daviddoria+vtk at gmail.com
Sun Mar 28 17:02:57 EDT 2010


2010/3/28 Андрей Траченко <goodrone at gmail.com>

> Hello,
> given a vtkPolyData, how to traverse all edges in it? While
> traversing, how to get ids of cells containing each edge?
>
> There is a precondition: the polydata is either a planar triangular
> mesh, or a planar quadrangular mesh.
>
> Thank you for your time,
> Andew
>
>
I added some code to this example:
http://www.vtk.org/Wiki/VTK/Examples/ExtractEdges

to show to how to traverse the edges obtained using vtkExtractEdges. I'm not
sure how you would get the cell that each edge came from, sorry. I imagine
you'd have to edit vtkExtractEdges to append an optional "SourceCellId" type
of array to the output.

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


More information about the vtkusers mailing list