SlideShare ist ein Scribd-Unternehmen logo
1 von 46
3D Design with OpenSCAD
Vicky Somma
vicky@tgaw.com
@TGAW
http://tgaw.wordpress.com
http://www.Shapeways.com/shops/tgaw
This presentation is on SlideShare at:
http://www.slideshare.net/VickyTGAW/3d-design-with-openscad
OpenSCAD – Download
• Free 3D Modeling Software
• Available for Windows, Linux, and MacOS
• Good at “clean” models (taking some of
worry out of the process– you can be
oblivious to “non-manifold” and “bad
face normals”)
• Because it’s instruction-base, it’s easy to
visualize measurements and come back
and tweak it
http://www.openscad.org/downloads.html
OpenSCAD – User Manual
Don’t Be Intimidated!
You Don’t Have to Memorize the Syntax!
Online User Manual
https://en.wikibooks.org/wiki/OpenSCAD_User_Manual
Quick Cheat Sheet
http://www.openscad.org/cheatsheet/
OpenSCAD – Anatomy of User Interface
Text Editor – Where we put our
instructions (“code”)
Viewing Area – Your handiwork!
Renders of the model.
Console – Technical information
about what’s going on (progress
on rendering, any error
messages)
OpenSCAD – Text Editor Commands
Icons to create new files, save, undo, redo, indent,
preview, render, and most importantly for 3D Printing--
export to STL format.
OpenSCAD – Text Editor to Viewing Area
To see how your work looks, you can:
• Use Preview ( ) or Render ( ) icons
• Use the Design->Preview or Design->Render menu options
• Or the fastest option - use F5 for Preview and F6 for Render
OpenSCAD – Viewing Area Commands
Commands for Viewing, Rendering, Zooming In, Changing Views, Turning On or Off
Axis and Measurements Display, Showing Edges Versus Faces
OpenSCAD – The Mouse & the Viewing Area
• Left clicking and dragging allows you to rotate your view
• Right clicking and dragging pans the view
• Scroll wheel allows you to zoom in and out
OpenSCAD – Syntax Common Themes
• ; - The end of an instruction (ie make a cube;)
• // - A comment or label– for your purposes– will be ignored by the
viewing area
• { } - Grouping of commands
• [x,y,z] – “Vectors” (Coordinates, 3D sizes)
Reference: https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/General
OpenSCAD – Primitive Objects – Cube
cube([10,10,10]); cube([10,20,30]);cube([x, y, z]);
Draws 3D boxes
Not necessarily perfect
cubes – you can make
rectangles with it as well.
Reference: https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Primitive_Solids#cube
OpenSCAD – Primitive Objects – Cylinder
cylinder(r=10,h=22);
cylinder(r1=10,r2=3,h=22);
cylinder(r=x,h=z);
cylinder(r1=x,r2=y,h=z);
Draws cylinders – and not
necessarily perfect
cylinders
Reference: https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Primitive_Solids#cylinder
OpenSCAD – Primitive Objects – Cylinder
cylinder(r1=9, r2=0, h=9, $fn=4);
$fn parameter controls # of fragments
Increase– you can make really smooth objects
Decrease it– you can make Triangles, Pentagons, Pyramids, etc.
cylinder(r=9,$fn=3);cylinder(r=9,h=10,$fn=300);
Reference: https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Primitive_Solids#cylinder
OpenSCAD – Primitive Objects – Sphere
sphere(d=22); sphere(d=22, $fn=100);sphere(d=x);
Draws spheres – and you can
control resolution
$fn parameter controls how
smooth it looks
Reference: https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Primitive_Solids#sphere
OpenSCAD – Primitive Objects
You can build a lot out of standard shapes
OpenSCAD – Primitive Objects
You can build a lot out of these standard shapes- “Bipedal Mech” by Mathew Ridge
http://shpws.me/GQX5
OpenSCAD – 2D Objects - Text
text("TGAW");
Text(“x”);
Draws text. Text is great for customizing your models, engraving,
and embossing.
Reference: https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Text
OpenSCAD – 2D Objects - Text
Text(“x”, Font=“Font Name”);
Since OpenSCAD is installed on your machine, you can use any font already on your machine!
text("TGAW", font="Rockwell Extra Bold");
text("TGAW", font="Old English Text MT");
text("TGAW", font="Wingdings");
Reference: https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Text
OpenSCAD – 2D Objects - Polygons
polygon([[-24,0],[0,0],[0,32]
,[-16,32],[-15,28],[-13,24]
,[-12,20],[-12,15],[-13,10]
,[-15,6],[-19,3]]);
Polygon([x1,y1],[x2,y2],etc);
You specify the points to make
customized shapes (which you can
then extrude to 3D if needed)
Reference: https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/2D_Primitives#polygon
OpenSCAD – 2D Objects - Polygons
Need visual help making
Polygons?
http://daid.eu/~daid/3d
A graphical interface that
builds your polygon code for
you.
OpenSCAD – 2D to 3D
linear_extrude(height = 10)
polygon([[-24,0],[0,0],[0,32],[-16,32]
,[-15,28],[-13,24],[-12,20],[-12,15]
,[-13,10],[-15,6],[-19,3]]);
Linear_Extrude(height=x)
Makes your 2D object (circle, square, polygon) 3D
It can even twist the object as it grows up
NO SEMICOLON AFTER IT
(It’s not the end of the statement– we have to tell it what to extrude)
Reference: https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/2D_to_3D_Extrusion#Linear_Extrude
OpenSCAD – 2D to 3D
linear_extrude(height = 20, center = false
, $fn = 100, twist=30)
text("TGAW");
Linear_Extrude(height=x, twist=degrees)
Works on text and you can do fancy stuff like twisting
Reference: https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/2D_to_3D_Extrusion#Linear_Extrude
OpenSCAD – 2D to 3D
rotate_extrude(convexity = 10, $fn=300)
polygon([[-24,0],[0,0],[0,32],[-16,32],[-15,28]
,[13,24],[-12,20],[-12,15],[-13,10]
,[-15,6],[-19,3]]);
Rotate_Extrude()
Your 2D object (circle,
square, polygon) is rotated
around to make a 3D object
(like a cross section)
NO SEMICOLON AFTER IT
It’s not the end of the statement-- we need to tell it
what to extrude.
Reference: https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/2D_to_3D_Extrusion#Rotate_Extrude
OpenSCAD – Import STL
import("C:DownloadsVT.stl",convexity=10);
import(filepath, convexity=10);
The import function lets you bring in
existing 3D models into your project.
Note: In Your filepath, backslashes need to be doubled.
C:DownloadsMyStl.stl -> C:DownloadsMyStl.stl
Tip: If you are using other people’s models, be sure to
check and respect their licensing
(http://www.thingiverse.com/thing:818805 by GlynnLo)
Reference: https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Importing_Geometry
OpenSCAD Basics – Transformations - Translate
cube([22,22,5]);
sphere(d=22, $fn=100);
cube([22,22,5]);
translate([11,11,0])
sphere(d=22, $fn=100);
translate([x,y,z])
Translate MOVES objects– lets you
define the how far to move along
each of the axes.
NO SEMICOLON AFTER IT
(It’s not the end of the statement– we have to tell it what to translate)
Reference: https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Transformations#translate
OpenSCAD – Transformations – Rotate
rotate([x,y,z])
Rotate angles the object.
Guide to the axis is in your preview panel
NO SEMICOLON AFTER IT
(It’s not the end of the statement– we have to tell it what to rotate)
It’s Okay if you Need Some Trial and Error : )
Reference: https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Transformations#rotate
OpenSCAD - Transformations – Rotate
rotate([0,-45,0])
cube([22,22,5]);
rotate([0,0,30])
cube([22,22,5]);
rotate([x,y,z])
rotate([30,-45,30])
cube([22,22,5]);
Reference: https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Transformations#rotate
OpenSCAD - Transformations – Resize
resize([x,y,z],auto=true|false)
Resize allows you to make your object different
sizes where x, y, and z are your new dimensions
NO SEMICOLON AFTER IT
(It’s not the end of the statement– we have to tell it what to resize)
If auto=false, anything left zero stays the same.
If auto=true, anything left zero is sized proportionally. resize([200,0,10], auto=true)
import("VT.stl", convexity=10);
resize([200,0,10], auto=false)
import("VT.stl", convexity=10);
import("VT.stl", convexity=10);
Reference: https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Transformations#resize
OpenSCAD – CSG Modeling
CSG stands for Constructive Solid Geometry.  You don’t need to remember that
Do Remember:
• Powerful!
• Combines your primitive parts/objects.
• Adding, Subtracting, Intersections
Credit: https://en.wikipedia.org/wiki/Constructive_solid_geometry#/media/File:Csg_tree.png
Reference: https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/CSG_Modelling
OpenSCAD – CSG Modeling - Union
Adds objects into a one
union ()
{
object1;
object2;
}
union()
{
cube([5,10,5]);
translate([5,10,2.5])
{
rotate([0,-90,0])
cylinder(d=5, h=5, $fn=30);
}
translate([5,0,2.5])
{
rotate([0,-90,0])
cylinder(d=5, h=5, $fn=30);
}
}
Two cylinders and a cube
After union – single rounded object
Reference: https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/CSG_Modelling#union
OpenSCAD – CSG Modeling - Difference
Subtracts objects from each other
difference ()
{
object1;
object2;
}
difference()
{
cube([5,10,5]);
translate([5.5,10,2.5])
{
rotate([0,-90,0])
cylinder(d=5, h=6, $fn=30);
}
translate([5.5,-1,2.5])
{
rotate([0,-90,0])
cylinder(d=5, h=6, $fn=30);
}
}
Two cylinders and a cube
After “subtracting” the cylinders from
the cube
Reference: https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/CSG_Modelling#difference
OpenSCAD – CSG Modeling - Difference
Practical Use of Difference – Engraving Text!
difference()
{
cube([5,10,5]);
translate([5.5,10,2.5])
{
rotate([0,-90,0])
cylinder(d=5, h=6, $fn=30);
}
translate([5.5,-1,2.5])
{
rotate([0,-90,0])
cylinder(d=5, h=6, $fn=30);
}
translate([2,6.5,0.5])
rotate([90,0,-90])
linear_extrude(height=2)
text("V", font="Old English Text MT", size=4);
}
Reference: https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/CSG_Modelling#difference
OpenSCAD – CSG Modeling - Intersection
Takes where both objects overlap
(like a Venn Diagram)
intersection ()
{
object1;
object2;
}
intersection()
{
cylinder(r=5,h=3);
translate([4,0,0])
cylinder(r=5, h=3);
}
Two cylinders
Intersection – an Almond Shape
Reference: https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/CSG_Modelling#intersection
OpenSCAD – CSG Modeling - Intersection
Practical Use of Intersection – Curving Details!
intersection()
{
sphere(r=9.25, $fn=100);
resize([0,0,11],auto=false)
resize([12,0,0], auto=true)
import("VT.stl", convexity=10);
}
A sphere and a VT Logo Intersection – A curved VT Logo
Reference: https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/CSG_Modelling#intersection
OpenSCAD – CSG Modeling - Combinations
Practical Use of Intersection – Curving Details!
union()
{
sphere(r=9, $fn=100);
intersection()
{
sphere(r=9.25, $fn=100);
resize([0,0,11],auto=false)
resize([12,0,0], auto=true)
import("VT.stl", convexity=10);
}
}
Add a slightly smaller sphere and we have a curved, embossed VT logo on a sphere.
Reference: https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/CSG_Modelling
OpenSCAD – Advanced - Modules
To help readability and reusability, you can make modules.
module name()
{ //your code }
module base_sphere()
{
sphere(r=9, $fn=100);
}
module curved_VT()
{
intersection()
{
sphere(r=9.25, $fn=100);
resize([0,0,11],auto=false)
resize([12,0,0], auto=true)
import("VT.stl", convexity=10);
}
}
union()
{
base_sphere();
curved_VT();
}
union()
{
sphere(r=9, $fn=100);
intersection()
{
sphere(r=9.25, $fn=100);
resize([0,0,11],auto=false)
resize([12,0,0], auto=true)
import("VT.stl", convexity=10);
}
}
Reference: https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Modules
Fun Fact – All objects in a model are already merged into one, no
unions necessary
OpenSCAD – Advanced - Loops
Loops are powerful for repeated tasks
for ( i = [start : increment : end] )
{ //your code }
for (i=[0:5:15])
{
translate([i,0,0])
cylinder(r=1, h=15, $fn=36);
}
Translation– We are going to start at 0. Every 5 mm, draw a
cylinder until we reach 15mm.
Reference: https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Conditional_and_Iterator_Functions#For_Loop
OpenSCAD – Advanced - Loops
“Nested Loops”
for ( i = [start : increment : end], j = [start : increment : end] )
{ //your code }
for (i=[0:5:15],j=[0:5:20])
{
translate([i,j,0])
cylinder(r=1, h=15, $fn=36);
}
Translation– We going to end up with 20 pegs in 4 columns
and 5 rows.
Reference: https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Conditional_and_Iterator_Functions#For_Loop
OpenSCAD – Troubleshooting
Having Unexpected Results?
• Check Your Syntax
(maybe there’s a semi colon after a translate)
• Check the Console for error messages (which would include a
line number)
OpenSCAD – Troubleshooting
• echo allows you to send details to the Console
• // allows you to comment out instructions so you can narrow
down the culprit
echo("i:", i, " j:", j);
OpenSCAD – Troubleshooting
• # allows you to have objects highlighted
difference()
{
cube([5,10,5]);
translate([5.5,10,2.5])
{
rotate([0,-90,0])
cylinder(d=5, h=6, $fn=30);
}
translate([5.5,-1,2.5])
{
#rotate([0,-90,0])
cylinder(d=5, h=6, $fn=30);
}
}
OpenSCAD – Saving and Exporting
• Be sure to Save your code often
• When you’re ready to print, you’ll want to Export to STL file.
• Pre-requisite– Do your official render (F6).
• The system will remind you. : )
OpenSCAD – Code Scavenging!
OpenSCAD even comes
with its OWN examples
which you can open,
review, and tweak to
meet your needs.
OpenSCAD – Code Scavenging!
Thingiverse has a OpenSCAD area full
of shared source code– just search
“OpenSCAD”
http://www.thingiverse.com/search?q
=OpenSCAD
You can download the final .STL file
AND the original .SCAD files, so you
can read and find out how it was
made.
OpenSCAD – Code Scavenging!
• OpenSCAD Community Forums
http://www.openscad.org/community.html
• OpenSCAD reddit
http://www.reddit.com/r/OpenSCAD/
• Good ole Google
OpenSCAD – OpenJSCAD
http://openjscad.org
• Web-based
• Has its own JavaScript, object-oriented
language
• BUT 95% of the OpenSCAD Language is
supported
Quick Tips
• User Guide at
https://github.com/Spiritdude/OpenJSCAD.org/wiki/User-Guide
• //!OpenSCAD at the top tells it you’re using OpenSCAD
• Shift-Enter in the “Text Editor” renders
• Holding down the Left or Right Mouse Button lets you rotate the
View Pane
• Holding down Shift Left Mouse Button lets you pan in the View Pane
THANK YOU!!!
https://twitter.com/tgaw
http://tgaw.wordpress.com
http://www.shapeways.com/shops/tgaw
http://www.instructables.com/member/VickyTGAW
http://instagram.com/VickyTGAW
Vicky Somma
vicky@tgaw.com

Weitere ähnliche Inhalte

Was ist angesagt?

Hidden surface removal
Hidden surface removalHidden surface removal
Hidden surface removal
Ankit Garg
 

Was ist angesagt? (20)

Designing a Minimum Distance classifier to Class Mean Classifier
Designing a Minimum Distance classifier to Class Mean ClassifierDesigning a Minimum Distance classifier to Class Mean Classifier
Designing a Minimum Distance classifier to Class Mean Classifier
 
2015 데브루키 페차쿠차 "Rim Light(림라이트) 만들기"
2015 데브루키 페차쿠차 "Rim Light(림라이트) 만들기"2015 데브루키 페차쿠차 "Rim Light(림라이트) 만들기"
2015 데브루키 페차쿠차 "Rim Light(림라이트) 만들기"
 
Scaling and shearing
Scaling and shearingScaling and shearing
Scaling and shearing
 
Global illumination
Global illuminationGlobal illumination
Global illumination
 
Visible surface identification
Visible surface identificationVisible surface identification
Visible surface identification
 
Hidden surface removal
Hidden surface removalHidden surface removal
Hidden surface removal
 
Ray tracing
Ray tracingRay tracing
Ray tracing
 
Mid point circle algorithm
Mid point circle algorithmMid point circle algorithm
Mid point circle algorithm
 
Introduction to Alphago Zero
Introduction to Alphago ZeroIntroduction to Alphago Zero
Introduction to Alphago Zero
 
2D transformation (Computer Graphics)
2D transformation (Computer Graphics)2D transformation (Computer Graphics)
2D transformation (Computer Graphics)
 
Introduction-to-Unity.ppt
Introduction-to-Unity.pptIntroduction-to-Unity.ppt
Introduction-to-Unity.ppt
 
Graphics pipeline and rendering
Graphics pipeline and renderingGraphics pipeline and rendering
Graphics pipeline and rendering
 
Developing AR and VR Experiences with Unity
Developing AR and VR Experiences with UnityDeveloping AR and VR Experiences with Unity
Developing AR and VR Experiences with Unity
 
Comp4010 Lecture10 VR Interface Design
Comp4010 Lecture10 VR Interface DesignComp4010 Lecture10 VR Interface Design
Comp4010 Lecture10 VR Interface Design
 
AlphaGo and AlphaGo Zero
AlphaGo and AlphaGo ZeroAlphaGo and AlphaGo Zero
AlphaGo and AlphaGo Zero
 
2d-transformation
2d-transformation2d-transformation
2d-transformation
 
Image segmentation
Image segmentationImage segmentation
Image segmentation
 
Parallel and perspective projection in 3 d cg
Parallel and perspective projection in 3 d cgParallel and perspective projection in 3 d cg
Parallel and perspective projection in 3 d cg
 
3D Transformation
3D Transformation3D Transformation
3D Transformation
 
2D Transformation
2D Transformation2D Transformation
2D Transformation
 

Andere mochten auch

Tinkercad Tutorial- COM 250
Tinkercad Tutorial- COM 250Tinkercad Tutorial- COM 250
Tinkercad Tutorial- COM 250
kaytlynleonard
 
Presentación impresora 3d
Presentación impresora 3dPresentación impresora 3d
Presentación impresora 3d
marina_benabad92
 

Andere mochten auch (14)

3D Printing & Crafts
3D Printing & Crafts3D Printing & Crafts
3D Printing & Crafts
 
Modeling for 3D Printing with Tinkercad
Modeling for 3D Printing with TinkercadModeling for 3D Printing with Tinkercad
Modeling for 3D Printing with Tinkercad
 
Open Scad presentation
Open Scad presentationOpen Scad presentation
Open Scad presentation
 
Impresoras 3D
Impresoras 3DImpresoras 3D
Impresoras 3D
 
Makerbot Objects from Thingiverse
Makerbot Objects from ThingiverseMakerbot Objects from Thingiverse
Makerbot Objects from Thingiverse
 
Nhà sản xuất máy in 3D, máy tạo mẫu nữ trang tại Việt Nam
Nhà sản xuất máy in 3D, máy tạo mẫu nữ trang tại Việt NamNhà sản xuất máy in 3D, máy tạo mẫu nữ trang tại Việt Nam
Nhà sản xuất máy in 3D, máy tạo mẫu nữ trang tại Việt Nam
 
Tinkercad Tutorial- COM 250
Tinkercad Tutorial- COM 250Tinkercad Tutorial- COM 250
Tinkercad Tutorial- COM 250
 
Tinkercad lesson 1
Tinkercad lesson 1Tinkercad lesson 1
Tinkercad lesson 1
 
Impresión de Órganos en 3D
Impresión de Órganos en 3DImpresión de Órganos en 3D
Impresión de Órganos en 3D
 
DIMA 3D - Introducción a la tecnología de impresión 3D
DIMA 3D - Introducción a la tecnología de impresión 3DDIMA 3D - Introducción a la tecnología de impresión 3D
DIMA 3D - Introducción a la tecnología de impresión 3D
 
Tinkercad tutorial pdf
Tinkercad tutorial pdfTinkercad tutorial pdf
Tinkercad tutorial pdf
 
Tinkercad
TinkercadTinkercad
Tinkercad
 
Presentación impresora 3d
Presentación impresora 3dPresentación impresora 3d
Presentación impresora 3d
 
Presentación de impresoras 3D 2.0
Presentación de impresoras 3D 2.0 Presentación de impresoras 3D 2.0
Presentación de impresoras 3D 2.0
 

Ähnlich wie 3D Design with OpenSCAD

breaking_dependencies_the_solid_principles__klaus_iglberger__cppcon_2020.pdf
breaking_dependencies_the_solid_principles__klaus_iglberger__cppcon_2020.pdfbreaking_dependencies_the_solid_principles__klaus_iglberger__cppcon_2020.pdf
breaking_dependencies_the_solid_principles__klaus_iglberger__cppcon_2020.pdf
VishalKumarJha10
 
3D Presentation AU 2014 (abridged)
3D Presentation AU 2014 (abridged)3D Presentation AU 2014 (abridged)
3D Presentation AU 2014 (abridged)
William Work
 

Ähnlich wie 3D Design with OpenSCAD (20)

Agile data visualisation
Agile data visualisationAgile data visualisation
Agile data visualisation
 
breaking_dependencies_the_solid_principles__klaus_iglberger__cppcon_2020.pdf
breaking_dependencies_the_solid_principles__klaus_iglberger__cppcon_2020.pdfbreaking_dependencies_the_solid_principles__klaus_iglberger__cppcon_2020.pdf
breaking_dependencies_the_solid_principles__klaus_iglberger__cppcon_2020.pdf
 
Build Your Own VR Display Course - SIGGRAPH 2017: Part 2
Build Your Own VR Display Course - SIGGRAPH 2017: Part 2Build Your Own VR Display Course - SIGGRAPH 2017: Part 2
Build Your Own VR Display Course - SIGGRAPH 2017: Part 2
 
Esoteric, Obfuscated, Artistic Programming in Ruby
Esoteric, Obfuscated, Artistic Programming in RubyEsoteric, Obfuscated, Artistic Programming in Ruby
Esoteric, Obfuscated, Artistic Programming in Ruby
 
CS101- Introduction to Computing- Lecture 35
CS101- Introduction to Computing- Lecture 35CS101- Introduction to Computing- Lecture 35
CS101- Introduction to Computing- Lecture 35
 
Solid Works
Solid WorksSolid Works
Solid Works
 
Product design solidworks training ppt
Product design  solidworks training pptProduct design  solidworks training ppt
Product design solidworks training ppt
 
AutoCAD Architecture
AutoCAD ArchitectureAutoCAD Architecture
AutoCAD Architecture
 
AutoCAD Productivity Hacks for Engineers, Architects, Designers, and Draftsme...
AutoCAD Productivity Hacks for Engineers, Architects, Designers, and Draftsme...AutoCAD Productivity Hacks for Engineers, Architects, Designers, and Draftsme...
AutoCAD Productivity Hacks for Engineers, Architects, Designers, and Draftsme...
 
Introduction to Coding
Introduction to CodingIntroduction to Coding
Introduction to Coding
 
Creating Custom Charts With Ruby Vector Graphics
Creating Custom Charts With Ruby Vector GraphicsCreating Custom Charts With Ruby Vector Graphics
Creating Custom Charts With Ruby Vector Graphics
 
3. Brochure ZWCAD.pdf
3. Brochure ZWCAD.pdf3. Brochure ZWCAD.pdf
3. Brochure ZWCAD.pdf
 
Top 10 New Features in SOLIDWORKS 2019 - 3D CAD
Top 10 New Features in SOLIDWORKS 2019 - 3D CADTop 10 New Features in SOLIDWORKS 2019 - 3D CAD
Top 10 New Features in SOLIDWORKS 2019 - 3D CAD
 
SOLIDWORKS World 2016 - Sketching Tips From A SOLIDWORKS Guru
SOLIDWORKS World 2016 - Sketching Tips From A SOLIDWORKS GuruSOLIDWORKS World 2016 - Sketching Tips From A SOLIDWORKS Guru
SOLIDWORKS World 2016 - Sketching Tips From A SOLIDWORKS Guru
 
Autocad Prsentation
Autocad PrsentationAutocad Prsentation
Autocad Prsentation
 
SVG (Devoxx 2011, 2011-NOV-14)
SVG (Devoxx 2011, 2011-NOV-14)SVG (Devoxx 2011, 2011-NOV-14)
SVG (Devoxx 2011, 2011-NOV-14)
 
Autocad 2015 (best presentation)
Autocad 2015 (best presentation)Autocad 2015 (best presentation)
Autocad 2015 (best presentation)
 
D3.js and SVG
D3.js and SVGD3.js and SVG
D3.js and SVG
 
Auto cad ppt
Auto cad pptAuto cad ppt
Auto cad ppt
 
3D Presentation AU 2014 (abridged)
3D Presentation AU 2014 (abridged)3D Presentation AU 2014 (abridged)
3D Presentation AU 2014 (abridged)
 

Mehr von VickyTGAW

Mehr von VickyTGAW (12)

Troubleshooting - 2022-December.pptx
Troubleshooting - 2022-December.pptxTroubleshooting - 2022-December.pptx
Troubleshooting - 2022-December.pptx
 
FCPL 2022.pptx
FCPL 2022.pptxFCPL 2022.pptx
FCPL 2022.pptx
 
Slicing with Cura - 2022.pptx
Slicing with Cura - 2022.pptxSlicing with Cura - 2022.pptx
Slicing with Cura - 2022.pptx
 
Slicing with Cura - 2022
Slicing with Cura - 2022Slicing with Cura - 2022
Slicing with Cura - 2022
 
Troubleshooting - 2022
Troubleshooting - 2022Troubleshooting - 2022
Troubleshooting - 2022
 
3D Printing, Tinkercad, Cura
3D Printing, Tinkercad, Cura3D Printing, Tinkercad, Cura
3D Printing, Tinkercad, Cura
 
3D Modeling Tour
3D Modeling Tour3D Modeling Tour
3D Modeling Tour
 
Machine Maintenance and Troubleshooting
Machine Maintenance and TroubleshootingMachine Maintenance and Troubleshooting
Machine Maintenance and Troubleshooting
 
Slicing Troubleshooting with Cura
Slicing Troubleshooting with CuraSlicing Troubleshooting with Cura
Slicing Troubleshooting with Cura
 
Blender and Bezier Curves for 3D Printing
Blender and Bezier Curves for 3D PrintingBlender and Bezier Curves for 3D Printing
Blender and Bezier Curves for 3D Printing
 
MakerFaireNova - 3D Printing Without Owning a 3D Printer
MakerFaireNova - 3D Printing Without Owning a 3D PrinterMakerFaireNova - 3D Printing Without Owning a 3D Printer
MakerFaireNova - 3D Printing Without Owning a 3D Printer
 
Jimmie's Views - Excerpts of a Hiking Dog's Adventures
Jimmie's Views - Excerpts of a Hiking Dog's AdventuresJimmie's Views - Excerpts of a Hiking Dog's Adventures
Jimmie's Views - Excerpts of a Hiking Dog's Adventures
 

Kürzlich hochgeladen

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Kürzlich hochgeladen (20)

Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdf
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 

3D Design with OpenSCAD

  • 1. 3D Design with OpenSCAD Vicky Somma vicky@tgaw.com @TGAW http://tgaw.wordpress.com http://www.Shapeways.com/shops/tgaw This presentation is on SlideShare at: http://www.slideshare.net/VickyTGAW/3d-design-with-openscad
  • 2. OpenSCAD – Download • Free 3D Modeling Software • Available for Windows, Linux, and MacOS • Good at “clean” models (taking some of worry out of the process– you can be oblivious to “non-manifold” and “bad face normals”) • Because it’s instruction-base, it’s easy to visualize measurements and come back and tweak it http://www.openscad.org/downloads.html
  • 3. OpenSCAD – User Manual Don’t Be Intimidated! You Don’t Have to Memorize the Syntax! Online User Manual https://en.wikibooks.org/wiki/OpenSCAD_User_Manual Quick Cheat Sheet http://www.openscad.org/cheatsheet/
  • 4. OpenSCAD – Anatomy of User Interface Text Editor – Where we put our instructions (“code”) Viewing Area – Your handiwork! Renders of the model. Console – Technical information about what’s going on (progress on rendering, any error messages)
  • 5. OpenSCAD – Text Editor Commands Icons to create new files, save, undo, redo, indent, preview, render, and most importantly for 3D Printing-- export to STL format.
  • 6. OpenSCAD – Text Editor to Viewing Area To see how your work looks, you can: • Use Preview ( ) or Render ( ) icons • Use the Design->Preview or Design->Render menu options • Or the fastest option - use F5 for Preview and F6 for Render
  • 7. OpenSCAD – Viewing Area Commands Commands for Viewing, Rendering, Zooming In, Changing Views, Turning On or Off Axis and Measurements Display, Showing Edges Versus Faces
  • 8. OpenSCAD – The Mouse & the Viewing Area • Left clicking and dragging allows you to rotate your view • Right clicking and dragging pans the view • Scroll wheel allows you to zoom in and out
  • 9. OpenSCAD – Syntax Common Themes • ; - The end of an instruction (ie make a cube;) • // - A comment or label– for your purposes– will be ignored by the viewing area • { } - Grouping of commands • [x,y,z] – “Vectors” (Coordinates, 3D sizes) Reference: https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/General
  • 10. OpenSCAD – Primitive Objects – Cube cube([10,10,10]); cube([10,20,30]);cube([x, y, z]); Draws 3D boxes Not necessarily perfect cubes – you can make rectangles with it as well. Reference: https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Primitive_Solids#cube
  • 11. OpenSCAD – Primitive Objects – Cylinder cylinder(r=10,h=22); cylinder(r1=10,r2=3,h=22); cylinder(r=x,h=z); cylinder(r1=x,r2=y,h=z); Draws cylinders – and not necessarily perfect cylinders Reference: https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Primitive_Solids#cylinder
  • 12. OpenSCAD – Primitive Objects – Cylinder cylinder(r1=9, r2=0, h=9, $fn=4); $fn parameter controls # of fragments Increase– you can make really smooth objects Decrease it– you can make Triangles, Pentagons, Pyramids, etc. cylinder(r=9,$fn=3);cylinder(r=9,h=10,$fn=300); Reference: https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Primitive_Solids#cylinder
  • 13. OpenSCAD – Primitive Objects – Sphere sphere(d=22); sphere(d=22, $fn=100);sphere(d=x); Draws spheres – and you can control resolution $fn parameter controls how smooth it looks Reference: https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Primitive_Solids#sphere
  • 14. OpenSCAD – Primitive Objects You can build a lot out of standard shapes
  • 15. OpenSCAD – Primitive Objects You can build a lot out of these standard shapes- “Bipedal Mech” by Mathew Ridge http://shpws.me/GQX5
  • 16. OpenSCAD – 2D Objects - Text text("TGAW"); Text(“x”); Draws text. Text is great for customizing your models, engraving, and embossing. Reference: https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Text
  • 17. OpenSCAD – 2D Objects - Text Text(“x”, Font=“Font Name”); Since OpenSCAD is installed on your machine, you can use any font already on your machine! text("TGAW", font="Rockwell Extra Bold"); text("TGAW", font="Old English Text MT"); text("TGAW", font="Wingdings"); Reference: https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Text
  • 18. OpenSCAD – 2D Objects - Polygons polygon([[-24,0],[0,0],[0,32] ,[-16,32],[-15,28],[-13,24] ,[-12,20],[-12,15],[-13,10] ,[-15,6],[-19,3]]); Polygon([x1,y1],[x2,y2],etc); You specify the points to make customized shapes (which you can then extrude to 3D if needed) Reference: https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/2D_Primitives#polygon
  • 19. OpenSCAD – 2D Objects - Polygons Need visual help making Polygons? http://daid.eu/~daid/3d A graphical interface that builds your polygon code for you.
  • 20. OpenSCAD – 2D to 3D linear_extrude(height = 10) polygon([[-24,0],[0,0],[0,32],[-16,32] ,[-15,28],[-13,24],[-12,20],[-12,15] ,[-13,10],[-15,6],[-19,3]]); Linear_Extrude(height=x) Makes your 2D object (circle, square, polygon) 3D It can even twist the object as it grows up NO SEMICOLON AFTER IT (It’s not the end of the statement– we have to tell it what to extrude) Reference: https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/2D_to_3D_Extrusion#Linear_Extrude
  • 21. OpenSCAD – 2D to 3D linear_extrude(height = 20, center = false , $fn = 100, twist=30) text("TGAW"); Linear_Extrude(height=x, twist=degrees) Works on text and you can do fancy stuff like twisting Reference: https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/2D_to_3D_Extrusion#Linear_Extrude
  • 22. OpenSCAD – 2D to 3D rotate_extrude(convexity = 10, $fn=300) polygon([[-24,0],[0,0],[0,32],[-16,32],[-15,28] ,[13,24],[-12,20],[-12,15],[-13,10] ,[-15,6],[-19,3]]); Rotate_Extrude() Your 2D object (circle, square, polygon) is rotated around to make a 3D object (like a cross section) NO SEMICOLON AFTER IT It’s not the end of the statement-- we need to tell it what to extrude. Reference: https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/2D_to_3D_Extrusion#Rotate_Extrude
  • 23. OpenSCAD – Import STL import("C:DownloadsVT.stl",convexity=10); import(filepath, convexity=10); The import function lets you bring in existing 3D models into your project. Note: In Your filepath, backslashes need to be doubled. C:DownloadsMyStl.stl -> C:DownloadsMyStl.stl Tip: If you are using other people’s models, be sure to check and respect their licensing (http://www.thingiverse.com/thing:818805 by GlynnLo) Reference: https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Importing_Geometry
  • 24. OpenSCAD Basics – Transformations - Translate cube([22,22,5]); sphere(d=22, $fn=100); cube([22,22,5]); translate([11,11,0]) sphere(d=22, $fn=100); translate([x,y,z]) Translate MOVES objects– lets you define the how far to move along each of the axes. NO SEMICOLON AFTER IT (It’s not the end of the statement– we have to tell it what to translate) Reference: https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Transformations#translate
  • 25. OpenSCAD – Transformations – Rotate rotate([x,y,z]) Rotate angles the object. Guide to the axis is in your preview panel NO SEMICOLON AFTER IT (It’s not the end of the statement– we have to tell it what to rotate) It’s Okay if you Need Some Trial and Error : ) Reference: https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Transformations#rotate
  • 26. OpenSCAD - Transformations – Rotate rotate([0,-45,0]) cube([22,22,5]); rotate([0,0,30]) cube([22,22,5]); rotate([x,y,z]) rotate([30,-45,30]) cube([22,22,5]); Reference: https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Transformations#rotate
  • 27. OpenSCAD - Transformations – Resize resize([x,y,z],auto=true|false) Resize allows you to make your object different sizes where x, y, and z are your new dimensions NO SEMICOLON AFTER IT (It’s not the end of the statement– we have to tell it what to resize) If auto=false, anything left zero stays the same. If auto=true, anything left zero is sized proportionally. resize([200,0,10], auto=true) import("VT.stl", convexity=10); resize([200,0,10], auto=false) import("VT.stl", convexity=10); import("VT.stl", convexity=10); Reference: https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Transformations#resize
  • 28. OpenSCAD – CSG Modeling CSG stands for Constructive Solid Geometry.  You don’t need to remember that Do Remember: • Powerful! • Combines your primitive parts/objects. • Adding, Subtracting, Intersections Credit: https://en.wikipedia.org/wiki/Constructive_solid_geometry#/media/File:Csg_tree.png Reference: https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/CSG_Modelling
  • 29. OpenSCAD – CSG Modeling - Union Adds objects into a one union () { object1; object2; } union() { cube([5,10,5]); translate([5,10,2.5]) { rotate([0,-90,0]) cylinder(d=5, h=5, $fn=30); } translate([5,0,2.5]) { rotate([0,-90,0]) cylinder(d=5, h=5, $fn=30); } } Two cylinders and a cube After union – single rounded object Reference: https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/CSG_Modelling#union
  • 30. OpenSCAD – CSG Modeling - Difference Subtracts objects from each other difference () { object1; object2; } difference() { cube([5,10,5]); translate([5.5,10,2.5]) { rotate([0,-90,0]) cylinder(d=5, h=6, $fn=30); } translate([5.5,-1,2.5]) { rotate([0,-90,0]) cylinder(d=5, h=6, $fn=30); } } Two cylinders and a cube After “subtracting” the cylinders from the cube Reference: https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/CSG_Modelling#difference
  • 31. OpenSCAD – CSG Modeling - Difference Practical Use of Difference – Engraving Text! difference() { cube([5,10,5]); translate([5.5,10,2.5]) { rotate([0,-90,0]) cylinder(d=5, h=6, $fn=30); } translate([5.5,-1,2.5]) { rotate([0,-90,0]) cylinder(d=5, h=6, $fn=30); } translate([2,6.5,0.5]) rotate([90,0,-90]) linear_extrude(height=2) text("V", font="Old English Text MT", size=4); } Reference: https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/CSG_Modelling#difference
  • 32. OpenSCAD – CSG Modeling - Intersection Takes where both objects overlap (like a Venn Diagram) intersection () { object1; object2; } intersection() { cylinder(r=5,h=3); translate([4,0,0]) cylinder(r=5, h=3); } Two cylinders Intersection – an Almond Shape Reference: https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/CSG_Modelling#intersection
  • 33. OpenSCAD – CSG Modeling - Intersection Practical Use of Intersection – Curving Details! intersection() { sphere(r=9.25, $fn=100); resize([0,0,11],auto=false) resize([12,0,0], auto=true) import("VT.stl", convexity=10); } A sphere and a VT Logo Intersection – A curved VT Logo Reference: https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/CSG_Modelling#intersection
  • 34. OpenSCAD – CSG Modeling - Combinations Practical Use of Intersection – Curving Details! union() { sphere(r=9, $fn=100); intersection() { sphere(r=9.25, $fn=100); resize([0,0,11],auto=false) resize([12,0,0], auto=true) import("VT.stl", convexity=10); } } Add a slightly smaller sphere and we have a curved, embossed VT logo on a sphere. Reference: https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/CSG_Modelling
  • 35. OpenSCAD – Advanced - Modules To help readability and reusability, you can make modules. module name() { //your code } module base_sphere() { sphere(r=9, $fn=100); } module curved_VT() { intersection() { sphere(r=9.25, $fn=100); resize([0,0,11],auto=false) resize([12,0,0], auto=true) import("VT.stl", convexity=10); } } union() { base_sphere(); curved_VT(); } union() { sphere(r=9, $fn=100); intersection() { sphere(r=9.25, $fn=100); resize([0,0,11],auto=false) resize([12,0,0], auto=true) import("VT.stl", convexity=10); } } Reference: https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Modules Fun Fact – All objects in a model are already merged into one, no unions necessary
  • 36. OpenSCAD – Advanced - Loops Loops are powerful for repeated tasks for ( i = [start : increment : end] ) { //your code } for (i=[0:5:15]) { translate([i,0,0]) cylinder(r=1, h=15, $fn=36); } Translation– We are going to start at 0. Every 5 mm, draw a cylinder until we reach 15mm. Reference: https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Conditional_and_Iterator_Functions#For_Loop
  • 37. OpenSCAD – Advanced - Loops “Nested Loops” for ( i = [start : increment : end], j = [start : increment : end] ) { //your code } for (i=[0:5:15],j=[0:5:20]) { translate([i,j,0]) cylinder(r=1, h=15, $fn=36); } Translation– We going to end up with 20 pegs in 4 columns and 5 rows. Reference: https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Conditional_and_Iterator_Functions#For_Loop
  • 38. OpenSCAD – Troubleshooting Having Unexpected Results? • Check Your Syntax (maybe there’s a semi colon after a translate) • Check the Console for error messages (which would include a line number)
  • 39. OpenSCAD – Troubleshooting • echo allows you to send details to the Console • // allows you to comment out instructions so you can narrow down the culprit echo("i:", i, " j:", j);
  • 40. OpenSCAD – Troubleshooting • # allows you to have objects highlighted difference() { cube([5,10,5]); translate([5.5,10,2.5]) { rotate([0,-90,0]) cylinder(d=5, h=6, $fn=30); } translate([5.5,-1,2.5]) { #rotate([0,-90,0]) cylinder(d=5, h=6, $fn=30); } }
  • 41. OpenSCAD – Saving and Exporting • Be sure to Save your code often • When you’re ready to print, you’ll want to Export to STL file. • Pre-requisite– Do your official render (F6). • The system will remind you. : )
  • 42. OpenSCAD – Code Scavenging! OpenSCAD even comes with its OWN examples which you can open, review, and tweak to meet your needs.
  • 43. OpenSCAD – Code Scavenging! Thingiverse has a OpenSCAD area full of shared source code– just search “OpenSCAD” http://www.thingiverse.com/search?q =OpenSCAD You can download the final .STL file AND the original .SCAD files, so you can read and find out how it was made.
  • 44. OpenSCAD – Code Scavenging! • OpenSCAD Community Forums http://www.openscad.org/community.html • OpenSCAD reddit http://www.reddit.com/r/OpenSCAD/ • Good ole Google
  • 45. OpenSCAD – OpenJSCAD http://openjscad.org • Web-based • Has its own JavaScript, object-oriented language • BUT 95% of the OpenSCAD Language is supported Quick Tips • User Guide at https://github.com/Spiritdude/OpenJSCAD.org/wiki/User-Guide • //!OpenSCAD at the top tells it you’re using OpenSCAD • Shift-Enter in the “Text Editor” renders • Holding down the Left or Right Mouse Button lets you rotate the View Pane • Holding down Shift Left Mouse Button lets you pan in the View Pane