Hi !<br>Maybe I am an old-fashion programmer, but I don&#39;t think you are allowed to initialized an array in this way. The braces should delimit constant values... The best I can remember, the compiler should outputs errors for your line :<br>
<br>double Tuple[3] = {xm_array -&gt; GetValue(i), ym_array -&gt; GetValue(i), 0.0};<br><br>Which one do you use?<br><br>Then for your specific problem, I recommend you to use the InsertNextTupleValue from vtkDoubleArray instead of InsertNextTuple, that is a pure virtual function of the parent class vtkDataArray.<br>
<br>I hope expert programmers will take a look at this !<br><br>Best regards,<br><br>Jerome<br><br><br><div class="gmail_quote">2009/3/15 Natalie Happenhofer <span dir="ltr">&lt;<a href="mailto:nataliehapp@hotmail.com">nataliehapp@hotmail.com</a>&gt;</span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">



<div>
Hi!<br>I´d like to set a vtkDoubleArray with 3 Components, it should be a vector array, the code looks like this:<br><br><br>vtkDoubleArray* momentum = vtkDoubleArray::New();<br>momentum -&gt; SetNumberOfTuples(numOfTuples);<br>
momentum -&gt; SetNumberOfComponents(3);<br><br>for(vtkIdType i = 0; i &lt; numOfTuples; i++)<br>    {double Tuple[3] = {xm_array -&gt; GetValue(i), ym_array -&gt; GetValue(i), 0.0};<br><br>     momentum -&gt; InsertNextTuple(Tuple);<br>
    }<br><br>Executing the code, I get the following error:<br>&quot; Point array Momentum with 3 components, has 78520 tuples but there are only 58890 points&quot;<br><br>numOfTuples just has the value 58890, it should not be inserting more tuples than that.. ?<br>
<br>thx, <br>Natalie<br><br><br><hr>Casi 50 razones para tener el nuevo Messenger. <a href="http://www.nuevomessenger2009.com/" target="_blank">¡Conócelas aquí y bájate el nuevo!</a></div>
<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 <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 ParaView Wiki at: <a href="http://paraview.org/Wiki/ParaView" target="_blank">http://paraview.org/Wiki/ParaView</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.paraview.org/mailman/listinfo/paraview" target="_blank">http://www.paraview.org/mailman/listinfo/paraview</a><br>
<br></blockquote></div><br>