[vtkusers] ActiViz C# | Get Cells of a Polydata | Get Points of every cell in PolyData
Matias Montroull
matimontg at gmail.com
Wed Jan 15 11:45:09 EST 2014
Hi,
I'm trying to get the Cells out of a PolyData. So far I've done this:
vtkCellArray Cellarray = new vtkCellArray();
Cellarray = polys.GetPolys(); //where polys is a vtkpolydata
instance
int numcells = Cellarray.GetNumberOfCells(); //I get the
number of cells, I want to iterate through each cell..
I've done this:
vtkIdList idlist = new vtkIdList();
Cellarray.InitTraversal();
for (int j = 0; j < polys.GetNumberOfPolys(); j++)
{
Cellarray.GetNextCell(idlist);
double a = idlist.GetId(0);
double b = idlist.GetId(1);
double c = idlist.GetId(2);
}
but I don't get the points in the cell, what I'm doing wrong?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20140115/292ccab1/attachment.html>
More information about the vtkusers
mailing list