[vtk-developers] ruby patch to vtk-5.0.0

Seiya Nishizawa seiya at kugi.kyoto-u.ac.jp
Sun Mar 12 22:43:59 EST 2006


Hi David,

Thanks for you using it.

On Sat, 11 Mar 2006 12:59:48 -0500 (EST)
David Gobbi <dgobbi at atamai.com> wrote:

> The patch is very complete, I can tell that it is based on the Python wrappers.  The fact that you
> included 82 examples (were these translated from the Python examples?) is very impressive.
Yes, you are right.
At the first, I copyed them from python's examples.
So there may be some words "python" in comment part of the ruby samples :-)

> To install on my Linux system I did the following, is this what you would recommend?
> 1) grabbed VTK-5-0 from CVS
> 2) cd VTK
> 3) patch -p1 < vtk-ruby-060306.patch
> 4) built VTK with cmake/make
> 5) cd Wrapping/Ruby
> 6) ruby setup.rb (as root)
> 7) installed the "narray-0.5.8" extension for ruby
> 8) set LD_LIBRARY_PATH to find the VTK "bin" directory
After built by make (4),
you can install them to your system by typing
"%make install",
which install vtk files to proper path under CMAKE_INSTALL_PREFIX
and ruby files to ruby_site path (default).
If you specified
VTK_RUBY_LIB_DIR, VTK_RUBY_ARCH_DIR, and VTK_RUBY_SETUP_ARGS(--prefix="/hoge"),
*.rb files are installed to /hoge/VTK_RUBY_LIB_DIR,
and *.so files are to /hoge/VTK_RUBY_ARCH_DIR.
 
> I do have two comments:
> 
> 1) It should not require "narray", since "narray" is actually only used by two files:
>    vtk/util/vtkImageImportFromArray.rb and vtk/util/vtkImageExportToArray.rb.
>    It would be better if these two files were moved from "vtk/util" into "vtk/narray"
>    to make them optional.
There was bug in vtk/util/vtkImageImportFromArray.rb: "rescue" -> "rescue LoadError".
After the fix, it works without narray.
So it is not necessary to move to "vtk/narray" I think.


> 2) You took the "vtk" prefix off of the classes.  This does not always work, because
>    the "vtk3DSImporter" class becomes "3DSImporter" if you remove the "vtk".  This
>    leads to a syntax error:
I skip because it was discussed in another thread.

--------------
Seiya Nishizawa
seiya at kugi.kyoto-u.ac.jp
GnuPG Fingerprint = 0696 D312 5737 929A B481 FC91 44F4 6BA0 467A 7703



More information about the vtk-developers mailing list