<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;"><DIV>Hi everyone.</DIV>
<DIV>I want to save the values of the points of a polydata in an array and then access to each one. I used this:</DIV>
<DIV> </DIV>
<DIV>double curveValue;<BR>vtkDoubleArray *myArray;<BR>for (int i=0; i<myPolydata->GetNumberOfPoints(); i++)<BR>{<BR> myArray[i] = myPolyData->GetPoints()->GetPoint(i); <BR> curveValue = myArray->GetValue(i);</DIV>
<DIV>}</DIV>
<DIV> </DIV>
<DIV>I have this error:</DIV>
<DIV>binary '=' : no operator defined which takes a right-hand operand of type 'double *' </DIV>
<DIV> </DIV>
<DIV>When i change the array type to 'vtkDataArray', i have this code:</DIV>
<DIV>double *curveValue;<BR>vtkDataArray *myArray = myPolyData->GetPoints()->GetData(); <BR>for (int i=0; i<myPolyData->GetNumberOfPoints(); i++)<BR>{<BR> curveValue = myArray->GetTuple(i);</DIV>
<DIV>}</DIV>
<DIV> </DIV>
<DIV>I have no more errors, but when i run the program, i have a bug and the cursor indicates this line:</DIV>
<DIV>vtkDataArray *myArray = myPolyData->GetPoints()->GetData(); <BR></DIV>
<DIV> </DIV>
<DIV>I don't understand any one of the 2 error cases!!!</DIV>
<DIV>Please, can someone tell me what type of array should i use? and how to rectify the code <BR>to have no more errors?</DIV>
<DIV> </DIV>
<DIV>Thank you for you help</DIV></td></tr></table><br>