[vtkusers] update unstructured grid

John Platt jcplatt at dsl.pipex.com
Thu Sep 28 16:48:55 EDT 2006


Hi Naim,

 

Have you tried pUnstructuredGrid->Update() before setting the scalars?

 

HTH

 

John. 

 

 

-----Original Message-----
From: vtkusers-bounces+jcplatt=dsl.pipex.com at vtk.org
[mailto:vtkusers-bounces+jcplatt=dsl.pipex.com at vtk.org] On Behalf Of
Naim
Sent: 28 September 2006 21:14
To: vtkusers at public.kitware.com
Subject: [vtkusers] update unstructured grid

 

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/31b5a651/attachment.htm>


More information about the vtkusers mailing list