3. Computer-aided design¶
- Assignment
- Model (raster, vector, 2D, 3D, render, animate, simulate, …) a possible final project, and post it on your class page.
Objectives¶
- [x] Modelled experimental objects/part of a possible project in 2D and 3D software
- [x] Shown how you did it with words/images/screenshots
- [x] Included your original design files
- [x] Included original design files and code**
- [x] Screenshots of the software you used for sketching your final project.
- [x] Small comment about the software you used (at least two different software options), how it works, do you like it or not? Does it work for your needs?
- [x] Describe part of the process of sketching with the software options, what tools from the software you used? (add screenshots of this process).
Computer Aided design¶
Since this is one of the last assignments on my to-do list i will practically go through the design process of my final-project parts and thereby exploring all the extremes in the CAD spectrum.
I already have some experience with different type of tooling so i will use “best for application” tools and explore them as i go. I will walk through the spectrum of CAD softwares while building the basic elements for my final project in more or less detail here.
3D CAD Parametric¶
Special breed if CAD design is by using code based approach especially for well definable geometric components or modules. Things like gears, bearings, beams etc are easily described mathematically and thus code-able. Reuse in parametric design means just running a function to call such a gear with input parameters like inner, outer radius and depth.
OpenSCAD - the XYZ system¶
First on the road will be pure parametric design using OpenSCAD to build an XYZ frame for final project chassis. This is a useful tool when you are using standard elements like V-slot or extruded aluminium frames. Since i have a small stock of this profile i will use them for my final project and model the frame accordingly.
Found a model file for this exact profile on GrabCad but it is an stp format. Profile is perfect but not readable in OpenSCAD.
I opened the file in FreeCAD and exported the from part to SVG to import back into OpenSCAD for extrusion.
Now we can export it as DXF and work with it in OpenSCAD as a model for extrusion.
linear_extrude(height = 910, center = false, convexity = 1) import (file = "profile2.dxf", layer = "0");
I used the OpenSCAD cheat sheet intensively and the resulting model for my XYZ table looks like this
I made a module for the Extruded Aluminium beams
// T-slot beam module module tslot(length=100, startposition=[0,0,0], rotation=[0,0,0]){ translate(startposition)rotate(rotation)linear_extrude(height = length, center = false, convexity = 1) import (file = "profile2.dxf", layer = "0") ; } // Draw up the basic beams with a simple function call now tslot(910,[0,0,0],[0,90,0]);
I further parameterized the XYZ frame and build the beams by the parameters given. So all the tslot beams are generated from the required frame size. I could NOT get the beam dxf file to scale so i can only do this for 40x40mm
// XYZ system parameters frame=[690, 910, 200]; // frame XYZ beam=[40, 40]; // beam size XY xpos=910/3.7; // Position of the X-gantry for imaging (could be animated!) // So to draw up the basic beams now becomes e.g. tslot(frame[1],[0,frame[0]-2*(beam[0]),0],[0,90,0]); // add the X-beam at height - beam height mm tslot(frame[0],[xpos,0,(frame[2]-beam[1])],[-90,0,0]);
For now i will add the side plate mockups based on a parameterized polygon.
The base width will be 3x beam size and the top will be 2x beam width.
Adding steppers is also very simple if you find the right libraries. I found the MCAD library for CAD elements (download and add this to your OPenSCAD Libraries folder)
Add the following code
include <MCAD/stepper.scad> // Y-Motor translate([(beam[0])/2,frame[0]-(beam[0]),-20]) rotate([-90,0,0]) motor(Nema17, NemaMedium, dualAxis=false); // X motor translate([xpos,frame[0]-(beam[0]),frame[2]-1.5*beam[0]]) rotate([-90,0,90]) motor(Nema17, NemaMedium, dualAxis=false);
The Gantry plate and side panels were created in LibreCAD and exported as DXF into OpenSCAD (see next section)
// Add the Y gantry module module ygantry(length=10, startposition=[0,0,0], rotation=[0,0,0]){ color("orange")translate(startposition) rotate(rotation) linear_extrude(height = length, center = false, convexity = 1) import (file = "ygantry.dxf", layer = "0"); } ygantry(10,[xpos-0.5*beam[1],0,-1.5*beam[1]],[90,0,0]);
2D CAD¶
2D CAD comes into play in pure engineering designs where we build for manufacturing or building. In our scenario the flat parts that either need to be CNC- or Laser-Cut need to be brought into the 2D space.
LibreCAD - X Gantry Plate + Y side panels¶
For my project the Gantry plates and the XYZ system side panels (X-Axis risers) are typically 2D designed for milling or Laser cutting.
Round off the edges with the Tools>>Modify>>Fillet tool
After drawing it up select all elements of your drawing and create poly-line from existing elements.
Export this to DXF format file we can import into OpenSCAD or other CAD tools.
There is also an option to export the contours as a MakerCAM SVG file. MakerCAM is handy online tool for doing CAM preparation via a simple web interface.
I use MakerCAM for fast and simple CAM preparation tool for CNC cutting. It is an online app and works fine for most simple cases (to be continued in Machine Cutting)
3D CAD¶
Pure 3D CAD design software is the typically the domain of artist impressions, creative design, build assemblies to see or check how components will fit together in the real world prior to actually building it. A design made in pure 3D will typically be exploded out and exported to 2 or 2.5D to be detailed in another CAD software. Although 3D is also capable of doing that the process is extremely tedious and error prone and the outputs still need some post processing before manufacturing.
FreeCAD Engineering & Parametric design - The Rotor head / Y-Gantry panels / Fittings¶
I feel that for engineering drawings the FreeCAD tool is way better equipped allowing for graphic design with “some” parameterization options.
My final project will host one really advanced piece of engineering, that is the Pick & Place rotor head that allows for 3 very complex degrees of freedom in a single module.
It is inspired on this design i will build a revolver head that will run parallel to the X-axis
What we need for the rotor is a beveled gear with planet gears each hosting a single nozzle assy. To ensure smooth axial rotation we need also it to be slightly helical i found baseline design here
Export the design to STL format for OpenSCAD to open it as a full blob (un-editable).
Importing this STL i only needed to make it scalable in the module
// Import beveled helical gear example module rotorhead(size=100, startposition=[0,0,0], rotation=[0,90,0]){ color("white")translate(startposition)rotate(rotation) resize([size,0,0], auto=true) import("Helical_Bevel_Gear_Pair.stl", convexity=10); } rotorhead(150,[xpos+2.5*beam[0],0.5*frame[0],frame[2]-1.5*beam[0]]) rotate([0,0,0]);
The end-result (without wheels and end-effectors)
TinkerCAD - The Assembly¶
For the test i will export my full design in OpenSCAD to STL and import into TinkerCAD to make the design look cool.
Exported and opened
Obviously TinkerCAD cannot really do much with an imported STL file. Ne would really have to import all components separately to get it going. End of experiment for now, but in 3D printing & scanning week i will use TinkerCAD more extensively
Fusion360¶
So next stop Fusion360 to import the STL file and work with it. First off Fusion360 is an amazing product allowing for very advanced design and simulations in 3D space, but it takes about 10 minutes to start up on my 2010 version Mac Air and expects you to be online all the time. Furthermore features seem to shift continuously so functionality you have now might not be around the next time you signup. All files are hosted in the cloud so NOT available without internet connection.
I had a go at creating the Revolver head first design wrapping it around the X-axis beam. Would make the PnP system extremely agile and space saving, but the design implications seemed just too big to persue this route.
Raster / Vector design¶
This is the domain where Adobe is dominant with Photoshop and Illustrator. Everybody started somewhere with Photoshop but there are decent opensource alternatives these days like Gimp and Inkscape.
I will do a little refresher here on Photoshop creating a poster mockup for Final project.
Lets bring in the RotoPick machine full build picture
Most popular use of Photoshop is the cut objects out of a photo, make the free standing for use in posters.
I will be using the magnetic lasso tool that sticks to whatever color you initially click and follow the contour closest to it. So you can use these areas of strong contrast to isolate an object.
Zoom into areas where the lasso hasn’t done a great job and use the elipse/circular selector tool to add these areas holding down
Now copy the part of the image under your selection
After that i personally always use the “smudge tool” to restore natural boundaries and restore missing pieces of your design. Notice that the front right corner of the XYZ table was missing and i restored it with smudging and “extending” beams towards the corner. Playing with diameter of the smudge tooland the “strength” setting is important.
If you made a big mistake just press F9 for the history tool and go back to a point in history.
Always make a layer copy before editing a layer.
Now i will put it on a new background (or potentially on your poster)
Cleaning it up (remove the ON/Off and text and placing the layer under the previous and stretching it to size with
Oh and the only Juki nozzle i could get hold on looks so lonely so i will copy it and rotate it to the other nozzle positions.
Yes we’ve got nozles
Now we add the logo and tag-line to it.
Here is the end-result for now
Conclusive¶
To conclude this weeks session i must say there is a broad range of CAD tools each specialized in some area better than others. No single package delivers all the required functionalities so interoperability between the to be selected tools is key factor.
LibreCAD is nice for 2D design but it is not engineering grade CAD completely missing the dimensions and rulers that one expects. Tedious meeting of shapes to be sure they will be considered a body (to be extruded elsewhere).
TinkerCAD & Fusion 360 are both cloud hosted CAD tools. I described the issues i feel with Fusion360 so i will not persue that road anymore. If i need a quick 3D drawup for printing TinkerCAD will make the bill. For larger projects simple forget this duo.
The best tools for my type of mechatronic project would be the combination of OpenSCAD and FreeCAD. FreeCAD for sound engineering CAD designs of components and modules and OpenSCAD for the procedural assembly of them and mechanical simulation of the total system.
OpenSCAD has a huge contributor base for components and modules online ready and mostly free to incorporate with the parametric approach.
I don’t need really impressive graphics and will also use mostly existing components or building blocks to assemble the most part of my project. Those fancy graphics come at a high price in processing and flexibility.
For nice raster or 2D art Photoshop is still tool of choice and the amount of step by step manuals is immense so a save choice even an older version.
Files & Downloads¶
Files included:
- XYZ system files DXF / STL
- Components Side panels
- Components beveled gears
- Revolver Head v1 design