[vtkusers] Re: How do I get triangles from the vtkPolyData that vtkDelaunay2D produces?
Grant Edwards
grante at visi.com
Tue Sep 4 11:38:11 EDT 2007
On 2007-09-03, Sylvain Jaume <sylvain.jaume at kitware.com> wrote:
> Hi Edwards,
>
> You can use:
>
> vtkIdType npts, *pts;
>
> o->GetPolys()->InitTraversal();
>
> while(o->GetPolys()->GetNextCell(npts,pts))
> {
> cout << "triangle [" << pts[0] << " " << pts[1] << " " << pts[2] << "]" << endl;
> }
Thanks for the example.
The Python binding of the vtk library doesn't support the
GetNextCell() and GetCell() methods for the vtkCellArray object
returned by o->GetPolys(). Is there any other way to get the
triangle info out?
--
Grant Edwards grante Yow! FROZEN ENTREES may
at be flung by members of
visi.com opposing SWANSON SECTS ...
More information about the vtkusers
mailing list