SCAD and STL files are two common file types used to describe 3D models. SCAD stands for “solid computer-aided design”, and the format was pioneered by the open-source software OpenSCAD (known as “the programmer’s solid 3D CAD modeller“). STL stands for “stereolithography”, and it’s the most popular file type used with slicers for 3D printing.
The different file formats underpin very different ways of describing 3D models. SCAD files contain code (like a programming language) to describe shapes in precise mathematical terms. It’s a format well suited to engineering applications, parametric designs, and also more complex shapes that can be described using numerical formula.
STL files describe 3D models using a “tiled” set of triangles that represent an object’s surface contours. This is well suited to the way slicers work but also lends itself well to manipulation using more organic design tools such as Blender. However, unlike SCAD files, they contain no information about colors, component parts, or component animations.
If your starting point is a SCAD file and you want to convert it to STL, you’ve got four options you may want to consider. Let’s see what they are and how they can be used.
The most obvious way to convert from a SCAD to STL file is to use OpenSCAD – which may have been what created the source file in the first place.
OpenSCAD is a free tool that works on all the major operating systems (Windows, MacOS, Linux, BSD, and more). Once you’ve downloaded it and opened the SCAD file to be converted, you can continue as follows:
Depending on the size, complexity, and resolution used by the SCAD model, the rendering process can take a long time. It’s not unusual for this to take many minutes or even hours. A progress bar at the foot of the OpenSCAD window will indicate how much time is left. If the time is too long, see “Other Considerations” below.
There’s no shortage of online file converters, and many of these will handle SCAD to STL translations. Most take roughly the same time and produce comparable results (at least with relatively small-to-medium-sized SCAD files). Some, however, have a much better user experience with fewer “in your face” adverts and clearer user instructions.
In general, the steps could not be simpler:
Several conversion tools can be a little advert-heavy, with the occasional advert containing potentially confusing references to uploading or downloading. However, the following three provided consistent conversions and were straightforward to use provided that the SCAD file doesn’t reference additional libraries or the loading of other external files or modules.
For those familiar with FreeCAD, using its built-in tools might be the best option for converting a file from SCAD to STL. This will especially be the case if minor modifications or changes to the design are required first. It also allows you to change the resolution at which curved shapes are eventually rendered.
FreeCAD has a dedicated “OpenSCAD Workbench”, but this isn’t actually necessary unless you plan to make changes. The conversion process goes as follows:
If you want to make changes to the SCAD file before converting it to STL, select the “OpenSCAD Workbench” during the import process and edit the model as desired.
Lastly, please keep in mind that there are one or two OpenSCAD operations, such as “hull()”, that aren’t supported well (or at all) by FreeCAD. You may not necessarily get an error, so if you get unexpected outputs, try another approach.
For those who don’t want to (or can’t) download OpenSCAD or FreeCAD and who also want the option to make minor changes before the final conversion to an STL file, there’s the option of using a browser-based, online SCAD file editor.
Several of these are in various states of development – with some veering towards incompatible JavaScript-inspired flavors of SCAD, for example. There are a couple of options, though: OpenJSCAD.org, which is now hosted on Azure, and also OpenSCAD Cloud.
We tested conversion with OpenSCAD Cloud, which went well. The editor is an implementation of a simplified version of OpenSCAD, and while it has fewer user interface options, it works well – although only on Chrome browsers. Another downside is that, at present, you need to copy the contents of your SCAD file (i.e. the actual SCAD code), as there’s no file upload option. On the plus side, you can create multiple SCAD files in the tool itself, which makes it easy to handle SCAD files that reference external modules.
To convert a SCAD file to STL in OpenSCAD Cloud, you’ll need to do the following:
You can find out more about using this handy tool in a short YouTube video.
We’ve noted already that SCAD files can contain more information than STLs can handle, such as color or component part information. For most this isn’t a big deal, but if it is to you, perhaps the time is right to consider a conversion to the 3MF format instead of STL. You may also want to consider other 3D printing file formats depending on what your needs are.
As noted, SCAD files can take a long time to render, a necessary step before exporting as an STL. For occasional SCAD file conversions, this may not be an issue, but there are tools available that render the SCAD model in a different way. Instead of working out every surface in 3D, it takes an approach a bit like a slicer (see image) using 2D layers – it can render models over 100x faster!
The downside is that the rendered model isn’t so smooth, but for many 3D prints, this isn’t a big deal as long as the printed layer height isn’t very fine. It requires a bit of knowledge of compiling software. Take a look at hob3l on GitHub if you’re interested in learning more.
A final consideration is that just because a SCAD file is converted into an STL file, this doesn’t necessarily mean it can be sliced successfully. There are a few known instances with OpenSCAD in which the conversion resulted in non-manifold STLs. Luckily, this is easy to deal with, as STLs can be repaired.
License: The text of "SCAD to STL: How to Convert SCAD Files to STL" by All3DP is licensed under a Creative Commons Attribution 4.0 International License.