[vtkusers] vtk and python - some questions.
seb-ml-a at barre.nom.fr
Tue Oct 24 17:34:07 EDT 2000
At 24/10/00 16:30 -0400, Chris Myers wrote:
>P.S. Having looked at the VTK introspection code that Prabhu wrote to
>implement his VTK-CFD, I can understand his frustration with the lack
>of certain features in the Python/VTK interface.
Could you be more descriptive ?
I'm a Tcl / Itcl user, I've developped too much Tcl stuff to move my work
to Python for now, but I guess I might be interested in improving the
wrappers to the benefit to all wrapped languages.
For example, it'd be nice to include some typedef's in VTK so that
functions could provide semantic clues about their parameters.
Say, for example :
void SetColor(rgbcolor c)
void SetAngle(angle_d a)
instead of :
void SetColor(float a)
void SetAngle(float a)
where rgbcolor would be something like a typedef to an array of 3 float,
and angle_d just a typedef to a float.
The idea behind this is to provide a wrapper or a parser that would dump an
XML description of the VTK API. This XML tree would include the fact that
these functions manipulate RGB colors or angle in degrees (a kind of hint).
I guess this would for example greatly help making GUI's : instead of hand
coding the numerous cases where a function should use a specific widget
(color chooser, or angle representation) this could be generated automatically.
I introduced this XML wrapper idea some time ago in the "GUI [demo]"
discussion, but I had no time to work on it, sorry.
This also imply a lot of search/replace stuff :) I'm not sure VTK authors
are very permissive about massive changes :)) (as we get no feedback
regarding the 3 or 4 lines that one could add to each VTK .cxx files to
speed up compilation time by a factor of 2 or 3 using precompiled headers).
More information about the vtkusers