0% found this document useful (0 votes)
63 views1 page

OpenSCAD CheatSheet

The document describes the syntax and features of OpenSCAD, an open-source 3D modeling program. It includes details about 2D and 3D primitives, Boolean operations, functions, variables, flow control, and transformations that can be used in OpenSCAD.

Uploaded by

pawaller
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
63 views1 page

OpenSCAD CheatSheet

The document describes the syntax and features of OpenSCAD, an open-source 3D modeling program. It includes details about 2D and 3D primitives, Boolean operations, functions, variables, flow control, and transformations that can be used in OpenSCAD.

Uploaded by

pawaller
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

OpenSCAD v2019.

05
Syntax 2D Boolean operations Functions
var = value; circle(radius | d=diameter) union() concat
var = cond ? value_if_true : value_if_false; square(size,center) difference() lookup
module name(…) { … } square([width,height],center) intersection() str
name(); polygon([points]) chr
function name(…) = … polygon([points],[paths]) ord
name(); List Comprehensions
include <….scad> text(t, size, font, search
halign, valign, spacing, Generate [ for (i = range|list) i ] version
use <….scad> direction, language, script) Generate [ for (init;condition;next) i ]
import("….ext") version_num
Flatten [ each i ] parent_module(idx)
projection(cut)
Constants Conditions [ for (i = …) if (condition(i)) i ]
undef undefined value Conditions [ for (i = …) if (condition(i)) x else y ]
3D Assignments [ for (i = …) let (assignments) a ] Mathematical
PI mathematical constant π (~3.14159)
abs
sphere(radius | d=diameter)
sign
cube(size, center) Flow Control
Special variables cube([width,depth,height], center)
sin
for (i = [start:end]) { … } cos
$fa minimum angle cylinder(h,r|d,center) for (i = [start:step:end]) { … } tan
$fs minimum size cylinder(h,r1|d1,r2|d2,center) for (i = […,…,…]) { … } acos
$fn number of fragments polyhedron(points, faces, convexity) for (i = …, j = …, …) { … } asin
$t animation step import("….ext") intersection_for(i = [start:end]) { … } atan
$vpr viewport rotation angles in degrees linear_extrude(height,center,convexity,twist,slices) intersection_for(i = [start:step:end]) { … } atan2
$vpt viewport translation rotate_extrude(angle,convexity) intersection_for(i = […,…,…]) { … } floor
$vpd viewport camera distance surface(file = "….ext",center,convexity) if (…) { … } round
$children number of module children let (…) { … } ceil
$preview true in F5 preview, false for F6
Transformations ln
translate([x,y,z]) Type test functions len
Modifier Characters rotate([x,y,z]) is_undef let
rotate(a, [x,y,z]) is_bool log
* disable
scale([x,y,z]) pow
! show only is_num
resize([x,y,z],auto) sqrt
# highlight / debug is_string
mirror([x,y,z]) exp
% transparent / background is_list
multmatrix(m) rands
color("colorname",alpha) min
color("#hexvalue") Other max
color([r,g,b,a]) echo(…) norm
offset(r|delta,chamfer) render(convexity) cross
hull() children([idx])
minkowski() assert(condition, message)
assign (…) { … }

Links: Official website | Code | Issues | Manual | MCAD library | Forum | Other links

Edit me on GitHub!
By Peter Uithoven @ Fablab Amersfoort (CC-BY)

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy