<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META content="MSHTML 5.50.4807.2300" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=384312304-18122001><FONT size=2>I have run across a couple of
problems with the python bindings to VTK.</FONT></SPAN></DIV>
<DIV><SPAN class=384312304-18122001><FONT size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=384312304-18122001><FONT size=2>First, as currently configured,
you must turn on Tcl wrapping in order for Python wrapping to work.
This is because the Tcl/Tk header files must be accessable to build the Python
versions of the Tk widgets (vtkTkRenderWidget, vtkTkImageWidget,
etc).</FONT></SPAN></DIV>
<DIV><SPAN class=384312304-18122001><FONT size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=384312304-18122001><FONT size=2>I copied a section of the
CMakeLists.txt file in Rendering from the VTK_WRAP_TCL section to the
VTK_WRAP_PYTHON section. This works but it is rather ugly in that the same
lines of code must be exist in two places. I essentially copied lines
225-285 to line 355 of Rendering/CMakeLists.txt</FONT></SPAN></DIV>
<DIV><SPAN class=384312304-18122001><FONT size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=384312304-18122001><FONT size=2>Second, I had VTK built with
static libraries. The python build created DLLs for the python
bindings. This pretty much works. However, my application was behaving a
little strange. I tracked it down to a problem where objects from Common
had disjoint MTimes from objects in Rendering. For instance, an object
from Common might have a MTime of 300 and an object from Rendering might have a
MTime of 500. If I call Modified() on the object from Common, its MTime
becomes 301 when it should be something greater than 500!!!</FONT></SPAN></DIV>
<DIV><SPAN class=384312304-18122001><FONT size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=384312304-18122001><FONT size=2>Now, I don't know whether this
a problem because VTK is built static and the python libs are dynamic or whether
it is a general problem with static builds (and any or no bindings). I did
a clean build and setup the build as shared and the MTime problem goes
away. If I can find a static build of VTK on another machine, I'll try to
duplicate the problem without using python.</FONT></SPAN></DIV><BR>
<P><B><FONT face="Comic Sans MS" color=#000080>Jim Miller</FONT></B>
<BR><B><I><FONT face=Arial color=#ff0000
size=2>_____________________________________</FONT></I></B><I></I><BR><I></I><I><FONT
face=Arial color=#000000 size=1>Visualization & Computer Vision<BR>GE
Corporate Research & Development<BR>Bldg. KW, Room C218B<BR>P.O. Box 8,
Schenectady NY 12301<BR><BR></FONT><U><FONT face=Arial color=#0000ff
size=1>millerjv@crd.ge.com <<A
href="mailto:millerjv@crd.ge.com">mailto:millerjv@crd.ge.com</A>></FONT></U></I><BR><I><FONT
face=Arial color=#000000 size=1>(518) 387-4005, Dial Comm: 8*833-4005,
</FONT></I><BR><I><FONT face=Arial color=#000000 size=1>Cell: (518) 505-7065,
Fax: (518) 387-6981</FONT></I> </P><BR>
<DIV> </DIV></BODY></HTML>