<div dir="ltr"><div><div>Hi Paul,<br><br></div>I have a potential fix for this bug at <a href="http://review.source.kitware.com/#/t/5040/">http://review.source.kitware.com/#/t/5040/</a>. It feels like a hack but I couldn't figure out a better way to do it yet. I also modified a test to verify that the proper cells were getting removed, based on the cell's points.<br><br>If you see a better way to do this, please let me know.<br><br>Thanks,<br></div>Andy<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Nov 17, 2014 at 5:37 PM, Andy Bauer <span dir="ltr"><<a href="mailto:andy.bauer@kitware.com" target="_blank">andy.bauer@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div>Hi Paul,<br><br></div>Thanks for the input. I'm at SC14 right now so I won't be able to look at this until I get back.<br><br></div>Cheers,<br>Andy<br></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Nov 17, 2014 at 4:26 AM, Paul Edwards <span dir="ltr"><<a href="mailto:paul.m.edwards@gmail.com" target="_blank">paul.m.edwards@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Andy,<br>
<br>
I've attached a sample program demonstrating the issue.  The example<br>
just loads the sphere.vtk file, removes all cells where the "Result"<br>
value is not 0 and writes the result to output.vtk.  The tar file also<br>
contains the correct and incorrect output.<br>
<br>
Best regards,<br>
Paul<br>
<div><div><br>
On 15 November 2014 02:59, Andy Bauer <<a href="mailto:andy.bauer@kitware.com" target="_blank">andy.bauer@kitware.com</a>> wrote:<br>
> Hi Paul,<br>
><br>
> I was part of that fix and I think it's correct. There may have been more to<br>
> that fix though since it took a couple of shots before getting it correct so<br>
> the git history may not be as pristine as desired. If you can give me more<br>
> specifics on the bug though I can try to see what's going on with it. If I<br>
> remember correctly though, that fix had to do with the fact that some places<br>
> thought that the order of iterating through cells in a vtkPolyData was first<br>
> through all vertex cells, then all line cells, then all polys and finally<br>
> through all triangle strips, irregardless of the order that cells got<br>
> inserted in (i.e. using InsertNextCell()). The reality is that for polydata<br>
> that cells are indeed iterated through in their insertion order. The test<br>
> that was added for those changes hopefully shows the proper functionality<br>
> along with associated cell data manipulations as well.<br>
><br>
> Regards,<br>
> Andy<br>
><br>
><br>
><br>
> On Thu, Nov 13, 2014 at 1:55 PM, Paul Edwards <<a href="mailto:paul.m.edwards@gmail.com" target="_blank">paul.m.edwards@gmail.com</a>><br>
> wrote:<br>
>><br>
>> Hi,<br>
>><br>
>> I've just noticed an issue with vtkPolyData.  I had been calling<br>
>> vtkPolyData::DeleteCell to remove the unwanted cells, followed by a<br>
>> call to vtkPolyData::RemoveDeletedCells.  The result is not as it<br>
>> should be in the latest version.  To fix I just started reverting<br>
>> previous commits.  I tracked it down to the following:<br>
>><br>
>> bugfix 14459: Iterating through polydata cells incorrectly.<br>
>> commit: 44131c6d05375692af8b6b38cf4291983bdd8f45<br>
>><br>
>> Sorry but I do not have time to provide a test case or track where in<br>
>> this commit lies the problem.  I just thought I would give details<br>
>> here in case anyone else notices the same problem and is searching for<br>
>> a solution.<br>
>><br>
>> Best regards,<br>
>> Paul<br>
>> _______________________________________________<br>
>> Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
>><br>
>> Visit other Kitware open-source projects at<br>
>> <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
>><br>
>> Please keep messages on-topic and check the VTK FAQ at:<br>
>> <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
>><br>
>> Follow this link to subscribe/unsubscribe:<br>
>> <a href="http://public.kitware.com/mailman/listinfo/vtkusers" target="_blank">http://public.kitware.com/mailman/listinfo/vtkusers</a><br>
><br>
><br>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>