Jordan,
I spent a fair amount of my time in college not going to class and
instead learning how to write code/html and use POVray (
http://www.povray.org/ ) which are rather similar, so it was oddly
familiar to me after all the years.
Other than that, I looked through:
* whosawhatsis' (praised be his name) wallace openscad:
https://github.com/whosawhatsis/RepRap-Wallace
* nophead's (praised be his name) mendel90 openscad:
https://github.com/nophead/Mendel90/tree/master/scad
Advice I can give:
* When you can, use module()s. I think that's the best advice that I
can give to avoid a spaghetti mess. If you've done software
development, much of it is applicable to openscad.
* When you can, separate the positive and negative of parts in a
module:
https://github.com/elliotf/reprap-cold-end-bowden-retainer/blob/master/retainer.scad#L22
* When you can, separate the positioning of an object (module) from
the object itself.
* For larger projects, use multiple files.
* When you can, pull out most of attributes of an object (size,
position). This makes it easier to make parametric designs, change
the objects, and reposition elements
* If you're making holes, use the whosawhatsis (praised be his name)
technique of sizing them, which I abstracted out into a module:
https://github.com/elliotf/reprap-cold-end-bowden-retainer/blob/master/retainer.scad#L16
OpenSCAD sizes cylinders to fit *inside* the radius that you specify.
This module sizes the cylinder to fit *around* the diameter that you
specify. You'll still probably need a little bit of extra room,
though.
* If you're making holes that will be printed non-vertically, use
hexagonal or octagonal holes and rotate them so the cylinders are
lying on their flats. This minimizes overhang. Example:
https://github.com/elliotf/reprap-guitar-mount/blob/master/hook.scad#L58
To get the amount that you should rotate it, divide 180 by the number
of sides (180/6 = 30, 180/8 = 22.5)
* Be careful to not re-declare variables in the global scope. This
leads to *very* hard to find bugs.
I didn't plan on writing that much. The parametric graber (
https://github.com/elliotf/parametric-graber ) has some of the
learnings I've come across and it's a lot simpler than nophead's
(praised be his name) mendel90 because he's doing a *lot* more than I
am. Much of what i've learned came from the mendel90 and wallace
openscad source.
You could also probably talk to Jim M, as he has a number of projects
using openscad and seems to be a sharp, experienced guy.
Bill R talked at one point about me doing a class on how to openscad,
so maybe that will happen if/when I get back to the reprap meetings if
there is still interest.
If you figure out how to write tests for openscad, please let me know. :)
Elliot