[vtkusers] Cell IDs in vtkUnstructuredGrid?

Dirk Fressmann dirk.fressmann at dynamore.de
Thu Oct 23 03:42:26 EDT 2008


Hi guys,

one more question to vtkUnstructuredGrid:

I am using the vtkUnstructuredGrid class to setup an arbitrary Finite 
Element mesh, like (python)

vtkGrid = vtk.vtkUnstructuredGrid()
vtkGrid.Allocate(esize,1)
vtkGrid.SetPoints(vtkNodesDef)
for el in elems:
    pts = ...   # point list (vtkIdList) defining the cell
    cellID = vtkGrid.InsertNextCell(cellType,pts)

following the API, InsertNextCell is supposed to return a new cell ID, 
but I always get 0 (in Python and C++). The result is that I always get 
0 when using the vtkCellPicker class. Is there a way to fix this?


Cheers
Dirk



More information about the vtkusers mailing list