<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
</style>
</head>
<body class='hmmessage'>
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>&nbsp;&nbsp;&nbsp; {double Tuple[3] = {xm_array -&gt; GetValue(i), ym_array -&gt; GetValue(i), 0.0};<br><br>&nbsp;&nbsp;&nbsp;&nbsp; momentum -&gt; InsertNextTuple(Tuple);<br>&nbsp;&nbsp;&nbsp; }<br><br>Executing the code, I get the following error:<br>" Point array Momentum with 3 components, has 78520 tuples but there are only 58890 points"<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='_new'>¡Conócelas aquí y bájate el nuevo!</a></body>
</html>