Welcome to SCADLite, a completely offline, browser-based OpenSCAD environment. Below you'll find quick keyboard shortcuts, compatibility notes, and the OpenSCAD Cheat Sheet, which contains a helpful OpenSCAD modeling syntax references.
[F1] : Toggle Help and OpenSCAD Cheat Sheet Menu[Ctrl] + [,] : Toggle Workspace Settings[F5] or [Ctrl] + [Enter] : Preview Model[F6] : Render Model[F7] : Export to STL/3MF[Ctrl] + [S] : Download Editor Cache as .scad Text File[Ctrl] + [O] : Open .scad FileScroll down for syntax. Click to highlight, then copy and paste directly into the editor.
var = value;module name(...) { ... }name();function name(...) = ...;include <filename.scad>use <filename.scad>circle(radius | d=diameter);square(size, center);square([width, height], center);polygon([points]);polygon([points], [paths]);text(text, size, font, halign, valign, spacing, direction, language, script);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, faces, convexity);translate([x, y, z])rotate([x, y, z])rotate(a, [x, y, z])scale([x, y, z])resize([x, y, z], auto)mirror([x, y, z])multmatrix(m)color("colorname", alpha)color([r, g, b, a])offset(r|delta, chamfer)hull()minkowski()union()difference()intersection()linear_extrude(height, center, convexity, twist, slices, scale, $fn, $fa, $fs)rotate_extrude(angle, convexity, $fn, $fa, $fs)projection(cut)surface(file, center, invert, convexity)* Disable (ignores the subtree)! Show only (ignores everything else)# Highlight (draws in transparent pink)% Transparent (draws in transparent gray)for (i = [start:end]) { ... }for (i = [start:step:end]) { ... }for (i = [...]) { ... }intersection_for(i = [start:end]) { ... }if (...) { ... } else { ... }[ for (i = range|list) i ][ for (i = ...) if (condition(i)) i ][ for (i = ...) let (a = ...) a ]abs(), sign(), sin(), cos(), tan(), acos(), asin(), atan(), atan2()floor(), round(), ceil(), ln(), len(), let(), log(), pow(), sqrt(), exp()rands(), min(), max(), norm(), cross(), concat(), lookup()str(), chr(), ord(), search(), version(), version_num(), parent_module()echo(...)render(convexity)import("....ext")$fa Minimum angle$fs Minimum size$fn Number of fragments$t Animation step$vpr Viewport rotation$vpt Viewport translation$vpd Viewport camera distance$children Number of module children* OpenSCAD Cheat Sheet content adapted from the OpenSCAD CheatSheet by Peter Uithoven @ Fablab Amersfoort, licensed under CC-BY.