[vtkusers] Extracting edges by using mouse

David Doria daviddoria at gmail.com
Tue Nov 29 11:13:08 EST 2011


On Wed, Dec 15, 2010 at 12:46 PM, nsarrasin
<nsarrasin at phenix-systems.com> wrote:
>
> Hi all,
>
> I would like to extract edges of a vtkPolyData by selecting them with my
> mouse.
>
> I felt on this example : VTK/Examples/Cxx/Graphs/SelectedVerticesAndEdges
> which is exactly what I want to do but it works with the
> vtkGraphLayoutView->GetRepresentation()->GetAnnotationLink()->GetCurrentSelection().
>
> So I'm actually trying to modify this example, but I can't find any similar
> methods with vtkRenderWindow in the documentation.
>
> Can someone enlighten me please ?
> Or maybe there's a completly different method for 3D ??
>
> Thx by advance.

That example is for vtkGraph - vtkPolyData is pretty different. What
kind of "edges" are you looking for? The lines that are the
intersection/connection of two polygons? If so, I don't think these
things actually "exist" - you'd have to create them with
vtkExtractEdges first:

http://www.vtk.org/Wiki/VTK/Examples/Cxx/Meshes/ExtractEdges

David



More information about the vtkusers mailing list