[vtkusers] GetEdge() on a vtkUnstructuredGrid?

David Doria daviddoria at gmail.com
Thu Oct 28 15:46:25 EDT 2010


On Thu, Oct 28, 2010 at 3:35 PM, Nico Schlömer <nico.schloemer at gmail.com>wrote:

> Hi,
>
> I'm importing VTK files with unstructured grids into and I noticed one
> particular oddity about it: there is GetCell() and GetPoint() on vtk
> meshes, but no such thing as GetEdge(). As a matter of fact, it'd be
> terribly useful to have a notion of an edge as well. Right now I get
> edges on a cell level which works alright, but duplicates the
> information as each edge belongs to two cells (2D mesh).
>
> Anyone with more insight here?
>
> Cheers,
> Nic


The IsEdge function (in vtkPolyData) will tell you if there is an edge
between two points:
http://www.vtk.org/doc/nightly/html/classvtkPolyData.html#ab53e657c8db698aa88109ada1762dff8

Is this what you are looking for? Or do you somehow want to get an "edge"
object? It doesn't seem to exist for an vtkUnstructuredGrid. It shouldn't be
too hard to add using the logic from the function in vtkPolyData or
something like the GetConnectedVertices function here:
http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/VertexConnectivity
<http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/VertexConnectivity>
David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20101028/33674eeb/attachment.htm>


More information about the vtkusers mailing list