[vtkusers] VTK CVS + wxPython...

Andrea Gavana andrea.gavana at polymtl.ca
Wed Jul 21 07:16:20 EDT 2004


Hello NG,

      thank you a lot Charl for your help. I tried your example, and also tried
the example from wxVTKRenderWindowInteractor, and something strange is
happening:

If I run your script, the script runs fine, but I end up with 2 different
windows: the first one contains the cone actor, its title is "Visualization
Toolkit - Win32OpenGL #1", and it is NOT interactive. I can not pan, zoom,
rotate anything.
The second window has the title "VTK Reservoir Surface" (that is supposed to be
the title of the main window, the only one that should be shown), it is grey
and nothing is displayed in it. I don't know if it is interactive or not,
because nothing is displayed in it.
It seems to me that wxVTKRenderWindowInteractor creates another window,
independent from the Main... in this way I loose what I would like to do: one
window, with my 3D grid in it, which I can pan/rotate/zoom.
If I run the example in wxVTKRenderWindowInteractor, I get the same behavior:

the first window contains the cone actor, its title is "Visualization Toolkit -
Win32OpenGL #1", and it is NOT interactive. I can not pan, zoom, rotate
anything.
The second window has the title "wxRenderWindow" (that is supposed to be the
title of the main window, the only one that should be shown), it is grey and
nothing is displayed in it.

Has anyone already seen something like this? I am a bit confused now, I thought
that vtkRenderWindow and vtkRenderWindowInteractor should be used together.
Obviously I made a mistake...

Thanks for every suggestion/pointer.

Andrea.

Selon "Charl P. Botha" <c.p.botha at ewi.tudelft.nl>:

> Andrea Gavana wrote:
> > Hello NG,
> >
> >       thank you Charl for your prompt answer... I was able to run the
> following
> > Python code without problems:
>
> I think I see the problem... you are NOT supposed to use the
> wxVTKRenderWindow and wxVTKRenderWindowInteractor together like you do
> in your short example.  I've modified your code and re-attached...
> there's no mention anymore of the wxVTKRenderWindow.
>
> Please study the example at the end of wxVTKRenderWindowInteractor
> again.  It's only a few lines and shows exactly how it should be done.
>
> Good luck,
> Charl
>
> --
> charl p. botha http://cpbotha.net/ http://visualisation.tudelft.nl/
>






More information about the vtkusers mailing list