VTk Bug16140: Add one-point line&triangle check for vtkPolyData
VTK constructs VTK_LINE
as two points. However, if reading file that
defines it with only one point, it would define the line goes from
(x,y,z) to (0,0,0) which would cause downstream problems(Ex. (0,0,0)
would fall outside of the dataset bounds since it's not in the point
dataset). So when calling vtkPolyData::BuildCell,condition checks are added
to warn the user that they are reading one-point lines.
So does the triangles.
One small concern is about the speed, but my understanding is that since numCellPts
has already been tested before, so it would be stored in CPU L1 caches/registers, which causes a minimal impact.
Issue report #16140 (closed).