17 March 2024

The Problem

A while back, I got a new computer. Since the chip shortage was still ongoing, the easiest way to get a good graphics card was to buy a prebuilt PC. The PC overall was great, and even better after I installed liquid cooling which made it run effectively silently. The difference is so large that it feels similar to switching from a HDD to an SSD. I'll probably never run a desktop with air cooling again.

Anyway, the computer had a fatal flaw.

Top of computer

The power button sits flush with the top of the case. Inky, one of our cats, is fond of using my desktop tower as a stepping stone to get on top of my desk, and shortly after I got the PC, she stepped on the power button and it dutifully turned off.

For a while, I had been using a very simple solution of putting a book on top of the power button. The book distributed the force so that the power button wouldn't move enough to trigger. Unfortunately, recently Inky had been pushing the book to the side or off of the tower completely, leaving the power button exposed. So far I had managed to avoid any incidents, but it was only a matter of time. And, you know, what if I wanted to actually read the book?

Power button covered with book

Using FreeCAD

I started doing a bit of 3D modeling around a year and a half ago, but I had so far only done the modeling in OpenSCAD. OpenSCAD was great for me because I knew how to write code, but didn't know how to do CAD. However, I was starting to run into some of the limitations of OpenSCAD, most notably the difficulty of creating fillets due to it representing bodies as meshes, which means that it has no concept of an edge to be filleted.

I decided this would be a good project to try out a more standard CAD program, or at least one that uses boundary representation (B-rep) instead of meshes, so that I would have access to better fillets. From what I can tell, most people use Fusion 360 for this type of work, but I wanted to try out open alternatives before committing to Fusion, so FreeCAD it was. I used the main version of FreeCAD. I considered using realthunder's assembly3 fork, which I have heard makes some things more intuitive, but my attempts of getting it installed were failures, so I stuck with the main version.

The idea for the cover that I'd make was simple: It would be a piece of plastic slightly larger than the computer tower so that it would sit on top with minimal movement, and it would have cutouts for the power button, USB ports, etc, and a grid of holes above the fans. The idea is that when Inky jumps onto it, her paw won't go far enough into the power button cutout to actually hit the power button, but that it would still be easily accessible by human fingers.

Getting started was a bit rocky. I originally tried using the Part workbench because it had tools with the names I expected ("extrude"), but then when I wanted to make a hexagon grid pattern of holes above the computer fans, it seemed that the tool I wanted (MultiPattern) was only in the PartDesign workbench. After some confusing research, I decided that PartDesign was the workbench that I wanted to be using, and the "extrude" equivalent is called "pad".

Actually building the model wasn't too bad, except for the final step of selecting edges to fillet because rendering the model with the hexagon grid cut out was extremely slow. Some time after I finished the model, I found out that the rendering is greatly sped up by enabling the "Use OpenGL VBO" setting. However, even with that setting enabled, sometimes the rendered view still slows to single digit FPS and the rest of the UI also becomes unresponsive until it finishes whatever thinking it had to do (This could be a whole rant on its own, not specific to FreeCAD).

Model in hand, I went to print it out.

3D model

Slicing and Printing

For 3D printing, I'm currently using a Bambu X1C, which has a build area of 256mm x 256mm. The cover I designed was 432mm x 205mm. Clever use of diagonal orientation would not be enough to get it to fit into the build volume; I had to split it up into multiple parts. That's nothing unusual for 3D printing, but since I had previously only designed small parts, it was my first personal experience with cutting up a model.

I ended up cutting up the model into three parts, which each could be printed flat on the build plate. I liked this because the main exposed surface of the final product would be the first layer of the print. The first layer picks up the surface pattern of the build plate. I'm using a textured PEI sheet, and I really like the way that it makes first layers turn out.

For the two joints, I used different methods. The frontmost and middle pieces were separated in the middle of a featureless area, so I used a dovetail joint there. The middle and back pieces were cut in the middle of the grid of holes, so I didn't expect a dovetail joint to do well. I used connector pins, which make horizontal holes in the two pieces and two small cylinders to additionally print.

This was actually my second try at cutting up the model. I originally did dovetails on the thin sides of the part, and tried to print the three pieces standing up. This would have had the advantage that I could print all three pieces in the same print job, but it had downsides of exposing a side composed of layer lines and being a much more difficult print due to the hexagon grid being vertical. My attempt at printing this way ended up with a nozzle clog a few hours in (also a new experience!), which eventually resulted in me replacing the nozzle entirely when I kept getting partial clogs reappearing after trying less drastic unclogging methods.

Anyway, let's take a look at the final result.

The cover on top of the computer tower

The Verdicts

FreeCAD

I didn't find the UI of FreeCAD as bad as it's suggested by some of the reviews I found online. It did take some time to get used to it, and it wasn't obvious at the beginning whether I should expect to use Part or PartDesign. However, it was really frustrating to do an incidental action on the model viewer and have the entire application stall until the action was finished, meaning I couldn't access any menus, move to a different stage of the model (which would be simpler to render), and so on.

For my next design project, I will probably try a programmatic CAD option that still uses B-rep. I think it will be nice having three distinct and very separate steps of editing the model, calculating the model geometry, and viewing the model. Calculating the model geometry is expected to take a decent amount of time, and sometimes I noticed a mistake in my parameters while it was happening, so it would be useful to be able to kill the step and go straight back to editing. Also, FreeCAD mostly recalculates after every single change, which means that when updating multiple parts of the model, I had to wait a significant amount of time between each edit, even if I didn't actually care about visually inspecting the result.

Modeling based off of a photograph

When making the cutouts for the power button and ports, I imported a top-down photo of the computer top into FreeCAD and built the sketch based on the photograph. This technique lets you match the part that you're building on without making a lot of measurements.

It worked acceptably, but the power button is noticeably off center in its cutout. I'll probably just take the bunch of measurements in the future.

Joints for the 3D print

The dovetail joint was excellent. The two pieces fit together very cleanly and it doesn't show super obviously in the final result.

On the other hand, I don't like the way that the connector pin joint came out. The pins didn't slide into the holes easily, and I didn't want to try sanding or filing them down to a slightly smaller size, so I just pushed the two pieces together as much as I could, and there's a very clear gap still. In the future, if I want this kind of joint I'll plan to do it myself in the model instead of relying on the slicer. Doing it myself in CAD means that I can more easily control things like the amount of clearance to leave for the pins and a chamfer to help align it when pressing it into the part.

The slicer also only let me do a single dovetail joint in the middle of the part, but it might have also been a good solution to do two small dovetails outside the grid of holes, which is again something that I could do if I modeled the joint myself.

The Culprit

Of course I can't leave this post without a picture of the cat that caused the whole thing.

Inky