[vtkusers] vtkCellLinks issue

lucantiga at softhome.net lucantiga at softhome.net
Fri Jan 10 09:32:13 EST 2003


Hi there,
I notice that calling vtkCellLinks::Reset() and
vtkCellLinks::BuildLinks(vtkDataSet *data, vtkCellArray *Connectivity)
right after results in duplicating the links, because

 for (Connectivity->InitTraversal();
      Connectivity->GetNextCell(npts,pts);)
   {
   for (j=0; j < npts; j++)
     {
     this->IncrementLinkCount(pts[j]);
     }
   } 

is called without prior setting to zero the elements of vtkCellLinks::Array.
This can be avoided with a call to vtkCellLinks::Squeeze, but you don't 
always want to reclaim the memory and reallocate it back.
Thank you (and happy new year, just in case) 

luca 




More information about the vtkusers mailing list