OpenSCAD: What is it & Why Use it?
OpenSCAD Series - Part One
What is OpenSCAD
OpenSCAD is software for designing 3D models. It is an opensource, freeware application that runs on Mac OS, Windows and Linux. Unlike other 3D modeling software tools (think Blender) it is not an artistic interactive modeler. Instead OpenSCAD takes a CAD approach to design.
Instead it [OpenSCAD] is something like a 3D-compiler that reads in a script file that describes the object and renders the 3D model from this script file. This gives you (the designer) full control over the modelling process... - from Wikipedia
OpenSCAD uses two primary modeling techniques when designing an object.
-
Constructive solid geometry (aka CSG)
-
Extrusion of 2D outlines
The scripting mechanism used used to create objects provides infinite control over the creative process. Duplicating objects, tweaking designs and creating complex models is within the grasp of the designer. Additionally - no CAD experience is necessary to create complex objects.
Credit: OpenSCAD. A complex object created in OpenSCAD
OpenSCAD is well suited for modeling machine parts and objects to be printed by a 3D printer. If you are creating 3D objects for videos or games there are probably better applications available.
What can you do with OpenSCAD
I have been using OpenSCAD (and an online equivalent) for the better part of a year now. While the application will permit the design of highly complex objects I tend to use OpenSCAD to create more mundane things I need and cannot find exiting design files for online.
OpenSCAD can be used to quickly design brackets, latches and small enclosures. These items then can be exported as an SLT file for 3D printing. The whole process can be complete in a matter of minutes.
Of course this is not the limit of the design capabilities. Utilizing some more advances techniques with the linear extrusion tools very complex items can be created. Here is a bearing created in just 16 lines of code:
Credit: mathcodeprint - Model a bearing in less than 10 minutes
I recently used OpenSCAD to design an anemometer for a project I am working on. Certainly my code is not as efficient as it could be, but in just 30 lines I had rendered a complex item without using a CAD application.
Credit: Brad Moore - Anemometer designed in OpenSCAD
There is a great deal that can be accomplished with OpenSCAD, but it is not the right tool for all applications. For some of the limitations - read on.
Why Should You Use OpenSCAD
So why should you use OpenSCAD? There are many reasons to use OpenSCAD, here are some of the top benefits:
Quick prototyping - If you need to whip out a design fast and get it onto the printer this is quite likely the best tool for the job.
Easy to work with - The programming interface is easy to work with, easy to tweak your design and easy to understand what is going on.
Design Flexibility - its capable of producing simple designs as well as complex designs, as we have seen already. Need a simple hollowed out box, that is a cinch. How about a gearbox?
Credit: Gearbox generator for OpenSCAD by sadr0b0t
Multiple Export Filetypes - The key export filetype for most people will be the SLT which can be sliced and then used to print an object on a 3D printer.
Wide Adoption Among 3D Printer Owners - OpenSCAD is not the only way to create a 3D object for printing, but it has become one of the most accepted tools for the 3D hobbyist and many professionals as well.
Excellent Documentation - OpenSCAD has very complete documentation with many examples. It also has a very handy cheat sheet linked right from the help menu.
Extendable with Libraries - There are official and 3rd party libraries that extend OpenSCAD to make it even more powerful. Gears and bolts are examples of these libraries.
Sharing - Many projects online are shared as SLT files, but there is a growing number of designers that are sharing their OpenSCAD files (essentially the source files for the design) on repositories like Cults and Thingiverse.
Is OpenSCAD right for everyone?
There are designs for which OpenSCAD is not the right choice. Artistic modeling where the objects lacks symmetry and the body of the design features many flowing curves would be a prime example. Blender would be more appropriate for this application.
A different application should also be used (such as a true CAD system) if you are modeling objects that have complex geometries requiring special calculations. OpenSCAD is not really ready for this type of highly accurate work.
If you are working with primitive shapes, even if those combined shapes will result in a complex object, then OpenSCAD might be right for you. Also - if you have experience in programming concepts or working with programs like Scratch but are not experienced with traditional CAD or 3D sculpting applications, then OpenSCAD might be the right choice for you.
What is next?
We have come to the end of this article, but we are not at the end of the journey. Go to the second installment in this series to continue learning about OpenSCAD. In that article we will cover:
-
How to install OpenSCAD
-
Creating your first 3D object
-
Exporting your object as an SLT