[vtkusers] vtkAppendPolyData bug

Jeff Baumes jeff.baumes at kitware.com
Wed Dec 16 09:41:29 EST 2009


On Wed, Dec 16, 2009 at 8:57 AM, David Doria <daviddoria+vtk at gmail.com> wrote:
>> 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
>>
>
> Or even
> if (numPts == 0)
> ?
>
> By make sure the filter code can handle no cells, is that covered by
> "just make sure all tests still pass"? Or did you have some certain
> demo in mind that I'd need to perform?

I'm suggesting a new test that e.g. creates a polydata with 10 points
and 10 cells, and one that just contains 10 points, append them, check
if the resulting polydata has 20 points and 10 cells.

Jeff



More information about the vtkusers mailing list