vtkPolyData::BuildCells() should drop 1-point lines
This issue was created automatically from an original Mantis Issue. Further discussion may take place here.
Hi,
If a one-line line is added to vtkPolyData, ::BuildCells() will add it as a VTK_LINE cell.
This causes downstream problems, such as in vtkBoxClipDataSet.cxx, which loads each cell into a vtkGenericCell.
The act of setting the type to VTK_LINE automatically allocates space for 2 points in the cell, but, only one location is loaded into the cell, since its a single-point line.
The result is a line that goes from (x,y,z) --> (0,0,0).
The points are then loaded into a Locator, which is created with the dataset bounds... and the point (0,0,0) lays outside the bounds. This asserts() within Locator in the debug version, and causes segfaults in the release version.
So, I figure either single-point line cells should be ignored in BuildCells(), or ... ?
Thoughts?
cheers, Paul