
Organizing your OpenSCAD code: Part I - iamwil
http://blog.cubehero.com/2013/12/18/organizing-your-openscad-code-part-i/
======
Buttons840
I saw OpenSCAD mentioned in another HN comment, and thought it looked
interesting. I was wondering though:

How does OpenSCAD compare to other free CAD programs like FreeCAD? Is it just
that it's more focused on programming?

~~~
Jtsummers
The primary difference: You don't drag stuff around to create your models. You
write code for it. Now, you can import existing models for a variety of
formats, then move them around (with transforms, still in code). It's more
like POV-Ray, for instance, than Blender.

------
dgrnbrg
If OpenSCAD isn't powerful enough for you, there's a Clojure wrapper that lets
you leverage Clojure to generate SCAD code: [https://github.com/farrellm/scad-
clj](https://github.com/farrellm/scad-clj). OpenSCAD automatically re-renders
the model when the file changes on disk, so you can essentially have a 3D
modeling REPL with this setup.

~~~
Jtsummers
> OpenSCAD automatically re-renders the model when the file changes on disk,
> so you can essentially have a 3D modeling REPL with this setup.

I love this feature of OpenSCAD. I've tried 3d modeling tools in the past,
they just don't work for me. But code, I can do that. With a Mac Mini hooked
up to my TV (primarily for watching videos, listening to music) I ssh into it
and edit the files with emacs, and every save I get an updated view. I need to
take a look at this clojure wrapper, however. I'm not hugely familiar with
clojure, but CL and scheme I've got so it shouldn't take me long.

------
iamwil
OP here. Lemme know if there's other topics on OpenSCAD that you'd like to see
and read about.

~~~
alok-g
It it possible to create animations also with OpenSCAD?

~~~
iamwil
It is, though it's usually not used for figure animation, but more mechanical
animations.

~~~
bliker
This is exactly I would be interested in! Do you also have any tips for 2D
drafting in harmony with openscad?

~~~
iamwil
You'd have to be more specific. What does "2D drafting in harmony with
openscad" mean?

------
jglauche
I made a framework to write OpenSCAD code in Ruby. Helps a lot to keep
yourself sane on big projects:
[https://github.com/Joaz/CrystalScad](https://github.com/Joaz/CrystalScad)

~~~
krasin
There's also a similar project for Python [1].

That said, do I understand correctly that the way you assume the users will
share their OpenSCAD models is to share the generated OpenSCAD scripts?

[1]
[https://github.com/SolidCode/SolidPython](https://github.com/SolidCode/SolidPython)

~~~
jglauche
My work is heavily inspired by SolidPython. SolidPython, unfortunately has
some shortcomings at the syntax (resulting in too many braces to read
properly).

I do hope that the people will share the ruby code and not the generated
openscad code, as that would be hardly readable.

~~~
bmslieght
I not (yet) got ruby installed. Have you an example how
[https://github.com/Joaz/bulldozer/tree/master](https://github.com/Joaz/bulldozer/tree/master)
Builds in openSCAD format or .stl or even a jpg ?

Thanks, Brendan

