[vtkusers] problems with GetCellNeighbors

Dominik Szczerba domi at vision.ee.ethz.ch
Mon Jun 26 11:20:50 EDT 2006


I did, no effect :(
Dominik

John Biddiscombe wrote:
> Do you have to call BuildLinks first?
> 
> Can't remember...
> 
> JB
> 
> 
> Dominik Szczerba wrote:
> 
>> Hi,
>>
>> The following code retrieves cell points, but not cell neighbours, what
>> is wrong?
>>
>>   vtkUnstructuredGrid* grid;
>>   //...
>>   for(int id=0; id<NCELLS; id++){
>>      vtkIdList* points = vtkIdList::New();
>>      vtkIdList* cells = vtkIdList::New();
>>      grid->GetCellPoints(id,points);
>>      grid->GetCellNeighbors(id,points,cells);
>>      int np = points->GetNumberOfIds();
>>      int nc = cells->GetNumberOfIds();
>>      cerr << nc << endl;// always 0
>>      points->Delete();
>>      cells->Delete();
>>   }
>>
>> thanks,
>> Dominik
>>
> 
> 

-- 
Dominik Szczerba, Dr.
Computer Vision Lab CH-8092 Zurich
http://www.vision.ee.ethz.ch/~domi



More information about the vtkusers mailing list