2. Computer Aided Design (CAD)#

This week I worked on getting familiar with a CAD (Computer Aided Design) software and designed a little flexible piece I wanted to 3D-print.

Teaming up and idea#

We were asked to form groups of 3-4 students, for this week and the next one (modules 2 and 3). Every one of us had to design a piece on one of the 2 CAD softwares introduced in class. The objective was then to assemble our pieces in some way to create a little object that does something. I teamed up with Ana, Timo and Lukas. We decided to build a little catapult functionning with a rope and a ratchet wheel. We would print the important pieces in 3D and build the structure in LEGO. A ratchet wheel is a system to make a wheel turn in one direction only, thus accumulating tension. Here is a sketch so you can better visualise the project:

I resumed the different pieces we have to design and print next week:

Piece Student Software Sketch
Spoon Nikita OpenSCAD
Wheel Ana OpenSCAD
Roller Lukas OpenSCAD
Ratchet Timo OpenSCAD

OpenSCAD#

OpenSCAD is an open source and free CAD software. I chose this software rather than FreeCAD because the process seemed more intuitive to me, and additionally, the people in my group chose the same program, so helping each other would be simpler. The advantage of OpenSCAD is that you associate code to the 3D object you want to create so the .scad files are very light since they aren’t more than a set of instructions to build the object. In my opinion is this very alike the way a vector image is kept. At first it was pretty hard getting used to OpenSCAD but I watched a few tutorials on YouTube and it got easier. Let me show you a few things to do to get started with OpenSCAD. To build you object you have to write code in the left part of the interface. How do you learn coding in OpenSCAD ? Two main helps: the Cheat sheet listing every possible shapes, transformations and operators, and some Youtube tutorials.

That was the first prototype I intended to print:

Since then, I modified a few aspects of the spoon but the concept stayed the same. Here are some problems with this first design: * The piece supposed to fix to the lego piece is fragile and could break * The spoon is too thick (useless printed plastic) * It’s not in a good position to be printed (cf. limitations of 3D print, module 3)

If worked again on the piece and I managed to solve the first 2 problems:

The plan is now to fix the spoon with a Lego cross pin so the attach is more solid. I also reduced the thickness of the piece. To make it printable, I divided the piece in 2: the flexible handle and the half-sphere. Here is how it looks now, and here you can see on the left the code associated with this final version.

You can also visualise the final 3D object here:

An important aspect of this object is the size of the hole for the cross pin. Is it compatible to the real lego cross pin ? That’s what we try to determine in the next module. However, it’s very likely that I will have to change the values, so I wrote the code in a parametrical way as you can see on the screenshot above. My 2 parametric variables are cruxlenght and cruxwidht. At first I had some trouble making it parametric: I was directly putting values in the parameters of the different shapes, because while trying to make it parametric I always had some parse errors. But I understood them and now I can define the parameters I want in the OpenSCAD code. If you want to download my original spoon file, you can find it the files folder. Its name is spoon.scad.

Inkscape#

Inkscape is another type of CAD software: it’s 2D. It allows you to produce vectorial images, and it is free and open-source. You may ask yourself: what is a vectorial image ? Let me explain:

Vector vs. raster images#

Raster images are the most common ones. They include the photos on your phone, all the pictures you saw on this website (even little shrek), and the vast majority of images on the internet. They are made of matrix of numbers indicating the tone of the pixel. If you zoom on it a lot (or not, depending on the resolution) you’re even able to see the pixels themselves. Vector images are different. They aren’t made up of a matrix but of a “set of instructions to draw” the image. It’s the case of many logos and other simple figures. You can identify the type of an image easily by zooming in. If you start seeing pixels, its raster. If not, it’s a vector image. If you have very simple images such a logos, vector images are very interesting since they will have a much better resolution, whatever the zoom. They also have a size much lighter, because a set of instructions is lighter than a matrix full of numbers.

Usages of 2D CAD#

What exactly is the use of 2D CAD softwares such as inkscape ? Why do we draw vectorial images ? There are actually many uses for these softwares. For example AutoCAD (I know it’s not open source) is used by many students I know, in architecture or in industrial engineering. The use we make of inkscape at the FabLab is mainly for the laser cutter (see module 4) and the CNC.

Licensing your work#

Something else you can see on the screenshot is my Creative Commons (CC) license. It’s at the beginning of the code, stating as a comment. Creative Commons is a non-profit organisation that provides licences very easily for your work. There are many types of licenses, if you want to learn more, here are some explanations.

To complete the catapult, I will use the work of 3 of my mates, so if I show the catapult on this website later, I will credit them according to the CC lisence they’ll have added. My spoon is lisenced under CC0 (public domain), so if you want to use it you don’t have to mention me.