anyone using Python with Sketchup (free Google tool)?

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

anyone using Python with Sketchup (free Google tool)?

kirby urner-4
Reply | Threaded
Open this post in threaded view
|

Re: anyone using Python with Sketchup (free Google tool)?

Vern Ceder-3
Now, that's a cool idea! I'll have to pass that along to our engineering class, which uses sketchup some...

Thanks,
Vern

On Sun, Apr 17, 2011 at 11:34 AM, kirby urner <[hidden email]> wrote:

sketchuptips.blogspot.com/2009/02/supy-scripting-sketchup-in-python.html



_______________________________________________
Edu-sig mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/edu-sig




--
Vern Ceder
[hidden email], [hidden email]
The Quick Python Book, 2nd Ed - http://bit.ly/bRsWDW



_______________________________________________
Edu-sig mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/edu-sig
Reply | Threaded
Open this post in threaded view
|

Re: anyone using Python with Sketchup (free Google tool)?

kirby urner-4
I've been going through Ruby tutorials this morning, trying to decide if the easiest way to program Sketchup is to use Ruby first, then mentally translate to Python and start using that.  It's a real question, because all the documentation is about Ruby, given SuPy is a tiny pioneering project that I wouldn't have heard of had it not been for Driscoll the architect, one of my blog characters.

The Ruby views got me into the language comparison Youtubes again, where the lore is getting passed on to a next generation.  This guy thinks Python's debuggers aren't so great, but then in Python who needs to debug right, it just works the first time (kidding, only kidding here).

http://www.youtube.com/watch?v=81WHD0IqheI&NR=1  (a guy with advice)

Got there from here:
http://www.youtube.com/watch?v=MPyJ-siBIls&feature=related  (Bruce comparing languages)

... the volume level on these two YouTubes is huge.  YouTubes much on my mind given how Google Video just reminded us they're taking down all Google Video content in about a month and making just a video search engine (not a hosting service).  We were encouraged to migrate all our GVs to YT, which I've been doing.

Here's what it looks like coding for Sketchup in Python:
http://www.cosc.canterbury.ac.nz/greg.ewing/SuPy/doc/example.py

Here's a useful video on just the Ruby aspect of things, and doing something pretty simple:  random pulls on some bricks, to make 'em taller.  Gets the ball rolling (the sphere doesn't come apart into triangles, is more the classical gore dome system per latitude / longitude).

http://www.youtube.com/watch?v=Aq1YEaI2XlA

I have consistently and for many years advocated that CS curricula highlight a minimum of two languages, because contrast is how to reinforce core concepts in either.  You don't know what you're looking at until you have another to compare it two, at which point the concept of "zebra" starts to come into focus.  Yes, a deliberate over-simplification, duh.  By "contrast" I also mean close similarities, so perhaps should just say "differences".  This guy's Ruby tutorial has a comfortably familiar sheen to it, for anyone used to Python:

http://www.youtube.com/watch?v=6It5aK9mJi8&feature=related

So yeah, a Ruby + Python course, where we think of Ruby + Python as "one language" (almost).  Java/C# would be another combo.  I've often written about Python / J, as I think the way J is communicated, as a grammar (complete with parts of speech) is worth the price of admission right there.  However if you're a stats person, maybe Python / R would be your better bet?

I've looked into Ruby before, including with its inventor at an OSCON, just haven't had much practical need for it.

The Systems PhD program at PSU is one of the only one of its kind and connects to the kind of mathematics they promulgate through Santa Fe Institute (also Ralph Abraham has done a lot of related work, J.H Conway, D. Conway (the more brilliant of the two), and of course Wolfram as we all know).  We've already done a lot of NKS stuff here on edu-sig, using John Zelle's graphics.py (an adapter for Tk).

Whether Sketchup proves ideal for this work, let alone SuPy, remains to be seen of course.  Plus I'm not the one doing the work -- am just an adviser.

Students come from around the world attracted by Systems Science, but these multi-disciplinary subjects have been withering on the vine of late, or so some people tell me.

Kirby

Chaos Math:
http://4dsolutions.net/ocn/hexapent.html  (HP4E)
http://4dsolutions.net/ocn/life.html  (game of life adapted to hexapent)
http://4dsolutions.net/ocn/fractals.html (Mandelbrot with PIL)
http://mail.python.org/pipermail/edu-sig/2007-February/007736.html (NKS with Dr. Zelle's resource)

Martian Math:
http://www.flickr.com/photos/17157315@N00/sets/72157622961425831/with/4863299407/


On Sun, Apr 17, 2011 at 9:08 AM, Vern Ceder <[hidden email]> wrote:
Now, that's a cool idea! I'll have to pass that along to our engineering class, which uses sketchup some...

Thanks,
Vern

On Sun, Apr 17, 2011 at 11:34 AM, kirby urner <[hidden email]> wrote:
_______________________________________________
Edu-sig mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/edu-sig




--
Vern Ceder
[hidden email], [hidden email]
The Quick Python Book, 2nd Ed - http://bit.ly/bRsWDW




_______________________________________________
Edu-sig mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/edu-sig
Reply | Threaded
Open this post in threaded view
|

Re: anyone using Python with Sketchup (free Google tool)?

Lee Harr-3
In reply to this post by kirby urner-4

Is there an advantage to using SketchUp over Blender?

I tried getting in to SketchUp a few times but I never got
to the point where I could do anything very interesting.

Also, it is not really free. SketchUp Pro cost about $500.

Blender, on the other hand is totally free, and has
Python built right in. There is an editor where you
can write Python scripts. They have put in a huge
amount of work on the Python API for their new 2.5
series. There is also an interactive interpreter window
built in.

     
_______________________________________________
Edu-sig mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/edu-sig
Reply | Threaded
Open this post in threaded view
|

Re: anyone using Python with Sketchup (free Google tool)?

kirby urner-4
On Mon, Apr 18, 2011 at 2:45 PM, Lee Harr <[hidden email]> wrote:
>
> Is there an advantage to using SketchUp over Blender?
>

Hi Lee --

I've been meaning to reply to this.  I have only the utmost respect
for Blender, which I've tackled a number of times.  I mostly cut my
teeth on POV-Ray (stills, but with loop constructs and frame saving),
then VRML (+ XML = x3D), then some other formats, the key theme (for
me) being simple spatial geometry, like the rhombic triacontahedron
and like that.  Here's there weirdo kind of stuff that gets me going:

http://worldgame.blogspot.com/2008/12/coffee-shops-network.html (top
one by me, bottom by Russell Towle)

Actually, it hadn't really occurred to me to compare them, as I think
of Sketchup as 3D etcha-sketch, whereas Blender is more about multiple
objects with independent motion, or at least has that ability.

But then I suppose Sketchup, programmed in Ruby or Python, does have
this ability to run more of a movie, more than before. [1]

I'm awed by this movie of Blender autogenerating whole cities, ala
'Inception', something I'd put beyond the bounds of even Sketchup Pro,
but I could be mistaken (none of my current friends seem to have it).

One possible advantage of SketchUp is the awesome on-line library of
contributed buildings, other structures, which you can just download
and snarf.

My friend Trevor has been productive with Sketchup, in doing this
retro-seeming movie of a never-realized concept in housing (looks like
Uru, or that Island in Myst [2]).
http://controlroom.blogspot.com/2009/11/4d-house.html

John Driscoll picks up on a lot of the same themes (similar
architectural memes):
http://worldgame.blogspot.com/2010/05/architect.html

As for myself, I came down in Visual Python, which is hard to beat for
easy of use right out of the box:

>>> from visual import *
>>> sphere(radius=1)

and bammo!, you've got an interactive window open in OpenGL.  Arthur
and I used to argue about whether it oughta be in the Standard
Library.  I took the conservative line and bellyached about bloat, but
I secretly agree with him:  VPython is one of the cardinal flagships,
one of the major floats in the Python parade, worthy of its
cheerleaders.  Which isn't to say it couldn't do more.  Will it record
successive frames out to disk, at perhaps only a fraction of its rate
in real time?  I'm pretty sure not, yet that could be useful.  Where
there are frames, there are movies.

> I tried getting in to SketchUp a few times but I never got
> to the point where I could do anything very interesting.
>
> Also, it is not really free. SketchUp Pro cost about $500.
>
> Blender, on the other hand is totally free, and has
> Python built right in. There is an editor where you
> can write Python scripts. They have put in a huge
> amount of work on the Python API for their new 2.5
> series. There is also an interactive interpreter window
> built in.
>

You don't mention what you've been able to do with Blender.  Cool
stuff?  The learning curve is pretty steep.  I'm not thinking
either/or.  I'm thinking work out in Sketchup, get your feet wet, then
move up to Blender maybe.  Or take the VPython route.  Or....

Kirby

[1] http://www.youtube.com/watch?v=5WaoImXPMtE  ("got more, than we
had before...")
[2] Cyan Software / http://uru.us.ubi.com/
_______________________________________________
Edu-sig mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/edu-sig
Reply | Threaded
Open this post in threaded view
|

Re: anyone using Python with Sketchup (free Google tool)?

Lee Harr-3

> http://worldgame.blogspot.com/2008/12/coffee-shops-network.html (top
> one by me, bottom by Russell Towle)

You might like this talk from PyCon :

                PyCon 2011: Algorithmic Generation of OpenGL Geometry
http://pycon.blip.tv/file/4882916/




> Actually, it hadn't really occurred to me to compare them, as I think
> of Sketchup as 3D etcha-sketch, whereas Blender is more about multiple
> objects with independent motion, or at least has that ability.

I use Blender all the time for what I call "sketching."

Maybe the limits of SketchUp are what I might feel if I were
trying to use an etch-a-sketch for sketching. It would be
terribly frustrating.


> I'm awed by this movie of Blender autogenerating whole cities, ala
> 'Inception'

There are a lot of great python scripts and plugins for blender.
I think that Make Human is mostly python:
http://makehuman.blogspot.com/
(Possibly NSFW due to unclothed humans)



> One possible advantage of SketchUp is the awesome on-line library of
> contributed buildings, other structures, which you can just download
> and snarf.

There are lots of free blender resources available:
http://www.blendswap.com/

I also found a way to bring SketchUp resources in to blender:
http://sites.google.com/site/alexvaqp/sketchupblender


> My friend Trevor has been productive with Sketchup, in doing this
> retro-seeming movie of a never-realized concept in housing

> John Driscoll picks up on a lot of the same themes

Maybe I have just never had any use for architectural sketching.



> As for myself, I came down in Visual Python, which is hard to beat for
> easy of use right out of the box:

I've used VPython before, but found it difficult to set up sometimes.


> > I tried getting in to SketchUp a few times but I never got
> > to the point where I could do anything very interesting.

> You don't mention what you've been able to do with Blender. Cool
> stuff?

Mostly I use if for sketching robot designs:
http://robotics.easthighschool.net/design0
http://robotics.easthighschool.net/design1

One nice thing there is that with just a bit more work, the robot
can be driven around the arena in blender game mode.



> The learning curve is pretty steep.

I agree, somewhat. But I think that any 3D design tool is
going to take quite a bit of work to master.


> I'm not thinking
> either/or. I'm thinking work out in Sketchup, get your feet wet, then
> move up to Blender maybe. Or take the VPython route. Or....

I ran in to some resistance when I wanted students to learn
blender. People were either saying "we already have SketchUp"
but when I tried to use it I could not get it to do what I wanted.

Or else they say "We have an Autodesk ___ license. We should use
that." But like I was saying, these programs take a lot of time to
master, so if students can install the program at home, or on any
computer they happen to sit down at (portable apps) then they
will have that much more time to work on it.

For me, Blender suits just about perfectly. And the fact that they
are so invested in Python just makes it all that much better!

     
_______________________________________________
Edu-sig mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/edu-sig