[vtkusers] wxPython and VTK

REGAT-BARREL Aurélien arbvtk at yahoo.fr
Mon Jan 26 19:48:19 EST 2004


Hello,
I'm using VTK 4.2 with Python 2.3 and wxWindows (wxPython) under Windows.
Problem : wxVTKRenderWindow crashes on exit (fatal error on python.exe). wxPython doesn't like VTK.
I tried to make my own wrapper :
 
from wxPython.wx import *
from vtkpython import *
def Test():
    app = wxPySimpleApp()
    frame = wxFrame(None, -1, "wxRenderWindow", size=wxSize(400,400))
    renWin = vtkRenderWindow()
    ren = vtkRenderer()
    renWin.AddRenderer(ren)
    cone = vtkConeSource()
    cone.SetResolution(8)
    coneMapper = vtkPolyDataMapper()
    coneMapper.SetInput(cone.GetOutput())
    coneActor = vtkActor()
    coneActor.SetMapper(coneMapper)
    ren.AddActor(coneActor)
    renWin.SetWindowInfo(str(frame.GetHandle()))
    
    frame.Show(1)
    renWin.Render()
    app.MainLoop()
 
if __name__ == "__main__":
    Test()

but it also crash on exit, but this time python handles it in a Runtime error message box :
"R6025 - pure virtual function call"
 
What's wrong ?



---------------------------------
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
Testez le nouveau Yahoo! Mail
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20040127/1400a312/attachment.htm>


More information about the vtkusers mailing list