0% found this document useful (0 votes)
116 views42 pages

Intro To OpenSCAD 2017 UG

This document provides an introduction to OpenSCAD, an open-source parametric 3D modeling software. It discusses how to design objects using primitive shapes and combining them using operations like union, difference, and intersection. It emphasizes making designs parametric by using variables to allow for customization. Modules are introduced as a way to encapsulate complex designs and manipulate them. Techniques like loops and libraries are presented to help with repetitive tasks. Examples are given for applying OpenSCAD to scientific and engineering projects like designing custom tools. The document concludes by challenging the reader to design and 3D print a prototype hand tool from Finland's past.

Uploaded by

ticonzero2010
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)
116 views42 pages

Intro To OpenSCAD 2017 UG

This document provides an introduction to OpenSCAD, an open-source parametric 3D modeling software. It discusses how to design objects using primitive shapes and combining them using operations like union, difference, and intersection. It emphasizes making designs parametric by using variables to allow for customization. Modules are introduced as a way to encapsulate complex designs and manipulate them. Techniques like loops and libraries are presented to help with repetitive tasks. Examples are given for applying OpenSCAD to scientific and engineering projects like designing custom tools. The document concludes by challenging the reader to design and 3D print a prototype hand tool from Finland's past.

Uploaded by

ticonzero2010
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/ 42

Introduction to OpenSCAD

Joshua M. Pearce
Fulbright-Aalto University Distinguished Chair, Aalto University, Finland

Department of Materials Science & Engineering and


Department of Electrical & Computer Engineering,
Michigan Technological University, Houghton, MI, USA
Incredibly Powerful Parametric CAD
Make Everything Parametric
Allows later scaling, changing and newbie
customization
All numbers should be made variables
Can use letters for simple designs // but comment
-advantages: simple equations
-disadvantage: big memory for large projects
Can use variable names describing it // box_length
-advantages: no comments, can read the code in English
-disadvantage: big messy equations
Design Using Primitive Shapes and
Collecting Together

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

“Try before you Buy”=%


union(){
%cube([a,b,c], center=true);
sphere(a, $fn=c);
}
Difference - Subtraction

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();
}

Add, subtract modules etc.


For Repetitive Tasks Use Loops
for (i = [1:12])
{
assign (angle = i*30)
{
rotate(angle, [1,0,0])
example();
}
}
Applying OpenSCAD to Science
Shadow Band Pyranometer
Customization is Easy : OpenSCAD
Parametric Shadowband for Pyranometer

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

Set the resolution

Think about shapes as combina

Cut mass enable custom shapes : b


Still print flat
Ring Stand
Applied to
Future
Printers End:
No limits on
materials
Plate for Buckner
Funnel
Customizer and OS Customizer

24
https://github.com/mtu-most/most-3-d-customizer
Writing
for
Customizer
A Few Tricks

Scale= how big top is to bottom


Offset= how far the smooth x,y
Customize:Aalto Block
Use Past Work
Libraries:

use <MCAD/involute_gears.scad>
include <escapementLibrary.scad>

You are using collections of


Modules written before...
Or pre-defined variables
MOST Lab Libraries
on Github
Do not re-invent the wheel
Stand on the Shoulders of
Giants
Collection of the most useful
libraries written at MTU and
elsewhere
https://github.com/mtu-
most/most-scad-libraries
Some More Tricks to Save Time
$fn=low when designing, high when rendering
F5 for quick look
F6 only when preparing to export STL for 3D printing
Orient print --up
Break complex design into parts for printing and use
Japanese wood working techniques, super glue,
filament rivets, or vitamins to join them
Print prototype fast before going for pretty
Cheat Sheet

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.

The finished, cement-filled corn sheller is on the right. A commercial


aluminum corn sheller is on the left. The bottom sheller that was cut from
a PVC pipe cap. It did not perform as well as the can.
Step 1: Break Complex Object Into
Simple Parts
Bucket: 2 tapered cylinders
Fingers: 2 hulled cylinders
Fingers tapered in

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

Anyone can make a corn sheller


perfect for them with no coding.
Sheller in Action
http://www.appropedia.org/Corn_sheller

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

You might also like