[vtkusers] traversing a vtkPolyData

Luca Pamparana luca.pamparana at gmail.com
Mon Aug 6 13:37:23 EDT 2007


Hello everyone,

I am having trouble understanding how to traverse a vtkPolyData object.

I am cutting through a 3D volume using a vtkPlane as the implicit function
and the vtkCutter.

Now, I am assuming the vtkCutter will give me 0, 1 or more polygons. What I
would like to do is access the vertices of each of these polygons.

So, my pipeline is as follows

vtkPlane * plane = vtkPlane::New();
plane->SetOrigin(x, y, z);
plane->SetNormal(0, 0, 1);

vtkVutter * cutter = vtkCutter::New();
cutter->SetCutFunction(plane);
cutter->Update();

vtkPolyData * out = cutter->GetOutput();

Now what I want to do is traverse this output and get all the vertices of
all the polygons in this vtkPolyData.

Can anyone tell me how one can go about doing that? I would be really
grateful.

Thanks!
Luca
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20070806/219ac803/attachment.htm>


More information about the vtkusers mailing list