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.

Back to Contents

1
SCAD to STL: How to Convert SCAD Files to STL

Use OpenSCAD

A rendered SCAD file prior to exporting it as an STL
A rendered SCAD file prior to exporting it as an STL (Source: Ken Douglas via All3DP)

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:

  1. Render the file by either pressing the F6 key, going to “Design menu > Render”, or clicking the Render button in the Editor or Viewing Area windows (see illustration above).
  2. Assuming no errors are generated, press either the STL button in the Viewing Area (see illustration) or go to “File > Export > Export as STL”. This will bring up a dialogue box that will allow you to name the file and save it.

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.

Back to Contents

Advertisement
Advertisement
Advertisement
2
SCAD to STL: How to Convert SCAD Files to STL

Use an Online File Converter

Image of: 2. Use an Online File Converter
For online converters, the user interface and process could not be simpler (Source: AnyConv)

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:

  1. Choose an online converter (see options below).
  2. Upload the required SCAD file.
  3. Press “Convert” (or similar).
  4. Download your converted STL.

Options

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.

  • AnyConv is very simple to use, with no frills and the least confusing user interface. Unlike most of the others, the STL file produced is in ASCII format, which some may find useful. It’s worth trying.
  • Fabconvert was consistently fast and accurate in our tests. It offers a preview of the conversion as a quick check before you commit to downloading. The STL files it creates are in binary format.
  • ImageToStl produced results much like Fabconvert’s and has an unusual option to produce “color STLs” – a variant of STL files that preserve color information. It also has the option to download zip file versions of the STLs, which may also be useful in some cases.

Back to Contents

Advertisement
Advertisement
Advertisement
3
SCAD to STL: How to Convert SCAD Files to STL

Use FreeCAD

Importing and using a SCAD file in FreeCAD
Importing and using a SCAD file in FreeCAD (Source: R-Frank via FreeCAD Documentation)

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:

  1. Go to “File > Open”, then choose the SCAD file you want to import. If you’re not making changes, it’s not important which workbench is activated at this stage. FreeCAD will import the SCAD file and build up a tree with primitives and Boolean operations.
  2. Once that’s done, select “File > Export”.
  3. In the “Export file” dialogue, select “STL Mesh” from “Save as type”. (The file type will default to STL unless you specify something else.)
  4. Under “File name”, enter the name of the file of your choice.

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.

Back to Contents

Advertisement
Advertisement
Advertisement
4
SCAD to STL: How to Convert SCAD Files to STL

Use an Online SCAD Editor

A simplified online version of OpenSCAD
A simplified online version of OpenSCAD (Source: Ken Douglas via All3DP)

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:

  1. Go to OpenSCAD Cloud (there’s a login option, but this isn’t required).
  2. Copy the actual SCAD code into the editor.
  3. Make any required changes.
  4. Press the Play button (the equivalent of rendering in OpenSCAD).
  5. Select “Export STL”.

You can find out more about using this handy tool in a short YouTube video.

Back to Contents

Advertisement
Advertisement
SCAD to STL: How to Convert SCAD Files to STL

Other Considerations

Image of: Other Considerations
An approach to speed up rendering by 100x: SCAD render on the left, hob3l on the right (Source: moehriegitt via GitHub)

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.

Back to Contents

Advertisement
Advertisement

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.

Stay informed with notifications from All3DP.

You get a notification when a new article is published.

You can’t subscribe to updates from All3DP. Learn more… Subscribe to updates

You can’t subscribe to updates from All3DP. Learn more…

Topics
Advertisement