Hi,

Sorry for the delayed response,  I am no longer sure if anyone answered 
this but here goes anyway.

On Friday 16 April 2010 09:18 PM, Luca Penasa wrote:
>       HasTraits.scene.engine.add_source(source)
>          from enthought.mayavi.modules.surface import Surface
>          surface = Surface()
>          HasTraits.scene.engine.add_filter(surface)
>
> at the end i call configure_traits() for show the window
>
>
> --->  is this the best way to insert a vtkUnstructuredGrid into a scene?

If you have a data file in the form of a  VTK file then it probably is a 
good way to do it.

>
> --->  code i have yet writed make some changes on the vtkUnstructuredGrid
> object using the vtk functionalities (rotating, translating and other
> similar stuff...) and i would like that everytime i make changes on my
> vtk-object the visualization update itself in agree with my changes.
> how can i get this?? Is not there something
> like ...engine.update_source() or ...engine.set_source(UpdatedSource) or
> change_source(UpdatedSource). Is there a way to force a re-read of the
> source, leaving untouched the filters pipeline??

Depends on the source.  It is the source's responsibility.  So if this 
is a data file you can ask the reader to update.  If you are 
manipulating the unstructured grid yourself and then want it to update 
you can do:

  src = VTKDataSource(data=your_vtk_dataset)

  src.update()

the src.update() call will do the needful.

cheers,
prabhu

------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
_______________________________________________
MayaVi-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mayavi-users

Reply via email to