Lab 5: Prototyping in OpenScad and 3D Printing

In this lab you will:

Setting Up Your 3D Printer

Warning: this first part of the lab will take you approximately 6h to complete if all goes well: make sure to plan ahead!

Getting OpenScad

OpenScad is an open source Computer Assisted Design (CAD) software that is used through a text-based programming language. It is a very powerful tool to design ready-to-be-printed 3D parts. It can compete in many respects with graphical-based commercial tools like SolidWorks, Rhino, etc. for this kind of applications (e.g., OpenScad doesn’t really provide any “assembly tool”).

Download and install OpenScad.

Make Your First Design in OpenScad

cube([20,20,20]);
difference(){
    cube([20,20,20]);
    translate([10,10,0])cylinder(h=20,d=10);
 }
$fn = 50;
difference(){
    cube([20,20,20]);
    translate([10,10,0])cylinder(h=20,d=10);
 }

the hole at the middle of the cube will be made out of 50 faces. Adding more faces will increase the rendering time so you’ll always have to find the right balance for this parameter. For example, you could give it a value when prototyping and you could increase it when you’re ready to print your part.

Some Tips on Making the Best of OpenScad

$fn = 50;
for(i = [0:2]){
    translate([30*i,0,0])difference(){
        cube([20,20,20]);
        translate([10,10,0])cylinder(h=20,d=10);
    }
 };
linear_extrude(height=10)polygon(points=[[0,0],[10,0],[10,10]]);

creates a 2D right triangle of size 10x10 which is then turned into a 3D triangle of height 10 through a linear extrusion.

Exercise 1: Making a “Tray” Module

(a cube with a cubic cavity in it).

Potential solution

Exercise 2: Making a Pyramid

Potential solution

Assignment A (Due on May. 12, 2021)

Assignment B (Due on May. 19, 2021)