[Paraview] problems setting vtkDoubleArray with 3 components

Natalie Happenhofer nataliehapp at hotmail.com
Sun Mar 15 14:09:39 EDT 2009


Hi!
I´d like to set a vtkDoubleArray with 3 Components, it should be a vector array, the code looks like this:


vtkDoubleArray* momentum = vtkDoubleArray::New();
momentum -> SetNumberOfTuples(numOfTuples);
momentum -> SetNumberOfComponents(3);

for(vtkIdType i = 0; i < numOfTuples; i++)
    {double Tuple[3] = {xm_array -> GetValue(i), ym_array -> GetValue(i), 0.0};

     momentum -> InsertNextTuple(Tuple);
    }

Executing the code, I get the following error:
" Point array Momentum with 3 components, has 78520 tuples but there are only 58890 points"

numOfTuples just has the value 58890, it should not be inserting more tuples than that.. ?

thx, 
Natalie


_________________________________________________________________
¿Quieres saber cómo va a estar el clima mañana? Ingresa ahora a MSN
http://tiempo.latam.msn.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20090315/92a43b10/attachment.htm>


More information about the ParaView mailing list