Hello,I have been reading and reading this piece of code but cannot figure out 
what is wrong!I create a couple of cells of 4 ids and get...anything but what 
is expected.Please tell me where I am wrong!
  vtkCellArray *faces = vtkCellArray::New();  vtkIdList *fIds = 
vtkIdList::New();  for (int i=0 ; i<faceIds.size() ; i++) {    for (int j=0 ; 
j<faceIds[i].size() ; j++)      fIds->InsertNextId(faceIds[i][j]);    
faces->InsertNextCell(fIds);    printf("cell %d has %d ids\n", i, 
fIds->GetNumberOfIds());    fIds->Reset();  }  for (int i=0 ; 
i<faces->GetNumberOfCells() ; i++) {    vtkIdList *list = vtkIdList::New();    
faces->GetCell(i, list);    printf("cell %d has %d ids\n", i, 
list->GetNumberOfIds());  }
cell 0 has 4 idscell 1 has 4 idscell 2 has 4 idscell 3 has 4 idscell 4 has 4 
idscell 5 has 4 idscell 6 has 4 idscell 7 has 4 idscell 8 has 4 idscell 9 has 4 
idscell 10 has 4 idscell 11 has 4 idscell 12 has 4 idscell 13 has 4 idscell 14 
has 4 idscell 15 has 4 idscell 16 has 4 idscell 17 has 4 idscell 18 has 4 
idscell 19 has 4 ids
cell 0 has 4 idscell 1 has 64 idscell 2 has 71 idscell 3 has 113 idscell 4 has 
120 idscell 5 has 4 idscell 6 has 63 idscell 7 has 64 idscell 8 has 112 idscell 
9 has 113 idscell 10 has 4 idscell 11 has 64 idscell 12 has 63 idscell 13 has 
71 idscell 14 has 70 idscell 15 has 4 idscell 16 has 71 idscell 17 has 78 
idscell 18 has 120 idscell 19 has 127 ids
                                          
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the ParaView Wiki at: 
http://paraview.org/Wiki/ParaView

Follow this link to subscribe/unsubscribe:
http://www.paraview.org/mailman/listinfo/paraview

Reply via email to