[vtkusers] update unstructured grid

Naim naim at electromagneticworks.com
Thu Sep 28 16:13:46 EDT 2006


Hi vtkUsers,  

 

I need help how to update an unstructured grid?

I change the scalars and I call "update" and/or "modified" functions, but
the results are wrong.

 

I create pScalars (vtkDoubleArray)

pUnstructuredGrid->GetPointData()->SetScalars(pScalars);

.

I show the plot. The plot is fine.

   

I change the scalars like this:

for(long i = 0; i < Size; ++i)

{             

        aNodeValue = pPlotData[i];  // new scalars data             

        pScalars->SetValue(i, aNodeValue);                      

}   

pScalars->Update(); // or pScalars->Modified();

pUnstructuredGrid->GetPointData()->SetScalars(pScalars);

 

.

I show the plot but the results are not correct.

 

 

Please any idea.

 

 

Naim Himrane

Electromagneticworks Inc.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20060928/891a7fa8/attachment.htm>


More information about the vtkusers mailing list