<div dir="ltr">It is that someone is changing the data in the cell array but not marking them modified. In OpenGL2 I look at the mtime of a cell array to determine if I need to rebuild and re-upload that array. If points change I rebuild the VBO, if a cell array changes I rebuild the the relavent IBO. The result of that is that if someone changes the points or cells without marking the array as modified they do not get rebuilt/uploaded. <div><br></div><div>So </div><div><br></div><div>polydata->GetPoints()->SetTuple(0,0,0,0);</div><div>ren->Render();</div><div><br></div><div>will not work. Nor will</div><div><br></div><div><div>polydata->GetPoints()->SetTuple(0,0,0,0);</div><div>polydata->Modified();</div><div>ren->Render();</div></div><div><br></div><div>you actually need to mark as modified the VTK object you modified for it to work. In this case</div><div><div><div><br></div><div>polydata->GetPoints()->SetTuple(0,0,0,0);</div><div>polydata->GetPoints()->Modified();</div><div>ren->Render();</div></div><div><br></div></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br><div><br></div><div><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Aug 15, 2016 at 2:36 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">Can you provide a bit more detail? Who's MTime is important in this case? Note that vtkPolyData does not take into account the MTime of the underlying vtkCellArrays when computing its own MTime. So if the MTime of the polydata is becoming stale, simply calling Modified() on it should be sufficient. As far as I can tell, vtkCellArray does nothing with MTime.</div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Aug 15, 2016 at 1:25 PM, Shawn Waldon <span dir="ltr"><<a href="mailto:shawn.waldon@kitware.com" target="_blank">shawn.waldon@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>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?<span><font color="#888888"><br><br></font></span></div><span><font color="#888888">Shawn<br></font></span></div><div><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><div><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>
</div></div></blockquote></div><br></div>
<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/<wbr>opensource/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/<wbr>mailman/listinfo/vtk-<wbr>developers</a><br>
<br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">Ken Martin PhD<div>Chairman & CFO<br>Kitware Inc.<br>28 Corporate Drive<br>Clifton Park NY 12065<br>518 371 3971<div><br></div><div><span style="font-size:10pt;font-family:Tahoma,sans-serif">This communication,
including all attachments, contains confidential and legally privileged
information, and it is intended only for the use of the addressee.  Access to this email by anyone else is
unauthorized. If you are not the intended recipient, any disclosure, copying,
distribution or any action taken in reliance on it is prohibited and may be
unlawful. If you received this communication in error please notify us
immediately and destroy the original message. 
Thank you.</span></div></div></div>
</div>