[vtk-developers] Generic method for getting a sub-cell

David Gobbi david.gobbi at gmail.com
Thu Apr 1 13:40:52 EDT 2010


Hi All,

Would it be possible to add a generic method for getting a sub-cell from a cell?

vtkCell *cell->GetSubCell(int subId);
void cell->GetSubCell(int subId, vtkGenericCell *subCell);

Even better would be an easy way of iterating through the sub-cells in
a vtkDataSet directly:

data->GetNumberOfSubCells(vtkIdType cellId);
data->GetSubCell(vtkIdType cellId, int subId, vtkGenericCell *subCell);

There are several times when I've had to add special cases to my code
to handle triangle strips, and if there was a generic method for
getting sub-cells, my code could be a lot simpler.

   David



More information about the vtk-developers mailing list