[vtkusers] update unstructured grid

Naim naim at electromagneticworks.com
Fri Sep 29 10:40:59 EDT 2006


Yes John, but the results still not correct.

Thanks for your help.

 

 

Naim Himrane

Electromagneticworks Inc.

  _____  

From: John Platt [mailto:jcplatt at dsl.pipex.com] 
Sent: September 28, 2006 4:49 PM
To: 'Naim'
Cc: vtkusers at vtk.org
Subject: RE: [vtkusers] update unstructured grid

 

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/20060929/df6bde9a/attachment.htm>


More information about the vtkusers mailing list