SuPy 1.0
--------
SuPy is a plugin for the Sketchup 3D modelling application
that lets you script it in Python.
http://www.cosc.canterbury.ac.nz/greg.ewing/SuPy/
This is a first version and is highly experimental. Let me
know if it works for you and whether you have any problems.
--
Greg Ewing
greg....@canterbury.ac.nz
You can pronounce it either "soupy" or "soo-pie" as
you prefer. :-)
> know the difference between
> the ruby methods vector.reverse and vector.reverse! ? Both of these
> methods exist today in the API.
Bugger! Looks like I'll have to re-think that idea...
Thanks,
Greg
PyGame has a convention of appending "_ip" for mutating
methods (standing for "in-place"). I might go with
something like that.
--
Greg
> Perhaps a more pythonic way of doing things would be
> not to provide all the methods in the Ruby API but
> only one to provide a particular function.
>
> While Ruby's credo is to be as concise and elegant
> as possible Python's zen[1] is to be explicit. In
> Python I would do
>
> vector = vector.revers()
>
> rather than an in-place modification as in
>
> vector.revers!
That might be all right for vectors, but some methods
only have an in-place version, e.g. face.reverse!().
So far I've gotten away without having any knowledge
of particular Sketchup classes in the wrapper, and I'd
like to keep it that way if I can. Also I think it's
easier for users if there is a general set of rules
for translating Ruby method calls into Python, rather
than having to look up documentation for particular
cases.
--
Greg