In this tutorial we’ll design a custom 3D printed plastic washer in OpenSCAD. This is a good first project to build in OpenSCAD. It only has a few parts.
You’ll need to have OpenSCAD installed, know what it is, and know the very basics of how it works. OpenSCAD is under active development but they don’t release very often, so I prefer to the most recent beta version.
But, why would you be here if you didn’t?
I’m going to measure with a caliper. You can also measure with a ruler but a caliper makes this the job more precise.
You can buy a caliper for $x.
(drawing of magnet, plastic washer, and metal washer)
I’m creating a washer for a small round magnet and washer set. The space I need to fill is 10mm tall.
(drawing of depth measurement)
My magnet and washer are 7mm thick, so I want to add a plastic washer that is 3mm thick.
(picture of caliper on magnet diameter)
My magnet has a 16mm diameter.
(picture of caliper on magnet hole)
The hole in the center is 3.5mm. I’m going to create a hole that is slightly larger than this at 4mm.
cylinder(h=4, d=16);
We’re going to draw a drill bit the size of the hole we want to poke through the washer.
cylinder(h=4, d=2);
There are some oddities when two faces are exactly touching each other. The common way to solve this is to offset your shapes a little bit. So, we’re going to make the drill bit 0.2mm taller than the washer and then offset it by -0.1mm on the Z axis.
Add the following line just above the drill bit.
translate[0, 0, -0.1]
Then add the offset to the drill bit cylinder height
cylinder(h=4+0.2, d=4);
Now you have a washer and you have a drill bit but we need to drill a hole. You’ll be doing an operation called a difference. You do this by wrapping the drawing with the difference()
function.
This draws the first item as a solid and then removes the subsequent item (the drill bit) from the first item.
Here’s the code:
difference() {
// Your code goes here
}
Here’s the full drawing of the washer.
difference() {
// Washer
cylinder(h=4, d=16);
// Drill bit
translate([0, 0, -0.1])
cylinder(h=4 + 0.2, d=);
}
Now that you’ve got a washer drawn, render it, and export it as an STL. You can then load the STL in your favorite Slicer and send it to your 3D printer.
Written by Joel Dare on November 6, 2024.
Get a monthly digest of what I'm up to.