[vtkusers] vtkCellPicker returns wrong cell id

Matjaz Subelj matjaz at lecad.uni-lj.si
Mon Feb 12 05:37:28 EST 2001


Hi,

I found a situation where vtkCellPicker doesn't return the right cell 
id when picking vertex cells in vtkPolyData. This happens when the first 
cell in the cell array is empty i.e. when there are no points associated 
with it and you pick the last cell in the array. The id returned is 0, 
because vtkPolyData::GetCell (int, vtkGenericCell *) doesn't set cell 
type to VTK_EMPTY_CELL when the cell is actualy empty. 
I attached c++ source demonstrating this. When you pick the blue vertex
the id printed on console is 0 instead of 4.

I know that documentation of vtkPolyData doesn't say anything about
supporting vtkEmptyCell so I'm not sure if I'm not missusing it.
Please, do let me know... 

Oh, another thing. Did anybody notice that you dont get any
visual output when there is only one point to visualize?

-Matjaz




More information about the vtkusers mailing list