OpenSCAD User Manual


OpenSCAD logo
OpenSCAD logo

Introduction

edit

OpenSCAD is an opensource application for modelling and animating Solid CAD objects in three dimensions.

It is offered as free software and is available for several platforms.

OpenSCAD provides a functional descriptive language that may be used to numerically describe a 3D object using primitive shapes assembled and combined using 3D boolean operations. It is well suited to Computer-aided design tasks that will lead to production using CNC machining or 3D Printing processes.

OpenSCAD is not an interactive modelling tool in the way that Blender or AutoCAD's apps are. Rather it uses a compiler to generate a run-time process to draw the 3D shapes specified by the instructions in an OpenSCAD file. Its user interface does offer a feature rich editing panel for the .scad programs currently loaded, an on-screen preview, a rendering engine to produce images, and a limited animation function.

OpenSCAD renders in two modes, Preview and Render.

Preview uses OpenCSG and OpenGL to perform fast, frame buffer based rendering for the on-screen preview. This is a clever way of painting pixels without the effort of generating the mesh that a more rigorous rendering engine would want. There are some known issues with artifacts in preview rendering but they can be bypassed by doing a "full render" of the model.

The CGAL geometry engine is used to generate an accurate, polygonal mesh from the model that is then rendered into an image and displayed.

More recently development versions have replaced CGAL with Manifold for rendering.

OpenSCAD is available via the common distribution methods as listed on the downloads page.

Participation

edit

Information about OpenSCAD development is available on GitHub.

The ways to participate in the community include the mailing list, and chatting on IRC.

Suggestions for features, feedback and bug reports may be written using GitHub Issues, but please read the preferred Way of Work before submitting.

Operations Manual

edit

These pages were originally created as part of the OpenSCAD User Manual, now in the process of being restructured.

  1. First Steps
  2. The OpenSCAD User Interface
  3. Input Devices
  4. Customizer
  5. Export
  6. Paths
  7. Using an external Editor with OpenSCAD
  8. Integration with other applications
  9. Using OpenSCAD in a command line environment

The OpenSCAD Language Reference

edit
  1. The OpenSCAD Language
    1. General - READ THIS FIRST
    2. values and data types
    3. variables
    4. vectors
    5. vector initialization
  2. 3D Object Modules -
    1. 3D Primitive Solids - cube, sphere, cylinder, polyhedron
    2. 3D to 2D Projection
    3. Importing 3D Geometry
  3. 2D Object Modules
    1. 2D Primitives - square, circle, polygon
    2. Text draw text objects using fonts.
    3. 2D to 3D - extrusions
    4. Importing 2D Geometry
  4. Transforms and Modification Operator Modules
    1. color
    2. rotate, translate, mirror, multmatrix
    3. scale, resize
    4. offset, minkowski, hull
    5. Combining transformations
  5. Boolean Combinations
    1. union, difference, intersection, render
  6. Flow of Control Statements
    1. Conditional and Iterator Functions - for, intersection_for, if, conditional ? :
    2. assign, let
  7. Expressions
    1. Mathematical Operators
    2. Mathematical Functions
    3. Other
    4. String Functions - str, chr, ord
    5. Type Test Functions
  1. Other Language Features - Special '$' variables, echo, render, surface, search , version(), version_num(), parent_module(n) and $parent_modules, assert
  2. User-Defined Functions and Modules - Functions, Modules, Children
  3. Debugging aids -  % # ! * echo
  4. 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

Work in progress

edit

This section is about experimental features in the development snapshots of OpenSCAD.

The status of particular fixes and features may be seen in the GitHub project. Look for :

Libraries

edit

Libraries

Examples

edit

Example Projects

Strandbeest

Build Manual

edit

Notes on Building OpenSCAD from Sources

Choose your Platform:

Additional Resources

edit
  1. Command Glossary - Very short name and syntax reference
  2. Frequently Asked Questions
  3. Tips and Tricks

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

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

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