[vtkusers] vtkAppendPolyData bug
Jeff Baumes
jeff.baumes at kitware.com
Wed Dec 16 08:51:44 EST 2009
On Tue, Dec 15, 2009 at 8:39 PM, David Doria <daviddoria+vtk at gmail.com> wrote:
> At line 239 in vtkAppendPolyData.cxx, there is:
>
> if ( numPts < 1 || numCells < 1 )
> {
> vtkDebugMacro(<<"No data to append!");
> return 1;
> }
>
> this prevents the polydata's from being appended if there are no
> cells, even if there are points. I think it should be changed to
> if ( numPts < 1 && numCells < 1 )
>
> so that only if there are no points and no cells it should fail.
>
> Anyone agree/disagree?
It seems if you are going to change it, it should be to
if ( numPts < 1 )
Having no points infers that there are no cells, correct? So &&-ing
the second conditional is superfluous.
I think it makes sense to change it, provided that you test it to make
sure the filter code can handle cases where there are no cells.
Jeff
More information about the vtkusers
mailing list