OpenSCAD

v2021.01

Constants

undef
undefined value
PI
mathematical constant π (~3.14159)

Special variables

$fa
minimum angle
$fs
minimum size
$fn
number of fragments
$t
animation step
$vpr
viewport rotation angles in degrees
$vpt
viewport translation
$vpd
viewport camera distance
$vpf
viewport camera field of view
$children
 number of module children
$preview
 true in F5 preview, false for F6

Modifier Characters

*
disable
!
show only
#
highlight / debug
%
transparent / background

2D

circle(radius | d=diameter) square(size,center) square([width,height],center) polygon([points]) polygon([points],[paths]) text(t, size, font,
     halign, valign, spacing,
     direction, language, script)
import("….extformats: DXF|SVG", convexity) projection(cut)

List Comprehensions

Generate [ for (i = range|list) i ] Generate [ for (init;condition;next) i ] Flatten [ each i ] Conditions [ for (i = …) if (condition(i)) i ] Conditions [ for (i = …) if (condition(i)) x else y ] Assignments [ for (i = …) let (assignments) a ]