OpenSCAD – CheatSheet

Organized by skill level

The cheat sheet over at OpenSCAD.org is terrific. You might want to check that out first. This version is focused on the beginner user and is organized with that in mind.

3D Primitives

Command Layout

sphere( radius | diameter );

cube ( size, center );

cube ( [width,depth,height],center);

cylinder( height, radius, center );

cylinder( h, r1, r2, center );

Command Example

sphere ( 10 );

cube (10, center=true );

cube( 10,20,7 );

cylinder( 10,2,center=false );

cylinder( 10,5,1,center=true );

2D Primitives

circle( radius);

square( size, center);

square( [width, height],center)

circle( 10 );

square ( 8 , center = true );

square ( [ 10,5 ], center = true );

Transformations

translate( [x,y,z] );

rotate([x,y,z]);

mirror([x,y,x]);

scale([x,y,x]);

translate( [ 10,5,7 ] );

rotate([3,4,3]);

Move the child object.

Rotate the child object

move the child object to its mirror

scale the child object

Boolean operations

union()

difference()

intersection()

create a union of all child objects

subtract all child objects from the first

Flow Control

for(i = [start:step:end]) { geometries and transformations }

if( ){ geometries and transformation }

Object Resolution Variable

$fn = xx;

Debug and Edit Tools

These modifiers effect all child object under them.

* disable

! show only

# heading

% transparent

ie., to disable a single child object us : * child(); or for example a cube * cube( 10 );

to disable multiple objects enclose them in curly brackets {}

Advanced 3d Shapes

polyhedron

Advanced 2d Shapes

polygon

Advanced Transformations

hull()

minkowski()

Leave a Reply

Your email address will not be published. Required fields are marked *

https://fossmugs.com/index.php/product/openscad-exploded-11-oz-mug/

%d bloggers like this: