Intro To OpenSCAD 2017 UG
Intro To OpenSCAD 2017 UG
Joshua M. Pearce
Fulbright-Aalto University Distinguished Chair, Aalto University, Finland
Simple → Complex
When Designing: Show X-Y-Z
Helps Orient
Primitives
Know which way is
up for printing!
Primitive Objects
a=5;
b=10;
c=20;
cube([a,b,c], center=true);
sphere(a, $fn=c);
//$fn is the resolution
cylinder(h = c, r1 = b, r2 = a, center = true);
Union Combining Primitives
difference(){
cube([a,b,c], center=true);
sphere(a, $fn=c);
}
Hull: Convex Hull of Child Nodes
hull(){
cube([a,b,c], center=true);
sphere(a, $fn=c);
}
Translate: Moving Stuff Around
union(){
cube([a,b,c], center=true);
translate([0,0,b])sphere(a, $fn=c);
}
Rounded Corners: Minkowski
Minkowski sums allow to add
every element of A to every
$fn=50; element of B.
minkowski() {
cube([10,10,2]);
// rounded corners
cylinder(r=2,h=2);
}
Hand Crafting: Polyhydron
polyhedron ( points = [[0, -10,
60], [0, 10, 60], [0, 10, 0], [0,
-10, 0], [60, -10, 60], [60, 10,
60]],
triangles = [[0,3,2], [0,2,1],
[3,0,4], [1,2,5], [0,5,4],
[0,1,5], [5,2,4], [4,2,3], ]);
Intersection : Keeps All Portions
That Overlap
intersection() {
cylinder (h = 4, r=1, center
= true, $fn=100);
rotate ([90,0,0]) cylinder (h
= 4, r=0.9, center = true,
$fn=100);
}
Make Each Completed
Component a Module
Allows for more complex design
Clears the work space as modules are not shown
unless called
Syntax:
module example(){ put your module scad here }
Call it by:
example();
Modules
module example(){
union(){
cube([a,b,c], center=true);
translate([0,0,b])sphere(a,
$fn=c);
}
}
example();
Manipulate Your Module
rotate([45,0,0])example();
hull() {
example();
}
19
Reverse Engineering Existing
Equipment
Making a simple ring
> Do not design it
the way it was
made
> For ideal FFF
printing you need a
solid base on the
build platform
> Design for all
options for the
future
Ring Stand -
Improved
Define Variables
Design all ring
Stands not just 1
24
https://github.com/mtu-most/most-3-d-customizer
Writing
for
Customizer
A Few Tricks
use <MCAD/involute_gears.scad>
include <escapementLibrary.scad>
http://www.openscad.org/documentation.html
More information
http://www.openscad.org/
http://en.wikibooks.org/wiki/OpenSCAD_User_Manual
http://www.appropedia.org/MOST
http://reprap.org/
Example: 3D Printing For Hand Tools
Shelling corn is a chore done
by hand in much of the rural
developing world. Yet there
are handy corn shellers that
can save people hours of
labor. DIY shellers are a big
chore to make...so you can
print one.
Consider improvements:
Grips on outside – use fingers
Parametric – Design ALL of the
Products at Once
Step 2: Lay out variables with comments to input to
Customizer
Using Modules
Many
Fingers
Bucket Wall
Finger
Finger
Best practices:
Indent to see,
comment everything
$fn=100; one time
Parametric
Corn Sheller
Customized
https://www.youtube.com/watch?v=DYGCtL7tED4
Mini Project
• Practice your OpenSCAD coding by making simple
tools from the past.
• Assignment: design and 3-D print a prototype hand
tool from Finland’s past
• Consider form
• Consider future printing ability for function
• How can you deconstruct a 3-D object into primatives?
Some Ideas