<div dir="ltr"><div>Thanks David & Berk,<br><br>Ok, I'll add a commit to my branch to update the docs and add you as reviewers.  I have a follow-up question though:  vtkPolyData::ReplaceCell.  This function figures out which cell array the cell is in and then calls ReplaceCell on that one.  It can be in Verts, Lines, Polys, or Strips.  So the caller may not know which cell array to call Modified on.  What should we do in this case?<br><br></div>Shawn<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Aug 15, 2016 at 12:55 PM, Berk Geveci <span dir="ltr"><<a href="mailto:berk.geveci@kitware.com" target="_blank">berk.geveci@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">I agree with David.</div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Aug 15, 2016 at 12:54 PM, David Cole via vtk-developers <span dir="ltr"><<a href="mailto:vtk-developers@vtk.org" target="_blank">vtk-developers@vtk.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I don't specifically know the answer to this one, but in general,<br>
these sorts of things are on purpose for performance in VTK.<br>
<br>
If you want to replace 100 (or even more) cells, you'd want<br>
ReplaceCell NOT to call Modified, and just do it once at the end of<br>
your bulk replacement. I'd be surprised if somebody chimed in and<br>
contradicted this... so I would think just fixing the docs is the<br>
right way to go here.<br>
<br>
<br>
HTH,<br>
David C.<br>
<div><div><br>
<br>
On Mon, Aug 15, 2016 at 11:59 AM, Shawn Waldon <<a href="mailto:shawn.waldon@kitware.com" target="_blank">shawn.waldon@kitware.com</a>> wrote:<br>
> Hi all,<br>
><br>
> I have been tracking down a bug in the vtkBoxRepresentation where the<br>
> selected face never updated.  The issue was that the widget was calling<br>
> ReplaceCell on the vtkCellArray for the selected face polydata, but never<br>
> calling Modified() on the cell array (though it did call Modified() on the<br>
> polydata).  With the new OpenGL backend this matters.  The documentation for<br>
> ReplaceCell doesn't say that you have to do this afterward and the writer of<br>
> vtkBoxRepresentation used that documentation.<br>
><br>
> So my question is this: why doesn't ReplaceCell mark the cell array as<br>
> modified? Is this a bug or on purpose for performance reasons?  I will<br>
> update the docs or fix ReplaceCell once I know which is wrong.<br>
><br>
> Thank you,<br>
> Shawn<br>
><br>
</div></div>> ______________________________<wbr>_________________<br>
> Powered by <a href="http://www.kitware.com" rel="noreferrer" 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" rel="noreferrer" target="_blank">http://www.kitware.com/opensou<wbr>rce/opensource.html</a><br>
><br>
> Search the list archives at: <a href="http://markmail.org/search/?q=vtk-developers" rel="noreferrer" target="_blank">http://markmail.org/search/?q=<wbr>vtk-developers</a><br>
><br>
> Follow this link to subscribe/unsubscribe:<br>
> <a href="http://public.kitware.com/mailman/listinfo/vtk-developers" rel="noreferrer" target="_blank">http://public.kitware.com/mail<wbr>man/listinfo/vtk-developers</a><br>
><br>
><br>
______________________________<wbr>_________________<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensou<wbr>rce/opensource.html</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=vtk-developers" rel="noreferrer" target="_blank">http://markmail.org/search/?q=<wbr>vtk-developers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/vtk-developers" rel="noreferrer" target="_blank">http://public.kitware.com/mail<wbr>man/listinfo/vtk-developers</a><br>
<br>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>