Hi everyone,<br>I wrote the code below to reach the normals one by one,<br><br><br>vtkPolyDataNormals *norm= vtkPolyDataNormals::New();<br> norm->SetInput(pd);<br> norm->FlipNormalsOff();<br> norm->SetComputePointNormals(1);<br> norm->Update();<br> vtkPolyData *vtknorm=norm->GetOutput();<br> vtkPointData *normpoints=vtknorm->GetPointData();<br> vtkDataArray *arraynorm= normpoints->GetNormals();<br> int k=vtknorm->GetNumberOfPoints();<br> for(int i=0;k;i++)<br> { <br> double* nrm= arraynorm->GetTuple3(i);<br> //nrm=arraynorm->GetTuple3(i);<br> printf("%f %f %f \n",(float)nrm[0],(float)nrm[1],(float)nrm[2]);<br> }<br><br>k is
307200, ý have 307200 points in vtkPolyData structure.<br>but in this double* nrm= arraynorm->GetTuple3(i); I have access violation exception.I must find the normals of each point.Please help me<br><br>Kiv<br><p> 
<hr size=1>Never miss a thing. <a href="http://us.rd.yahoo.com/evt=51438/*http://www.yahoo.com/r/hs"> Make Yahoo your homepage.</a>