Spiral Creator [update]


(cyborgxs) #1

Just created a script for generating spirals:
http://www.acuriousroom.com/elysiun/spiral.jpg

Creates 3 types of spirals: Archimedean, Logarithmic and Fermat’s. Nothing particularly spectatcular, but I’m chuffed cos its my first script made in Blender/Python. Chears to Stefano, borrowed his method for building the gui from BMG - very cool script.

Download - http://www.acuriousroom.com/elysiun/spiralsblend.py

Next thing I want to do is allow a profile to be specified, so that one create spirals with a 3d shape.

[edit] 06 Nov '05

Ok, its sunday and I ws bored so have modified script to run with latest official unstable version of blender - 2.40alpha2. Kept getting error ‘Eeekadoodle! An MFACE-EDGE! Tell Zr!!’ with old version of script, so methinks shifting sands of python API are shifting rather fast, lol.

New version also got a toon cog bit, obviously not a patch on BMG, but they do work with subsurf, and can look like this:
http://www.acuriousroom.com/elysiun/cogs1.png
http://www.acuriousroom.com/elysiun/cogs2.png
http://www.acuriousroom.com/elysiun/cogs3.png

Only the subsurf bit of the api is changing so you have to do it manually at the moment, :smiley: . Next update should bring the extrude along the line part which is what this script is hopefully all about.

enjoy


(antont) #2

seems nice!

a problem, tho: with current CVS (and surely with 2.40alpha1, and perhaps with 2.37 too if you were using 2.36) it does not work, but complains: RuntimeError: faces must have at 3 or 4 vertices

i see you are really trying to create a new face with only two vertices, why?

~Toni


(cyborgxs) #3

I created it in blender 2.37, which it seems to run fine in. Tried it in and 2.40alpha1, and blender crashed, odd one that. I was creating faces with 2 verts to create edges between the verts of the spiral. The code draws the verts starting with index 0 in the middle than the others spiralling out (surprise, surprise). The code then counts round the spiral connecting each vert to the next one with a face. Maybe I should create edges instead!

To be honest the script isn’t very exciting and you could probably get better results by copying the formula into emackey’s paramteric object script http://www.blinken.com/blender_plugins.html. Also soni bardot created a spiral generator script, thread: http://www.elysiun.com/forum/viewtopic.php?t=12681.

I will release Spiral Creator for the latest version of blender, but probably for the next stable release 2.40 or whatever, mainly cos I think some of the python API is changing - and they haven’t released the docs yet, :wink: and also I haven’t got the next bit working yet!