3. Computer Aided Design

This week is all about CAD. I’ve been using both Inkscape and Fusion regularly for the past six years and consider myself very familiar with them. I originally intended to try out FreeCAD and OpenSCAD in the hope of learning something new but I had some things come up during the weekend and on monday my entire home network died on me which took most of the day to fix. So I’m absolutely playing catch-up at the last minute now.

Things I need to do: - Try 3D software - Try 2D vector software - Try 2D raster software

I started off deciding which programs I want to use. I originally planned on trying out FreeCAD and OpenSCAD but some things came up so I ran out of time and decided to go with things I’m already familiar with.


What I used:

  • Autodesk Fusion: I decided to use Fusion as I’m used to the workflow and regularly use it to make small projects to fix things around the house.

  • Inkscape: Inkscape is an incredible tool and I honestly can’t think of any other piece of software that does what it does that offers anything better. I learned Illustrator in school and used it for quite some time but after switching to Inkscape I always run into issues with the way Illustrator handles exporting and file formats. The greatest example of this is scale issues. Illustrator loves to shift line dimensions and scale entire files in strange ways. Inkscape is just reliable.

  • GIMP: I haven’t used GIMP much at all before now, I’ve used Adobe Photoshop extensively but it’s expensive and I’d rather learn an Open-Source alternative than continue having to rely on Adobe.


Autodesk Fusion

To start myself off I decided to kill two birds with one stone. Fixing the home network involved some messy cabling in the laundry room and I needed to make some cable wall mounts so they wouldn’t snag on the door. Starting off with the general concept I think I’ll be screwing the mounts into the board along the edge of the door.

My favorite thing about Fusion is parametric design and I decided to make a clip that is completely parametric. Meaning I can declare cable diameter, number of cables and the thickness of the clip. To start off I made a quick mock-up without parameters. Quick CAD like this is enough for one-off designs but making changes to this later down the line could prove tricky.

The inital sketch


Cable clip

After doing the mockup I had a good sense of the parameters required for the finished model:

ParameterName Unit Expression Description
CableDia mm 5 Diameterofcable
CableNum none 3 Numberofcablesheld
FlexTh mm 3 Thicknessofflexibleelements
BottomTh mm 3 Thicknessofbottomplate
ScrewDia mm 3 DiameterofScrew
Cablespace mm 1 Spaceforcabletosqueezeintoclip
Twidth mm 7 Totalwidthofpiece,i.e”lengthofcableheld”

Getting the spacing between cables and the gap patterned with a formula proved to be surprisingly tricky. The one I ended up using was:

CableNum * ( CableDia + FlexTh / 2 ) - ( FlexTh + CableDia - FlexTh / 2 )

Here is the .f3d file for the clip and below is an image of the clip with the parameters set as I printed it.

The Finished Clip

Here’s the clip with the parameters changed up as an example.

Parameter demonstration

Final Project mock-up

One of the assignments for this week is modelling experimental objects or parts of a possible project in 2D/3D. The clip I earlier might prove useful later but it’s mostly a single-issue design. Fixing the cables in the laundry room. I decided to at least make something directly related to the final project. One of the parts that seems to be the most challenging to design is the “chute” that the cards fall into. Mostly because of the angles being hard to parametrize. I decided to do a test design to see if I could make the angled chute fully parametric.

I started off by defining my parameters:

Parameter Name Unit Expression Description
CardW mm 63 Width of card
CardH mm 88 Height of card
MatT mm 4 Thickness of material, Assuming lasercut.
ChuDe mm 50 Depth of Chute. From top to bottom vertical axis.
ChuAn deg 15 Angle of chute walls, Relative to vertical axis.

Using offset planes along the edge of the bottom panel to model the angle for the chute.

Had to recall some fun math to get the length of the chute walls to match the total height.

ChuDe / (cos (ChuAn))

This sets the length of the angled line to the vertical distance between the two points at each end of the sketch line.

In this case, 50 /(cos(15)) = 51.764 ish Definitely having some odd issues with getting all of it to line up but I think that’s mostly due to the thickness of the material, I might need to adjust the origin point of the sketch lines as projecting them from the bottom material might be causing them to have slightly different origin points on each face. Not exactly sure what’s causing it but the sides don’t line up exactly, The difference is within a millimeter at the angle I want to use but it grows as the angle increases. See the image below for an example.

??

Main things I used this time around were Project/Include, 3D sketches and offset planes. 3D sketches are an absolute pain but sometimes they’re the easiest way to get things to line up as you can constrain between projections as long as you make sure the references make sense. In the end the file isn’t exactly how I wanted it to be but I’ll keep playing around with it until I figure out what’s causing the sides to intersect. Notice how they’re at 86° from each other? It makes sense they’d not be 90° since they’re both tilting forwards, but the tops intersecting definitely isn’t intended.

Angles intersecting

Here’s the finished chute .f3d file. The parameters work as intended, I can change any of them and the design responds. Just need to make sense of the angle thing.

Chute


Inkscape

First off I decided to check if I even had the latest version of Inkscape on my home machine, as I usually work on my laptop at work and I noticed the UI looking a bit different. Upgrading with winget:

winget list --name Inkscape

Lists installed packages where the name includes “Inkscape”. It returned the installed version as 1.2.1 and the latest available as 1.4

winget upgrade Inkscape.Inkscape

I’ve used Inkscape for plenty of functional projects so I decided to do something more creative/artistic. After spending way too much time doing patterns in Fusion I figured why not make a fun pattern in Inkscape. Maybe I’ll engrave it onto something later.

I ended up making a tesselating knot pattern. The whole thing is made of three shapes repeating. In the lower right I show how I made the shapes. Circles and squares overlaid and intersected. The Path tools are definitely Inkscape’s most powerful feature and I strongly recommend getting familiar with them. Being able to take shapes and combine or cut them into even more shapes is such a simple but powerful workflow. Also I can’t stress enough how much I like using grids. Way easier to keep things neat and organized when everything lines up.

Click here to open the .svg in your browser. (Right click > download page to download)

Image of pattern


GIMP

I haven’t used GIMP all that much so I’ll start off with something simple, Removing a background and color fixing.

winget install GIMP.GIMP

Getting started in GIMP was surprisingly easy. The UI is a bit convoluted and the terms/names for tools don’t translate directly but I still got the hang of it quick. Icons are clear and there are good descriptions when hovering over elements.

I took a photo of the cable clip I designed earlier with some DIY lighting on a piece of paper as background. I need to do some light color fixing so the gold color shows properly and finally remove the background. If I were to export a png I’d get a transparent one but JPG being JPG I’ll go for all white.

Unedited image

The Image

Selection tool

After testing out a few selection tools I settled on “Intelligent Scissors”. Enabling “Interactive Boundary” allowed me to adjust the selection outline by dragging it around after setting the scissor points along the edge. This is something I don’t remember being able to do in photoshop and was really convenient when trying to catch small details in the outline otherwise not recognized by the tool like the small outcropping there. Completely unneccessary here and usually something I’d intentionally mask out of the image but it’s nice to be able to catch tiny pixel-scale details like that.

Selection

After making the selection I just right click > invert selection and delete. The background is now nonexistent.

Doing the color adjustments proved tricky. I’m used to working in Photoshop’s Curves & Levels and GIMP also has these but the dropper tool behavior was different and I wasn’t able to make the adjustments how I wanted to. I’m sure it’s just a matter of getting used to the UI and learning to interpret the overlay. I did the best I could but I still think it’s a little too sharp on the contrast. Getting the color right wasn’t too hard though.

Exporting gave me a nice menu where I could adjust compression strength, bit depth and more. Being able to see the file size during exporting is a nice touch.

Export menu

exportmenu

Final Image

Here’s the final image with the eye-searing white background.

Finalimage


Video recording & Editing

I chose OBS for screen recording and Kdenlive for editing. Making a simple video of the Inkscape pattern. Distinct pattern moving quickly should prove tricky for compression.

I’ve used OBS many times for streaming and recording. Kdenlive is new to me but it seems intuitive.

I recorded me messing around with the pattern in Inkscape, Always make sure to disable the sound in OBS while recording if you’re like me and like to have music on while you work. Forgot to and almost blew out my eardrums playing the video.

Opened the footage up in Kdenlive, I like the UI and noticed that a lot of the keybinds are similar to Premiere and Audacity. S for selecting, X for razor and more. Trimmed out unnecessary footage and went to exporting.

Kdenlive Render Menu

Render Menu

CTRL+ENTER opens the render menu. Exporting at 720p. The pattern moving around makes some fun compression artifacts but overall it looks surprisingly good. Filesize is 1.2MB, Which I feel is on the larger side for a 19 second video. In the future I may render the video at original resolution and compress it with FFMPEG.

Video


Image Compression

Haven’t had to do much image compression since I’ve mostly been using Windows’ snipping tool for the past assignments. I’m familiar with ffmpeg and decided to try compressing images that way. Turns out it’s surprisingly easy.

ffmpeg -i image.jpg -q:v 50 compressedimage.jpg

“-i” designates an image, “image.jpg” is your input. “-q:v 50” sets the compression level, 0 being maximum and 100 being practically uncompressed. “compressedimage.jpg” is the output.

I decided to test this out on something visually noisy so I made an image in Inkscape and exported it at a 2000x2000 resolution. Inkscape’s JPG export filesize is a whopping 462 KB and after FFMPEG compression it quarters it to 103KB.

Uncompressed

Uncompressed

Compressed

Compressed

Can you tell the difference?

I think it’s most noticeable in the grid-pattern appearing on the red ball gradient. But that’s also something Jpeg compression wasn’t designed for. Here’s a fantastic youtube video explaining why JPG is good for some things and terrible at others.

Project Files

Program Used Link
AutoDesk Fusion Cable Clip
AutoDesk Fusion Card Chute
Inkscape Patterns