[vtkusers] update unstructured grid

Olivier Feys olivier.feys at gmail.com
Fri Sep 29 05:01:11 EDT 2006


try

pUnstructuredGrid->Modified()

Naim wrote:
>
> 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.//
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> This is the private VTK discussion list. 
> Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>   




More information about the vtkusers mailing list