It’s Spring here, the weather is improving and last weekend in Vaszar we put the trampoline back together for the kids to enjoy. Its metal frame has these little black plastic spacers between the legs and the parts that hold the safety net, some of which were damaged or missing. They look like a thick plastic washer with notches on both sides.
Where are you supposed to buy more of these? The trampoline shop? You can probably find them online if you know what to look for but I decided it’d be simpler to make my own. After all, it’s not that complicated, the hole doesn’t need to be threaded and you can simplify the curve into a slope. Here’s a sketch my father-in-law did for me to take home:

As I imagined this in OpenSCAD, the doughnut would be a cylinder with a cylinder missing from the middle of it and then it’d have the sloped notch cut out of the top and the bottom. As I started to write it out I thought instead instead of repeating myself it would be neat to somehow mirror the notch. It’s the same on both the top and the bottom side of the spacer, and in fact it’s also symmetrical along the surface it’s cutting out from. To my surprise there’s no function to duplicate an object over an axis. Issue #4700 on GitHub called it “mirror copy” and that got closed with the comment that this is so simple that everyone should just write it themselves. Right, so now I too (like how many other people) have copy-pasted this implementation of copy_mirror from the GitHub comment… isn’t this what a standard library is for, so that you don’t have to re-write tedious, obvious stuff? Anyway, it just goes:
module copy_mirror(axis) {
children();
mirror(axis)
children();
}
From this I learnt about the children() function which will put the function (aka module)’s children there. We use it twice, the second time it’s mirrored over the given axis, pretty simple.
/* A-B-------C
* \ |
* E-------D
*/
A=[0,rampH+t];
B=[rampL,rampH+t];
C=[discW/2+t,rampH+t];
D=[discW/2+t,-1];
E=[rampL,0];
polygon([A, B, C, D, E]);
I also wonder how people keep track about which points they’re doing things with in a polygon while they’re putting it together. If you have any cool tips please write me a message. When I had these in-line in the past I lost track of what’s what either shortly after writing it, or in the worst case while I was trying to put it together. Now I had the ID of labeling the points like in a high-school maths problem so that what each one is becomes a bit clearer and the final polygon() call is just enumerating them. The ASCII-art diagram of where the labeled points are reminds me a bit of the branching diagrams from the git manual 🙂
So here’s the plain doughnut:

Then with the cutout I described above:

Then with that mirrored across the Y axis:

And then with that mirrored across the Z axis:

Leading to this final result:

Side view of the spacer design in OpenSCAD
It’s not a very complicated solution at all but here the mirroring was the new (for me) concept I wanted to try out for simplifying my solution and I quite like it. Anyway here’s the whole code:
// Spacer between poles on the trampoline
$fn=30;
discH=12/2;
discW=25;
holeW=7;
rampH=discH-(6/2);
rampL=4.6;
t=0.1; // tolerance
// mirror top-bottom because it's symmetrical
copy_mirror([0,0,1])
difference(){
// main ring
cylinder(discH,d=discW);
// screw hole
cylinder(discH+t,d=holeW);
/* A-B-------C
* \ |
* E-------D <-- instead of a curve, I will make D slightly lower (-1)
*/
A=[0,rampH+t];
B=[rampL,rampH+t];
C=[discW/2+t,rampH+t];
D=[discW/2+t,-1];
E=[rampL,0];
// ramp shape cutout
#
copy_mirror([1,0,0]) // mirror on C-D so I only need to draw 1 quarter
translate([-discW/2+rampL,0,discH-rampH]) // position to the edge
rotate([90,0,0])
translate([-rampL,0,-discW/2]) // centre on origin for rotation
linear_extrude(discW)
polygon([A, B, C, D, E]);
};
module copy_mirror(axis) {
children();
mirror(axis)
children();
}
One last not on actually printing this, I tried with it oriented 2 different ways knowing that either way it’s going to have overhangs. Well as you can see on the picture below printing it flat looks awful because even after tearing the support material off it’s still very rough and ugly (the one on the left). When printing it on its side you’ve still got some of that, but as you can see on the one on the right, there’s much less of it and the final result looks much more like the original object it was based off.

Of course the design is up on GitHub with my other models.