[vtkusers] updating points in vtkUnstructuredGrid

David Doria daviddoria at gmail.com
Fri Jun 1 07:24:04 EDT 2012


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



More information about the vtkusers mailing list