[vtkusers] Problem VTK4 + python 2.2
Emmanuel Olart
olart at theralys.com
Wed Jan 16 10:06:14 EST 2002
Hi david, prabbhu
I finally managed to make all works after trying to downgrade, to python
2.1, vtk 3.2 and a lot of other strange things .
The final point was to downgrade to wxPython 2.3.1
It then works with python 2.1/2.2 and vtk 3.2 / 4
Maybe there is an issue with smp machines and wxGTK 2.3.2 or maybe with
my video card (geforce 3 ti 200)
I posted on the wxPython list and i ll post here to conclude this topic
when this issue is solved.
Thx for your help
Regards
Emmanuel
David Gobbi wrote:
>Hi Prabhu,
>
>On Tue, 15 Jan 2002, Prabhu Ramachandran wrote:
>
>>There were two lines that needed changing for me.
>>
>>$ diff wxVTKRenderWindow.py /tmp/wxVTKRenderWindow.py
>>197c197
>>< self._RenderWindow.SetSize(size[0], size[1])
>>---
>>
>>> self._RenderWindow.SetSize(size.width, size.height)
>>>
>>237c237
>>< width, height = event.GetSize()
>>---
>>
>>> width, height = event.GetSize().asTuple()
>>>
>
>I'll fix these. They have to do with differences between the
>wxPython 2.2.x and wxPython 2.3.x, I want the wxVTKRenderWindow
>to work with both if possible.
>
>>Once these were done it worked well. I looked through your code and
>>it looks nice. Its a good idea to use the GL Canvas. I believe Dave
>>Reed found that using a GLCanvas in the GtkRenderWindow also helped a
>>lot. One design question. The way my wxVTKRenderWindow was written
>>was with a base and derived class. This was done so that it would be
>>easier for a user to incorporate their custom interaction. Any
>>reasons why you didnt do it this way?
>>
>
>Because it's easy enough for people to just override the methods they
>want to change the behaviour of. The documentation in the file clearly
>specifies what the default interaction is set to, and what methods
>have to be overridden to change it.
>
>>There is one small bug that I found. If you just fire up
>>wxVTKRenderWindow.py and then hit any key (before you move the mouse)
>>it will raise an exception. This is because UpdateRenderer is not
>>called untill the mouse is pressed so there is no
>>self._CurrentRenderer. One way to fix this is to call UpdateRenderer
>>on OnEnter. What do you think?
>>
>
>I'll fix this.
>
>>The other issue is that if you call Render on the window before it is
>>realized then parenting doesnt occur properly. i dont know if your
>>loop that calls the parent's Show handles this case? I guess it does.
>>
>
>This gets into the whole wxGTK mess and also the WindowId mess. I don't
>plan on looking any deeper into this, myself.
>
>Okay, I just did the fixes and committed.
>
> - David
>
>
>_______________________________________________
>This is the private VTK discussion list.
>Please keep messages on-topic. Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
>Follow this link to subscribe/unsubscribe:
>http://public.kitware.com/mailman/listinfo/vtkusers
>
>
More information about the vtkusers
mailing list