Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

OpenSCAD CheatSheet, Cheat Sheet of Computer Aided Design (CAD)

OpenSCAD Cheat sheet with: Syntax, Transformations, Functions

Typology: Cheat Sheet

2019/2020

Uploaded on 10/09/2020

koss
koss 🇺🇸

4.8

(16)

243 documents

1 / 1

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Syntax
var
=
value
;
module
name(…) { … }
name();
name(…) = …
name();
include
<….scad>
use
<….scad>
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)
3D
sphere
(radius | d=diameter)
cube
(size, center)
cube
([width,depth,height], center)
(h,r|d,center)
(h,r1|d1,r2|d2,center)
polyhedron
(points, triangles, convexity)
*
!
#
%
Transformations
translate
([x,y,z])
rotate
([x,y,z])
scale
([x,y,z])
resize
([x,y,z],auto)
mirror
([x,y,z])
multmatrix
(m)
color
("colorname")
color
([r,g,b,a])
offset
(r|delta,chamfer)
hull
()
minkowski
()
Boolean operations
union
()
difference
()
intersection
()
Modifier Characters
disable
show only
highlight / debug
transparent / background
Mathematical
abs
sign
sin
cos
tan
acos
asin
atan
atan2
floor
round
ceil
ln
len
let
log
pow
sqrt
exp
rands
min
max
Functions
concat
lookup
str
chr
search
version
version_num
norm
cross
parent_module
(idx)
Other
echo
(…)
for
(i = [
start
:
end
for
(i = [
start
:
step
:
end
for
(i = […,…,…]) { … }
intersection_for
(i = [
start
:
end
intersection_for
(i = [
start
:
step
:
end
intersection_for
(i = […,…,…]) { … }
if
(…) { … }
assign
(…) { … }
import
("….stl")
linear_extrude
(height,center,convexity,twist,slices)
rotate_extrude
(angle,convexity)
surface
(file = "….dat",center,convexity)
projection
(cut)
render
(convexity)
children
([idx])
List Comprehensions
[ for (i =
range
|
list
) i ]
Conditions
[ for (i = …) if (condition(i)) i ]
Assignments
[ for (i = …) let (assignments) a ]
$fa
$fs
$fn
$t
$vpr
$vpt
$vpd
$children
Special variables
minimum angle
minimum size
number of fragments
animation step
viewport rotation angles in degrees
viewport translation
viewport camera distance
number of module children
Links:
Official website
|
Code
|
Issues
|
Manual
|
MCAD library
|
Forum
|
Other links
Edit me on GitHub!
By
Peter Uithoven
@
Fablab Amersfoort
(
CC-BY
)
OpenSCAD CheatSheet
v2015.03

Partial preview of the text

Download OpenSCAD CheatSheet and more Cheat Sheet Computer Aided Design (CAD) in PDF only on Docsity!

Syntax

var = value; module name(…) { … } name(); function name(…) = … name(); include <….scad> use <….scad>

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)

3D

sphere(radius | d=diameter) cube(size, center) cube([width,depth,height], center) cylinder(h,r|d,center) cylinder(h,r1|d1,r2|d2,center) polyhedron(points, triangles, convexity)

Transformations

translate([x,y,z]) rotate([x,y,z]) scale([x,y,z]) resize([x,y,z],auto) mirror([x,y,z]) multmatrix(m) color("colorname") color([r,g,b,a]) offset(r|delta,chamfer) hull() minkowski()

Boolean operations

union() difference() intersection()

Modifier Characters

disable show only highlight / debug transparent / background

Mathematical

abs sign sin cos tan acos asin atan atan floor round ceil ln len let log pow sqrt exp rands min max

Functions

concat lookup str chr search version version_num norm cross parent_module(idx)

Other

echo(…) for (i = [start:end]) { … } for (i = [start:step:end]) { … } for (i = […,…,…]) { … } intersection_for(i = [start:end]) { … } intersection_for(i = [start:step:end]) { … } intersection_for(i = […,…,…]) { … } if (…) { … } assign (…) { … } import("….stl") linear_extrude(height,center,convexity,twist,slices) rotate_extrude(angle,convexity) surface(file = "….dat",center,convexity) projection(cut) render(convexity) children([idx])

List Comprehensions

Generate [ for (i = range | list ) i ] Conditions [ for (i = …) if (condition(i)) i ] Assignments [ for (i = …) let (assignments) a ] $fa $fs $fn $t $vpr $vpt $vpd $children

Special variables

minimum angle minimum size number of fragments animation step viewport rotation angles in degrees viewport translation viewport camera distance number of module children Links: Official website | Code | Issues | Manual | MCAD library | Forum | Other links Edit me on GitHub! By Peter Uithoven @ Fablab Amersfoort (CC-BY)

OpenSCAD CheatSheet v2015.