OpenSCAD User Manual - Wikibooks, open books for an open world (2024)


  • 1 Introduction
  • 2 Additional Resources
  • 3 History
  • 4 The OpenSCAD User Manual
  • 5 The OpenSCAD Language Reference
  • 6 Work in progress

Introduction[edit | edit source]

OpenSCAD is software for creating solid 3D CAD objects.
It is free software and available for GNU/Linux, Microsoft Windows and Mac OS X.

Unlike most free software for creating 3D models (such as the well-known application Blender), OpenSCAD does not focus on the artistic aspects of 3D modelling, but instead focuses on the CAD aspects. So it might be the application you are looking for when you are planning to create 3D models of machine parts, but probably is not what you are looking for when you are more interested in creating computer-animated movies or organic life-like models.

OpenSCAD, unlike many CAD products, is not an interactive modeler. Instead it is something like a 2D/3D-compiler that reads in a program file that describes the object and renders the model from this file. This gives you (the designer) full control over the modelling process. This enables you to easily change any step in the modelling process and make designs that are defined by configurable parameters.

OpenSCAD has two main operating modes, Preview and Render. Preview is relatively fast using 3D graphics and the computer's GPU, but is an approximation of the model and can produce artifacts; Preview uses OpenCSG and OpenGL. Render generates exact geometry and a fully tessellated mesh. It is not an approximation and as such it is often a lengthy process, taking minutes or hours for larger designs. Render uses CGAL as its geometry engine.

OpenSCAD provides two types of 3D modelling:

SVG is used for 2D while Autocad DXF files can be used as well for the data exchange format for 2D outlines. In addition to 2D paths for extrusion it is also possible to read design parameters from DXF files. Besides DXF files, OpenSCAD can read and create 3D models in the open 3mf, STL, OFF and many more file formats.

OpenSCAD can be downloaded from More information is available on the mailing list.

Additional Resources[edit | edit source]

A clear guided introduction to using OpenSCAD and to the OpenSCAD language is available in the OpenSCAD Tutorial.

For Teachers: a basic 25-slide presentation from 2014 is available under GNUFDL to walk your students through the process of using OpenSCAD here.

Fablab Lannion (France) edited a nice French-language interactive tutorial that you might appreciate.

A "cheat sheet" is a useful quick reference for the OpenSCAD language, with each item linking back to this Wikibook.

A list of books can be found here.

History[edit | edit source]

Periodically the two manuals below get cleaned up or have major transitions.Consider archiving the manuals prior to starting a major update.

This can be done for the two 'printable version' links below to the Internet Archive

  • 2018-04-25 The OpenSCAD User Manual - Print Version & The OpenSCAD Language - Print Version
  • 2019-07-22 The OpenSCAD User Manual Which includes links to the archives of the above two printed versions (as of this date).

The Wayback Machine no longer has a free user requested site archive, so below is just the two 'printable version' manuals

  • 2020-12-11 The OpenSCAD User Manual - Print Version & The OpenSCAD Language - Print Version
OpenSCAD User Manual - Wikibooks, open books for an open world (2)

A printable version of OpenSCAD User Manual is available. OpenSCAD_User_Manual (edit it)

  1. Introduction
  2. First Steps
  3. The OpenSCAD User Interface
  4. Input Devices
  5. Customizer
  6. Import - STL, 3MF, OFF, AMF, DXF, SVG, CSG
    1. SVG Import
  7. Export - STL, 3MF, OFF, AMF, DXF, SVG, CSG, PNG
    1. STL Export
    2. CSG Export
    3. DXF Extrusion
    4. Other 2D formats
  8. Example Projects
    1. Strandbeest
  9. Paths
  10. Using an external Editor with OpenSCAD
  11. Integration with other applications
  12. Using OpenSCAD in a command line environment
  13. Building OpenSCAD from Sources
    1. Building on Linux/UNIX
    2. Cross-compiling for Windows on Linux or Mac OS X
    3. Building on Windows (Outdated)
    4. Building on Windows (New)
    5. Building on Mac OS X
    6. Submitting patches
  14. Frequently Asked Questions
  15. Libraries
  16. Tips and Tricks
  17. Command Glossary - Very short name and syntax reference
OpenSCAD User Manual - Wikibooks, open books for an open world (3)

A printable version of OpenSCAD User Manual is available. The_OpenSCAD_Language (edit it)

  1. The OpenSCAD Language
    1. General - READ THIS FIRST - comments, values and data types, variables, vectors, getting input
  2. 3D objects -
    1. 3D Primitive Solids - cube, sphere, cylinder, polyhedron
    2. 3D to 2D Projection
  3. 2D Objects
    1. 2D Primitives - square, circle, polygon
    2. Text - Generate text using installed or user supplied font files.
    3. 2D to 3D - linear_extrude, rotate_extrude
  4. Transform
    1. color
    2. rotate, translate, mirror, multmatrix
    3. scale, resize
    4. offset, minkowski, hull
    5. Combining transformations
  5. Boolean combination
    1. union, difference, intersection, render
  6. Other Functions and Operators
    1. Conditional and Iterator Functions - for, intersection_for, if, conditional?:, assign, let
    2. Mathematical Operators - General, Vectors, Matrix multiplication
    3. Mathematical Functions
      1. Trigonometric (cos sin tan acos asin atan atan2)
      2. Other (abs ceil concat cross exp floor ln len let log lookup max min norm pow rands round sign sqrt)
    4. String Functions - str, chr, ord
    5. Type Test Functions - is_undef, is_bool, is_num, is_string, is_list
    6. List Comprehensions
    7. Other Language Features - Special '$' variables, echo, render, surface, search , version(), version_num(), parent_module(n) and $parent_modules, assert
  7. User-Defined Functions and Modules - Functions, Modules, Children
  8. Debugging aids - % #! * echo
  9. External libraries and code files
    1. include - SCAD, CSG
    2. use - SCAD
    3. import - STL, OFF, DXF
      1. import_dxf - Deprecated
      2. import_stl - Deprecated
    4. export - STL, OFF, AMF, 3MF, DXF, SVG, PNG, CSG
    5. surface - PNG

This section contains documentation about ongoing work which is available as experimental features in snapshot versions of OpenSCAD or not yet integrated at all and pending in a branch or pull-request at the OpenSCAD github repository.

  • Work in progress
OpenSCAD User Manual - Wikibooks, open books for an open world (2024)


What language is OpenSCAD written in? ›

What is $fn in OpenSCAD? ›

$fs is the minimum size of a fragment. The default value is 2 so very small circles have a smaller number of fragments than specified using $fa. The minimum allowed value is 0.01. Attempting to set a lower value causes a warning. $fn is number of fragments and usually has the default value of 0.

What files can OpenSCAD open? ›

Besides DXF files OpenSCAD can read and create 3D models in the STL and OFF file formats.

Where does OpenSCAD save files? ›

Before starting a preview or render process, the OpenSCAD editor writes a backup file in case there are unsaved changes. This file is stored in the users documents folder in a separate directory (e.g. on Linux this is normally $HOME/. local/share/OpenSCAD/backups ).

Is OpenSCAD better than FreeCAD? ›

For mechanical and architectural design, FreeCAD's parametric, plugin-extensible modeling and BIM capabilities are superior. However, for precision in creating machine parts and open-source hardware, the direct control and reproducibility offered by OpenSCAD's language-based approach proves more beneficial.

What is OpenSCAD good for? ›

OpenSCAD is designed as a CAD package for programmers and relies on a C++ script to generate 3D shapes. As such, it comes with limitations and isn't good for creating complex multi-part assemblies. However, it is very useful for generating models that are heavily parameter driven.

What are the data types in OpenSCAD? ›

Values and data types

A value in OpenSCAD is either a Number (like 42), a Boolean (like true), a String (like "foo"), a Range (like [0: 1: 10]), a Vector (like [1,2,3]), or the Undefined value (undef). Values can be stored in variables, passed as function arguments, and returned as function results.

How do I use OpenSCAD in FreeCAD? ›

Configuring OpenSCAD workbench in FreeCAD
  1. Open FreeCAD.
  2. Switch to OpenSCAD workbench.
  3. Choose Edit → Preferences → OpenSCAD from the Top menu. Point FreeCAD to the OpenSCAD executable (section: General OpenSCAD settings). All the other values on the settings-page could be left at default.
Aug 22, 2021

What does FN mean in typing? ›

(FuNction key) A keyboard modifier key that works like a Shift key to activate a second function on a dual-purpose key. Commonly found on laptop keyboards, the Fn key is used to control hardware functions such as screen brightness and speaker volume.

How do I export from OpenSCAD to PDF? ›

After rendering with F6, the "File --> Export" menu can be used to export as STL, OFF, AMF, 3MF, DXF, SVG, CSG, PNG (image), or PDF. Be sure to check the console window for error messages.

What format does OpenSCAD export to? ›

File formats
  • Views: can be exported in PNG format.
  • 2D models can be exported in SVG, AutoCAD DXF, and PDF.
  • 3D parts can be exported in 3MF, AMF, OFF, and STL as simple volumes. There is no color, material, or parts definition in the exported model.

What is an OpenSCAD file? ›

OpenSCAD is a software for creating solid 3D CAD models. It is free software and available for Linux/UNIX, Windows and Mac OS X. Unlike most free software for creating 3D models (such as Blender) it does not focus on the artistic aspects of 3D modelling but instead on the CAD aspects.

What is the OpenSCAD language? ›

OpenSCAD is a descriptive, text-based programming language that uses a familiar syntax, if statements, for loops, variables, and arithmetic to combine simple geometric primitives into complex objects.

Can OpenSCAD import SVG? ›

OpenSCAD can import the geometric structure of SVG files.

What does hull do in OpenSCAD? ›

hull() is a simple command to use, merely place whatever objects from which you want to form a hull as children of the command. The hull command() merges the outermost bits to form a single object.

What programming language is Temple Run written in? ›

Well apparently! I guess, like every other 3D game Imangi studios used Unity 3D as their game engine and languages like C++, C# ,Boo or JS for some effects and most importantly swift/objective-c or java, xml depending on the platform. It was used making many languages not a particular one.

What language is FreeCAD written in? ›

FreeCAD is built from scratch to be totally controlled by Python scripts.

What language is military software written in? ›

Examples of systems where Ada is used include avionics, air traffic control, railways, banking, military and space technology. Ada's dynamic memory management is high-level and type-safe.

Top Articles
Latest Posts
Article information

Author: Maia Crooks Jr

Last Updated:

Views: 5369

Rating: 4.2 / 5 (63 voted)

Reviews: 86% of readers found this page helpful

Author information

Name: Maia Crooks Jr

Birthday: 1997-09-21

Address: 93119 Joseph Street, Peggyfurt, NC 11582

Phone: +2983088926881

Job: Principal Design Liaison

Hobby: Web surfing, Skiing, role-playing games, Sketching, Polo, Sewing, Genealogy

Introduction: My name is Maia Crooks Jr, I am a homely, joyous, shiny, successful, hilarious, thoughtful, joyous person who loves writing and wants to share my knowledge and understanding with you.