3. Computer Aided design

Imagemagick

Imagemagick Fablab command sheet

It's important to consider these two types of 2D images: vector and raster.

Vector: Are not based on pixels, they consist of lines and anchor points, making them high quality and infinitely scalable.

Raster: Made up of pixels. Number of pixels determines the quality of the image. More pixels also increases the file size.

The three most prominent commands from Henk’s Imagemagick tutorial were:

  • du -hs smile.jpg — checks the file size

  • magick identify smile.jpg — this provides information like file format, dimensions, and color space

  • magick convert smile.jpg -resize 20% smile20.jpg — this resizes the image to 20% of the original and names the new file

This is what those commands do if you put them all to work:

Terminal Imagemagick

Note: use .jpg or .jpeg and not .png (only use .png if you need pixel perfect)

I was using an app called ImageOptim originally, but there isn't an easy way to convert .png to .jpg -- even though it got the files to the same size as a 40% resize through Imagemagick.

I decided to do a bit of my own research on how to resize and crop it into a square while keeping the photo in the middle. Below are the results:

magick input.jpg -resize 800x600^ -gravity center -extent 800x600 output.jpg

Centered resize

I also was wondering about how to batch resize / reformat from png to jpg (note the order of the jpg / png):

mogrify -format jpg *.png

AI batch resize

I haven't had much use for ffmpeg yet, but my understanding is that it's basically Imagemagick for videos and that I must remember to use the H.264 format.

Slight update: I have now used ffmpeg, and it went well. I removed the audio from a video and decreased it's size by a bit using this code: ffmpeg -i MCU-hero -vcodec libx264 -b:v 1000k -vf scale=-2:1080 -an MCU-hero-2.mp4.

Extra resources:

Blender

Ferdi from Ilmenau Fablab gave us a tutorial on Blender. It was fun and I enjoyed learning about the shortcuts. It felt intuitive quite quickly, how objects moved in space. Here's more tutorials on his site.

At a later stage I had a big issue and decided to revert back to factory settings. When setting things back up, Ferdi's suggestions were very helpful:

  • Edit → Preferences → Input → Emulate Numpad (if you use a keyboard without Numpad)

  • Edit → Preferences → Navigation → Zoom to Mouse

  • Edit → Preferences → Keymap → frame selected

Ferdi setup

Keyboard shortcut Action
X Delete
Shift + A Add
Ctrl + drag Move window
N Numeric panel
T Tool panel
G Grab
G + Y/X/Z + Number Move position as much as Number
R Rotate
R + Y/X/Z + Number Rotate axis and movement
S Scale
Alt + G Reset move/grab
Alt + R Reset rotate
Alt + S Reset scale
Shift + right click Move cursor
1 Side view Y
3 Side view X
7 Above
F3 Look up shortcuts
Space Play
Tab Change mode
E Extrude

Suzanne

After the lecture I stumbled on this tutorial on how to make a toilet in blender.

I actually only tried Blender properly after having used Fusion to creat my 3D toilet. So, chronologically, the next few paragraphs about Blender document the last part of my journey from week 3. I had some real problems getting Blender to work properly. I was hoping to use it to create a nice render of the toilet model that I had made in Fusion. I eventually figured out what was making my life so difficult. Actually, I believe there were two things:

  1. Trying to bevel the edges of objects that were too small, and,

  2. Having clicked around too much (with Ferdi's keyboard shortcuts enabled) and messed up something in my settings. I noticed the second point because when I was watching a YouTube tutorial, my bevels weren't behaving the same as theirs. I decided to reset my Blender to the factory settings and start again.

My first step was to export the toilet from Fusion. These were the three recommended types made by AI:

  • OBJ: Retains geometry and is well-supported in Blender. Does not preserve hierarchy or material information as effectively as FBX. Suitable for simple models.

  • STL: Commonly used for 3D printing but also works in Blender. Contains only geometry (no color, texture, or material data). Produces a triangular mesh.

  • FBX: Best for preserving relationships between parts, materials, and hierarchy. Ideal for more complex models or when additional data like animations is needed.

I chose OBJ, as the object is quite simple.

Initially I figured I'd give the toilet some texture. I began by following this rendering tutorial. The tutorial guides you through using Material settings in the sidebar while in Blender. From there one can easily edit characteristics like color, roughness, metallic-ness, and a lot more.

Material settings

The tutorial recommends changing your Render engine to Cycles. Render settings are also available in the bottom right toolbar.

Render

The next steps seemed pretty useful. If you navigate to the World tab of the bottom righthand settings menu > Surface > Color > Environment texture -- you can add HDRI files that give your render environment unique lighting for different moods, etc. He recommended a site called polyhaven.com.

Environment texture

To really nail the presentation of whatever you're rendering, you can shift + a > add a plane > scale (bigger) > extrude an edge up the z axis (e + shift + z) > bevel ctrl + b > choose how many segments to divide the bevel into > tab (to change from edit to object mode)> right click > shading smooth.

Make sure to right click on the edge or point to be bevelled and choose to bevel that way -- or, shift + cmd + b -- don't forget to add the shift and command

NB. In theory, this is very simple. However, as I previously mentioned, something was whack with my settings, and I was trying to bevel small planes, and I just couldn't get the shapes to behave.

Bevel 1

Bevel 2

Bevel 3

Bevel 4

In my desperate and exasperated state I stumbled on this infinite background tutorial in Blender. From here, I was on a one way road to success!

In this tutorial you create the plane, as in the previous documentary, but you bevel one of the corners and extrude the beveled edges.

Here's a new trick to do that: hold control + click one of the outer lines + click the furthermost outer line = 'Pick shortest path' (basically, Blender grabs all the smaller edges / lines for you)

Extrude those selected lines up the z axis. Select the lines again and bevel. NB. I wasn't able to bevel the two, longer outermost lines as they weren't actually long enough. I made the plane bigger, tried again, and it worked.

Another tip I learned from that video which came in hangy when I was setting up my lighting: press 0 (to toggle to the camera view) > press n to open a side menu > open the view section > select lock camera to view and it will adjust the camera to be whatever your view is.

Camera

Camera view

Render troubles

Unfortunately, my computer wasn't too fond of rendering the image, so, as of now, I don't have a rendered image of my toilet from Blender :cry:

Sam explained that my settings needed to be changed from CPU to GPU, so I asked AI to explain that to a 15 year old:

  • Think of the CPU (Central Processing Unit) as the brain of your computer. It’s really smart and can do lots of different things, but it works on tasks one step at a time. It’s slower at rendering because it doesn’t have as many "hands" to work with.

  • The GPU (Graphics Processing Unit) is like a super-fast helper that’s great at doing one specific thing: working with graphics. It has thousands of tiny "hands" that can work on lots of pieces of the render all at once. If your scene is too big, the GPU might not be able to handle it.

Inkscape

To test out the 2D + 3D modeling process, I decided that I’d try to build a toilet. The first step would be to make the toilet seat. I Googled a birdseye view of a toilet seat and opened it in Inkscape.

Initially the document I had created wasn’t the right size, so I right clicked on the background and selected ‘document properties’ -- from there I was able to adjust the page size. Then I wanted to center align the image. The icon below does that.

Align

Then I watched Neil’s demo on how to make a shape.

Viewing the shapes and the photo simultaneously was difficult so I updated the transparency of the photo so that the shapes were visible underneath:

Transparency

All objects can be broken down in to many, more simple shapes. The toilet seat was split into three shapes. To merge them into one: Path > Union. Then I deleted the background image and downloaded the SVG file.

Simple shapes

The next step was to open Fusion, find the Insert dropdown, and add the SVG file (scalable vector graphics).

Fusion

In Fusion I found it very difficult to edit the lines of the shape I had made in Inkscape. I decided to follow a new route, on Saco's advice, and imported the birdseye toilet photo (Import canvas) into Fusion and drew new lines on top of that using the Sketch tool.

There are three main features to sketching in Fusion: Create - Modify - Constraints

I didn't realize how important it would be to master these.

  • Create: This feature allows users to generate new 2D sketch geometry, such as lines, circles, rectangles, or splines, which serve as the foundation for 3D modeling.

  • Modify: This feature enables users to adjust existing sketch geometry using tools like trim, extend, offset, or fillet to refine the design.

  • Constraints: These are rules applied to sketch entities to control their geometric relationships (e.g., making lines parallel or circles concentric), ensuring precision and predictability in the design.

I begun by making a 3 point circle. Then a line. Then I made another line and linked the value to the first one so that they were the same length, as shown below.

Circle

Measure

Define

Then I tried making a ‘Fit point spline’ to sketch the tricky back edge of the toilet, but I wasn’t able to easily duplicate and flip it to make one for the other side. I opted rather to use a rectangle maker and to fillet the corner.

Here’s a tutorial on how to draw lines that was helpful.

To get rid of all the unnecessary lines I used the trim function. As per the tutorial, I removed all of the constraints and then re-added them. There was an error about the shape being over constrained, but I didn’t pay much attention to it. When constraining, the first two options I made use of were coincident and vertical/horizontal. The former connects two lines at a point, the latter makes sure lines or points align either horizontally or vertically.

I then ran into a big problem. I wasn’t able to move move my sketch around. I tried a lot of different things to make it work.

In the tutorial, two perpendicular lines were made across the object (making sure to hover over the center point before creating the line so that the new line would lock to the grid) -- making sure to set both as construction lines. Lastly, both of the new lines were selected > right click > midpoint constraint. That made the lines intersect at an exact midpoint. After that, in the tutorial, one could apparently just click one of the two lines, while in midpoint mode, and then select the center circle — then the whole object would align in the center around the midpoint of the two perpendicular lines.

That didn’t work for me.

After much clicking around and having remembered that I had previously received an error message about over-constraining, I decided to delete a bunch of constraints and try again. While I was removing the constraints I noticed that the lines were a few different colors. Blue, green and black. After some investigating, it turns out that the problem had to do with constraining and a fixed line. I unfixed the line that was fixed and, after resetting the constraints, the centering instructions from the video worked!

The Fix/Unfix Constraint is used to lock or unlock the position of sketch geometry. A fully constrained geometry turns black in Fusion 360. Definition: A sketch is fully constrained when all its geometry (lines, points, arcs, etc.) is completely defined in terms of size, position, and relationships.

Here’s a tutorial on how to find errors in sketches.

Once the sketch was complete, I clicked 'Finish sketch' and begun my work in the Design mode. From here I extruded the seat sketch and filleted the edges. Both of those tools were pretty straightforward... for now. I realize now that I probably should have included the toilet seat hole in the original sketch, but I was excited to do some extruding and filleting. I had to come back to the sketch and create the toilet seat hole.

Here's how to cut into an object from sketches video tutorial.

  • Create your sketch > finish the sketch > select the new object > Extrude > Operation > Cut

Make sure to have the following settings when cutting:

  • Start > Profile plane

  • Extent type > All

The cutting process was done, now to fillet the inner edges of the toilet seat rim. However, this is where I ran into big problems. Again, in order to fix this, I had to return to the sketch I had made and pick apart every point, edge, constraint, and everything else I could find, basically.

Fillet error

It took ages to figure this out. I've had more fun Friday nights, I can assure you, but when I eventually figured it out, I was on cloud nine. While this YouTube video didn't give me the answer, it helped keep me company while I tried to solve the problem.

As I said before, I had to go back into the sketch. It turns out there were two lines that weren’t perfectly joined. I deleted one of the points and joined them again. Then I reset my constraints, finished the sketch, and this time the filleting worked!

Extra resources:

More Fusion

After the creation of my toilet seat from a 2D sketch, I decided to try toilet making Fusion tutorial from YouTube, that I had found. The process was time consuming, but I learnt a lot from following the steps of someone more experienced.

Mirror

First and foremost, I learned how to duplicate / mirror a sketch object over an axis. This is an extremely important function, in my view. Throughout the toilet creation process, I used mirroring a lot.

Select the Mirror function in the Sketch menu > select the line/s > click Mirror Line > select the mirror point. The first objects that were selected should mirror themselves over the mirror point.

Mirroring

Extrude cuts

Extrude cuts are a really useful feature for altering bodies. It means I can make simple shapes and customize them after. To do this, you make a shape connected to the object that you'd like to cut, in whichever way you'd like to mess with it. Then you Extrude > Cut to object > select the object you'd like to cut to. One thing, make sure to deselect in the Objects to Cut box and objects that shouldn't be cut.

Extrude cut

Extrude cut 2

Extrude outcome

Offset plane

The next new tool that stood out to me during the process was the Offset plane option. This essentially allows you to create a plane to sketch on that's separate from the object that you're currently working on.

Offset plane command

Offset plane

From here you can simply click on the plane and start sketching. It's important to make sure that the plane has the correct geometry for the body that you're hoping to build. At one stage, I was struggling to extrude a body that I had sketched and it turned out that my sketch was created on an uneven surface, which meant that my extrusion happend at an angle -- NO BUENO!

Clicking the surface where the cursor is located, below, eventually gave me the correct angle. I had clicked the sloped area below it. That also made it difficult to select points.

Plane selection

Point selection

'p', Offset, Rotate, Center rectangle

When you'd like to follow and incorporate the lines / points of a previous object into your current sketch, select what your interested in working with and push the 'p' button. You can then interact with it in your sketch. Super useful.

Another useful sketch tool was the Center Rectangle option. It allows you to expand a rectangle from where your pointer is. I also learned that if you hold shift and click on each corner you can fillet them all, in a way that I think makes them linked. That's how I made the top of the toilet tank:

Offset

This Offset function allows you to duplicate an object / line and duplicate a scaled version. From there I extruded it in this way: Extent Type set to To Object > click on the object you’d like to extrude to.

To make the toilet bowl: select the curve of toilet rim and click 'p' > Offset > draw a perpendicular line through the middle of the toilet bowl > trim any extra lines beyond that (the half closest to the toilet tank) > Finish sketch > choose the Rotate option in Solid > rotate 180 degrees around the perpendicular midpoint line.

Here's the final version of the throne (I opted not to go too crazy on extra design features in order to save some time):

The Throne

Digital files

Extra resources: