[vtkusers] Fwd: Bug in vtkPolyData

Paul Edwards paul.m.edwards at gmail.com
Mon Nov 17 04:26:01 EST 2014


Hi Andy,

I've attached a sample program demonstrating the issue.  The example
just loads the sphere.vtk file, removes all cells where the "Result"
value is not 0 and writes the result to output.vtk.  The tar file also
contains the correct and incorrect output.

Best regards,
Paul

On 15 November 2014 02:59, Andy Bauer <andy.bauer at kitware.com> wrote:
> Hi Paul,
>
> I was part of that fix and I think it's correct. There may have been more to
> that fix though since it took a couple of shots before getting it correct so
> the git history may not be as pristine as desired. If you can give me more
> specifics on the bug though I can try to see what's going on with it. If I
> remember correctly though, that fix had to do with the fact that some places
> thought that the order of iterating through cells in a vtkPolyData was first
> through all vertex cells, then all line cells, then all polys and finally
> through all triangle strips, irregardless of the order that cells got
> inserted in (i.e. using InsertNextCell()). The reality is that for polydata
> that cells are indeed iterated through in their insertion order. The test
> that was added for those changes hopefully shows the proper functionality
> along with associated cell data manipulations as well.
>
> Regards,
> Andy
>
>
>
> On Thu, Nov 13, 2014 at 1:55 PM, Paul Edwards <paul.m.edwards at gmail.com>
> wrote:
>>
>> Hi,
>>
>> I've just noticed an issue with vtkPolyData.  I had been calling
>> vtkPolyData::DeleteCell to remove the unwanted cells, followed by a
>> call to vtkPolyData::RemoveDeletedCells.  The result is not as it
>> should be in the latest version.  To fix I just started reverting
>> previous commits.  I tracked it down to the following:
>>
>> bugfix 14459: Iterating through polydata cells incorrectly.
>> commit: 44131c6d05375692af8b6b38cf4291983bdd8f45
>>
>> Sorry but I do not have time to provide a test case or track where in
>> this commit lies the problem.  I just thought I would give details
>> here in case anyone else notices the same problem and is searching for
>> a solution.
>>
>> Best regards,
>> Paul
>> _______________________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Please keep messages on-topic and check the VTK FAQ at:
>> http://www.vtk.org/Wiki/VTK_FAQ
>>
>> Follow this link to subscribe/unsubscribe:
>> http://public.kitware.com/mailman/listinfo/vtkusers
>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vtkDeleteCellBug.tgz
Type: application/x-gzip
Size: 17890 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20141117/1f024929/attachment.bin>


More information about the vtkusers mailing list