[vtkusers] updating points in vtkUnstructuredGrid

Gregory Propf gregorypropf at yahoo.com
Fri Jun 1 07:43:52 EDT 2012


I already do that in the animation callback.  The grid moves as a whole.  What doesn't happen is updates to the positions of the grid points.


________________________________
 From: David Doria <daviddoria at gmail.com>
To: Gregory Propf <gregorypropf at yahoo.com> 
Cc: "vtkusers at vtk.org" <vtkusers at vtk.org> 
Sent: Friday, June 1, 2012 4:24 AM
Subject: Re: [vtkusers] updating points in vtkUnstructuredGrid
 
On Fri, Jun 1, 2012 at 4:10 AM, Gregory Propf <gregorypropf at yahoo.com> wrote:
> Can someone tell me how to get the actor for an vtkUnstructuredGrid to
> actually update (I'm doing an animation) when I change the underlying points
> with Python code like:
>
> pts = self.aPolyLineGrid.GetPoints()
>         for i in range(len(self.elementList)):
>             pts.SetPoint(i,self.elementList[i].loc.toTuple())
>
> I follow this with self.aPolyLineGrid.Update() but nothing changes on screen
> though I've verified that the points list is changing.  Oddly, when I
> use self.edgeActor.SetPosition(self.centerOfMass.x,self.centerOfMass.y,self.centerOfMass.z)

Try calling renderWindow->Render()

David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20120601/92334885/attachment.htm>


More information about the vtkusers mailing list