diff --git a/cheatsheet/index.html b/cheatsheet/index.html
index 9495952..624cdca 100644
--- a/cheatsheet/index.html
+++ b/cheatsheet/index.html
@@ -14,26 +14,39 @@
Syntax
var = value;
- var = cond ? value_if_true : value_if_false;
- var = function (x) x + x;
- module name(…) { … }
- name();
- function name(…) = …
- name();
+ var = cond ? value_if_true : value_if_false;
+ var = function (x) x + x;
+ module name(…) { … }
name();
+
include <….scad>
- use <….scad>
+ use <….scad>
Constants
-
+
undef
- undefined value
+
+
PI
- mathematical constant π (~3.14159)
@@ -45,6 +58,8 @@ Operators
n - m
- Subtraction
n * m
- Multiplication
n / m
- Division
+
+
n % m
- Modulo
n ^ m
- Exponentiation
n < m
- Less Than
@@ -67,6 +82,8 @@ Special variables
- minimum size
$fn
- number of fragments
+
+
$t
- animation step
$vpr
@@ -98,7 +115,7 @@ Modifier Characters
- transparent / background
-
+
2D
circle(radius | d=diameter)
square(size,center)
@@ -116,11 +133,13 @@ 3D
cube([width,depth,height], center)
cylinder(h,r|d,center)
cylinder(h,r1|d1,r2|d2,center)
+
polyhedron(points, faces, convexity)
import("….extformats: STL|OFF|AMF|3MF", convexity)
linear_extrude(height,center,convexity,twist,slices)
rotate_extrude(angle,convexity)
surface(file = "….extformats: DAT|PNG",center,convexity)
+
Transformations
@@ -128,19 +147,21 @@ Transformations
rotate([x,y,z])
rotate(a, [x,y,z])
scale([x,y,z])
- resize([x,y,z],auto,convexity)
mirror([x,y,z])
- multmatrix(m)
+ hull()
+ minkowski(convexity)
color("colorname",alpha)
+
-
+
Lists
list = […, …, …];
@@ -157,7 +178,7 @@ Boolean operations
difference()
intersection()
-
+
List Comprehensions
Generate [ for (i = range|list) i ]
Generate [ for (init;condition;next) i ]
@@ -166,7 +187,7 @@ List Comprehensions
Conditions [ for (i = …) if (condition(i)) x else y ]
Assignments [ for (i = …) let (assignments) a ]
-
+
Flow Control
for (i = [start:end]) { … }
for (i = [start:step:end]) { … }
@@ -178,7 +199,7 @@ Flow Control
if (…) { … }
let (…) { … }
-
+
Type test functions
is_undef
is_bool
@@ -187,7 +208,7 @@ Type test functions
is_list
is_function
-
+
Other
echo(…)
render(convexity)
@@ -198,7 +219,7 @@ Other
diff --git a/cheatsheet/snapshot.html b/cheatsheet/snapshot.html
index ae0d3f7..f7c9219 100644
--- a/cheatsheet/snapshot.html
+++ b/cheatsheet/snapshot.html
@@ -14,26 +14,39 @@
Syntax
var = value;
- var = cond ? value_if_true : value_if_false;
- var = function (x) x + x;
- module name(…) { … }
- name();
- function name(…) = …
- name();
+ var = cond ? value_if_true : value_if_false;
+ var = function (x) x + x;
+ module name(…) { … }
name();
+
include <….scad>
- use <….scad>
+ use <….scad>
Constants
-
+
undef
- undefined value
+
+
PI
- mathematical constant π (~3.14159)
@@ -45,6 +58,8 @@ Operators
n - m
- Subtraction
n * m
- Multiplication
n / m
- Division
+
+
n % m
- Modulo
n ^ m
- Exponentiation
n < m
- Less Than
@@ -67,6 +82,8 @@ Special variables
- minimum size
$fn
- number of fragments
+
+
$t
- animation step
$vpr
@@ -98,7 +115,7 @@ Modifier Characters
- transparent / background
-
+
2D
circle(radius | d=diameter)
square(size,center)
@@ -116,11 +133,13 @@ 3D
cube([width,depth,height], center)
cylinder(h,r|d,center)
cylinder(h,r1|d1,r2|d2,center)
+
polyhedron(points, faces, convexity)
import("….extformats: STL|OFF|AMF|3MF", convexity)
linear_extrude(height,v,center,convexity,twist,slices)
rotate_extrude(angle,convexity)
surface(file = "….extformats: DAT|PNG",center,convexity)
+
Transformations
@@ -128,20 +147,22 @@ Transformations
rotate([x,y,z])
rotate(a, [x,y,z])
scale([x,y,z])
- resize([x,y,z],auto,convexity)
mirror([x,y,z])
- multmatrix(m)
+ hull()
+ minkowski(convexity)
color("colorname",alpha)
+
-
+
Lists
list = […, …, …];
@@ -158,7 +179,7 @@ Boolean operations
difference()
intersection()
-
+
List Comprehensions
Generate [ for (i = range|list) i ]
Generate [ for (init;condition;next) i ]
@@ -167,7 +188,7 @@ List Comprehensions
Conditions [ for (i = …) if (condition(i)) x else y ]
Assignments [ for (i = …) let (assignments) a ]
-
+
Flow Control
for (i = [start:end]) { … }
for (i = [start:step:end]) { … }
@@ -179,7 +200,7 @@ Flow Control
if (…) { … }
let (…) { … }
-
+
Type test functions
is_undef
is_bool
@@ -188,7 +209,7 @@ Type test functions
is_list
is_function
-
+
Other
echo(…)
render(convexity)
@@ -199,7 +220,7 @@ Other