Hello,<br>I have a structured grid , and I want to put data on the different cells inside the structured grid. I know how to do for unstructured grid, but for structured grid I don't know.<br><br>For example i define my structured grid like this:<br>
vtkStructuredGrid *sgrid = vtkStructuredGrid::New();<br> sgrid->SetDimensions(x.nbnodes,y.nbnodes,z.nbnodes);<br> vtkPoints *points = vtkPoints::New(); <br> for(int k=0;k<z.nbnodes;k++)<br> for(int j=0;j<y.nbnodes;j++)<br>
for(int i=0;i<x.nbnodes;i++)<br> points->InsertNextPoint(x.nodes[i],y.nodes[j],z.nodes[k]);<br><br> sgrid->SetPoints(points);<br><br> vtkCell *cell3D = sgrid->GetCell(10);<br><br>
cell3D is a vtkHexaedron cell. So my problem is : How can I put a data value only on one of the quad cell which define cell3D ?<br><br>Thanks in advance for your help<br><br>Regards,<br>Didier<br>