[vtkusers] vtkCellLinks (doc) and vtkIsEdge (bug?)

lucantiga at softhome.net lucantiga at softhome.net
Fri Jan 17 15:03:23 EST 2003


Hi everyone,
I apologize if I sound insistent, but I've got no feedback about my two 
previous posts (should it tell me something? :-) ). Here they are:

1) vtkPolyData::IsEdge(vtkIdType, vtkIdType) returns 1 if two points are
on the same cell, and 0 otherwise. Quite a handy method indeed, but its
name can be misleading if you work with n-sided polygons (n>3), since to
me polygon edges are cell boundary edges. I think a caveat in IsEdge
documentation would be perfect.

2) vtkCellLinks::Reset() correctly sets MaxId to zero without freeing
memory, as for vtkCellArray. This is handy in iterations, because it
allows you to reuse the class without deallocating and reallocating the
Array. The problem is that vtkCellLinks::Reset() does not set to zero the 
elements of Array, and BuildLinks starts by calling IncrementLinkCount 
(which increments the elements of Array) for each point in cell. The 
result is that if you reuse vtkCellLinks (for example supplying another 
Connectivity cell array) after calling Reset(), your previous links will 
still be there. This sounds like a bug.

Well, that's it.
Ciao ciao

luca








More information about the vtkusers mailing list