[vtkusers] resent - edge list from Delaunay triangulation [was: postprocessing vtkDelaunay2D/3D]

David, John john.david at uconn.edu
Tue Mar 4 08:11:04 EST 2008


again, this is being resent due to an appearent bounce.

------------

> You could probably use vtkExtractEdges filter
> (http://www.vtk.org/doc/nightly/html/classvtkExtractEdges.html) as part
> of a solution for item #2.

Amy, thanks to your suggestion I am able to render the edges, but was hoping get access to them in the program.  Looking up the inheritance tree I cannot figure out how to traverse through the edge list.  I did find

  vtkCellArray* vtkPolyData::GetLines ()

which should do what I want once I figure out how to export the edges.  The closest I could get is the following:

  vtkExtractEdges *extract = vtkExtractEdges::New();
    extract->SetInputConnection(d2d->GetOutputPort());

  vtkCellArray* lines = extract->GetOutput()->GetLines();
  int h = lines->GetNumberOfCells();
  cout << "# of lines = " << h << "\n";

which always returns 0.  Any suggestions on how I can traverse the edge list once I extract them?


  Thanks again and best regards,


  EBo --




-----Original Message-----
From: Amy Squillacote [mailto:ahs at cfdrc.com]
Sent: Mon 3/3/2008 2:56 PM
To: David, John
Cc: vtkusers
Subject: Re: [vtkusers] postprocessing vtkDelaunay2D/3D

You can accomplish item #1 below using the GetPointCells method on the
output of your Delaunay triangulation filter (vtkPolyData for
vtkDelaunay2D, vtkUnstructuredGrid for vtkDelaunay3D).

You could probably use vtkExtractEdges filter
(http://www.vtk.org/doc/nightly/html/classvtkExtractEdges.html) as part
of a solution for item #2.

- Amy

David, John wrote:
> Hello,
>
> I need to postprocess a Delaunay triangulation and have the following questions that I have not been able to track down:
>
>   1) given a vertex/point from the point list, is there an easy way to get a list of all triangles/tertahedra that reference that point as a vertex?
>
>   2) is there any classes which take a Delaunay triangulation and return a unique edge list?
>
>
> Thanks and best regards,
>
>   EBo --
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
>
>  

--
Amy Squillacote                    Phone: (256) 726-4839
Computer Scientist                 Fax: (256) 726-4806
CFD Research Corporation           Web: http://www.cfdrc.com
215 Wynn Drive, Suite 501
Huntsville, AL  35805






More information about the vtkusers mailing list