<div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><br></div><div class="gmail_quote">On Mon, Jul 9, 2012 at 9:01 AM, Gonzalo Amadio <span dir="ltr">&lt;<a href="mailto:gonzaloamadio@gmail.com" target="_blank">gonzaloamadio@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello, <div><br></div><div>Is there a good way of deleting scalars from a polydata?</div><div><br></div><div><br></div>
<div>My problem is that I am iterating over the cells of a polydata, and in each iteration I want to use a different set of scalars.</div>

<div>So, in each iterarion I do :</div><div><br></div><div><div>   surface-&gt;GetCellData()-&gt;SetScalars(myScalarArray);</div><div><br></div><div>But I think I have to delete the scalars of the previous iteration, so I have only the last array of scalars.</div>


<div><br></div><div><br></div><div><br></div><div>Another point of view of the question would be :</div><div>doing</div><div><br></div><div>   surface-&gt;GetCellData()-&gt;SetScalars(array1);</div><div>   surface-&gt;GetCellData()-&gt;SetScalars(array2);</div>


<div><br></div><div>is the same as only</div><div><br></div><div>   surface-&gt;GetCellData()-&gt;SetScalars(array2); ?</div><div><br></div><div>or the result of the first case would lead to have the scalars in &quot;array1&quot; plus the scalars in &quot;array2&quot; and not only the scalars in &quot;array2&quot;.</div>


<div><br></div><div>Thank you.!</div></div></blockquote><div><br></div><div>I believe you are correct that</div><div style="font-size:13px;color:rgb(34,34,34);font-family:arial,sans-serif;background-color:rgb(255,255,255)">
   surface-&gt;GetCellData()-&gt;SetScalars(array1);</div><div style="font-size:13px;color:rgb(34,34,34);font-family:arial,sans-serif;background-color:rgb(255,255,255)">   surface-&gt;GetCellData()-&gt;SetScalars(array2);</div>
<div style="font-size:13px;color:rgb(34,34,34);font-family:arial,sans-serif;background-color:rgb(255,255,255)"><br></div><div style="font-size:13px;color:rgb(34,34,34);font-family:arial,sans-serif;background-color:rgb(255,255,255)">
is the same as only</div><div style="font-size:13px;color:rgb(34,34,34);font-family:arial,sans-serif;background-color:rgb(255,255,255)"><br></div><div style="font-size:13px;color:rgb(34,34,34);font-family:arial,sans-serif;background-color:rgb(255,255,255)">
   surface-&gt;GetCellData()-&gt;SetScalars(array2);</div><div style="font-size:13px;color:rgb(34,34,34);font-family:arial,sans-serif;background-color:rgb(255,255,255)"><br></div><div style="background-color:rgb(255,255,255)">
<font color="#222222" face="arial, sans-serif">it should just be setting a pointer, so overwriting the pointer would not concatenate the data, but just change it.</font></div><br><div>David </div></div>