Indeed that speed up the visulaization. One last question before leaving:
How can I update filter and pipeline objects after the reset. In my code I have something like: @on_trait_change('scene.activated') def update_view(self): self.pts = self.scene.mlab.quiver3d(x, y, z, self.scales, s, s, ...) self.pts.mlab_source.dataset.lines = self.bonds tube = self.scene.mlab.pipeline.tube(self.pts, tube_radius = 0.01) surf = self.scene.mlab.pipeline.surface(tube, color=(0.8, 0.8, 0)) @on_trait_change('indexes') def update_indexes(self): self.pts.mlab_source.reset(x = x, y = y, z = z, u = self.scales, v = s, w = s, ...) but when changing the size of my datas (so when calling update_indexes), I end up with warnings such as: Warning: In C:\pisi\tmp\VTK-5.6.0-2\work\VTK\Graphics\vtkTubeFilter.cxx, line 237 vtkTubeFilter (090CC9F8): Could not generate points! Generic Warning: In C:\pisi\tmp\VTK-5.6.0-2\work\VTK\Filtering\vtkPolyLine.cxx, line 104 Coincident points in polyline...can't compute normals sorry for the dummy and numerous questions but I really do have hard time getting into mayavi. Eric Gael Varoquaux a écrit : > On Wed, Jun 01, 2011 at 04:31:19PM +0200, pellegrini wrote: > >> Now it's work but it is awfully slow. I wonder if I should not >> rebuild my quiver3d from scratch instead of using reset as >> mentionned somewhere in the users guide. >> > > Try disabling interactive refresh at the beginning of the method in which > you modify your data, are re-enabling it at the end: > > http://github.enthought.com/mayavi/mayavi/tips.html#accelerating-a-mayavi-script > > Gael > -- Eric Pellegrini Calcul Scientifique Institut Laue-Langevin Grenoble, France ------------------------------------------------------------------------------ Simplify data backup and recovery for your virtual environment with vRanger. Installation's a snap, and flexible recovery options mean your data is safe, secure and there when you need it. Data protection magic? Nope - It's vRanger. Get your free trial download today. http://p.sf.net/sfu/quest-sfdev2dev _______________________________________________ MayaVi-users mailing list MayaVi-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mayavi-users