Printable Programming
Instructors Krishnan Suresh Associate Professor Mechanical Engineering UW Madison Victor Markus Undergraduate Student (senior) Mechanical Engineering UW Madison Jimmy Herman Undergraduate Student (senior) Mechanical Engineering UW Madison
3D-Printing Why is it a Big Deal?
Geometric Complexity is Free 1. Any shape!
Wide Capacity 2. ‘Any’ size
Democratization 3. Anyone
Where is the catch? - Isthmus News on 3D Printing (Oct, 2015)
Barrier How do we start designing for 3D printing?
Plenty of CAD Tools Expensive Difficult
CADjs (Developed at UW) Press F5 to run the program
Your First Program! 1.Create blocks & cylinders 2.Move to correct location 3.Add and subtract!
Your First Program! base = cube(1,1,1); cyl = cylinder(0.1,1.5); cyl = cyl.translateX(0.2); finalBody = base.difference(cyl); Primitives Transformations Booleans finalBody.display(); (Run Code) base.display(); (F5 to run code)
Challenge Primitives? Transformations? Booleans?
CADjs Language
GUI Operations Save the CADjs Code Load the saved CADjs Code Clear the screen Execute the code (instead of F5) If browser crashes/closed, recover last code Size of the model, number of triangles, etc Save the STL code for 3d-printing 3D printing specific Turn off/on the axis Increase/decrease smoothness Load an STL model
Example
Subtraction g1=cube(1);Parent Material g2=sphere(.6);Subtracting Material g3=g1.difference(g2);Command g1-g2 g3.display();Display
Addition g1=cube(1);Parent Material g2=sphere(.6);Adding Material g3=g1.union(g2);Command g1+g2 g3.display();Display
Intersection g1=cube(1);Parent Material g2=sphere(.6);Intersecting Material g3=g1.intersection(g2);Command g1 interest g2 g3.display();Display
Question 3 solids? Boolean operations?
Solution g1 = cube(1); g2 = sphere(0.6); g3 = cylinder(0.4,2); g4 = g1.union(g2).difference(g3); g4.display(); g4 = g1. difference(g3).union(g2); 3 + (4*5) ≠ (3+4)*5
3D Printing
Scale Model g4.scale(10); g1 = cube(1); g2 = sphere(0.6); g3 = cylinder(0.4,2); g4 = g1.union(g2).difference(g3); g4.display(); Millimeters
Save.stl file g1 = cube(1); g2 = sphere(0.6); g3 = cylinder(0.4,2); g4 = g1.union(g2).difference(g3); g4.scale(10); g4.display();
.stl file
Read STL file into 3D Printer Software Every 3D printer comes with software to read.stl file
Import.stl file XYZware window- import *.stl file
Load model
Resize to fit printer
View Your Model A.view B.rotate C.rotate D.scale
Personalized Key Chain g1 = textGeom('CADjs'); g1 = g1.rotateZ(180).translate(50,10,0); g2 = cube(120,60,5); g3 = g1.union(g2); g3.display();
Questions/Help