[vtkusers] update unstructured grid

Naim naim at electromagneticworks.com
Fri Sep 29 10:50:04 EDT 2006


Hi Olivier,

I try it, but the results still the same.
I try also calling Modified() and/or Update() functions for all pipeline
objects, it still not working. May be there is a bug when we update an
unstructured grid 's scalars inside the pipeline connections (sources,
filters and mappers).

Thank you.

Naim Himrane
Electromagneticworks Inc.

-----Original Message-----
From: Olivier Feys [mailto:olivier.feys at gmail.com] 
Sent: September 29, 2006 5:01 AM
To: Naim
Cc: vtkusers at public.kitware.com
Subject: Re: [vtkusers] update unstructured grid


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