SCAD Crash Course

Get started with OpenSCAD, a programming language to generate 3D printable STL models from code
We recommend to install MachineBlocks on your computer if you want to create more complex SCAD scripts.

Basic Shapes

Click through the examples. Read the code carefully and try to understand what is happening.
  • STL Model of a simple cube created with OpenSCAD
  • STL Model of a simple cylinder created with OpenSCAD
  • STL Model of a simple sphere created with OpenSCAD
  • STL Model of a cube and a cylinder combined created with OpenSCAD
  • STL Model of a cube and a sphere combined created with OpenSCAD

Variables

The same examples with variables. Variables are simply words to which a value is assigned. Click on Customize to change the values.
  • STL Model of a simple cube with variables created with OpenSCAD
  • STL Model of a simple cylinder with variables created with OpenSCAD
  • STL Model of a simple sphere with variables created with OpenSCAD
  • STL Model of a cube and a cylinder combined with variables created with OpenSCAD
  • STL Model of a cube and a sphere combined with variables created with OpenSCAD

Operations

You can use operations to create new shapes from various other shapes.
  • STL Model of united shapes created with OpenSCAD
  • STL Model of intersected shapes created with OpenSCAD
  • STL Model of subtracted shapes created with OpenSCAD
  • STL Model of ordered subtracted shapes created with OpenSCAD
  • STL Model of multiple subtracted created with OpenSCAD

Translations

Translations are used to move shapes.
  • STL Model of translated shape along the x-axis created with OpenSCAD
  • STL Model of translated shape along the y-axis created with OpenSCAD
  • STL Model of translated shape along the z-axis created with OpenSCAD
  • STL Model of multiple translated shapes created with OpenSCAD
  • STL Model of nested translations created with OpenSCAD

Rotations

Rotations are used to rotate shapes.
  • STL Model of rotated shape around the x-axis created with OpenSCAD
  • STL Model of rotated shape around the y-axis created with OpenSCAD
  • STL Model of rotated shape around the z-axis created with OpenSCAD
  • STL Model of multiple rotated shapes created with OpenSCAD
  • STL Model of nested rotations created with OpenSCAD

Custom Bricks

With the above knowledge you can create custom LEGO® compatible bricks like these.
  • STL Model of a simple tree on a LEGO® compatible plate
  • STL Model of a sign on a LEGO® compatible plate
Congratulations! If you have understood the examples above, you already have a good understanding of how SCAD works. You probably also have an idea of how we created the MachineBlocks LEGO® compatible STL generator
Further Links
LEGO is a registered trademark of the LEGO Group. MachineBlocks is not affiliated with or sponsored by the LEGO Group.