Modelling a spacer for between trampoline poles

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, showing the screw hole and the symmetrical cutout where the poles should go

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.

How to fix permission denied flashing Prusa Firmware on Arch Linux

I ran into a permissions issue flashing an update to my 3D printer “Prusa MK3S+” on Arch Linux and the fix was easier than expected.

For background, this is my first time doing this so I wasn’t too sure about the procedure, the printer beeped before print to let me know there’s newer firmware available and I should upgrade. I checked online and found these instructions on the Prusa help site for how to flash firmware. It seems easy enough:

  1. Connect the printer to the laptop with USB
  2. Go to Menu → Configuration → Flash printer firmware
  3. choose the .hex file you downloaded from the Prusa website

that’s it!

However, when I clicked the “Flash!” button I got the following error message from the flasher’s log output:

avrdude-slic3r: ser_open(): can't open device "/dev/ttyACM0": Permission denied
avrdude-slic3r: Could not open port: /dev/ttyACM0

Continue reading

3D-printed caps for protruding bolts

When I attached our children’s swing to the ground there was still a significant piece of sharp-ish threaded metal sticking out above the bolt head and I was worried about them falling on it. Grinding the end off might still leave some sharp parts, so I thought it safer to print plastic covers for them.

I designed the caps with OpenSCAD, using the ScrewsMetric library for the bolt-shaped inset.

You can see the source code for Continue reading

3D modelling replacement knobs for back massager

small wooden knob

small wooden knob

There’s this fantastic device we have at home that I’m fairly sure is for giving back rubs, or maybe massages in general, like on your legs or something. I’ve tried it a few times but mostly the kids play with it. However it bothers me that there’s holes in it where the little knobs are supposed to be, so it doesn’t roll properly. I think the kids pulled them out, but maybe Continue reading

3D Printed Hungarian Cross

The Hungarian coat of arms features an iconic cross with two horizontal beams. In Hungarian it’s called “Kettős Kereszt” which translates to “Double Cross”, usually called the Patriarchal cross in English. This cross is present on other emblems around the area of Central and Eastern Europe too and has been featured on the Hungarian coat of arms at least since the reign of King Saint Stephen of Hungary.

3D model of the patriarchal cross as shown on the Hungarian coat of arms

3D model of the patriarchal cross as shown on the Hungarian coat of arms

Seeing as it’s a Hungarian national holiday today, in memory of the heroes and martyrs of the Hungarian revolution of 1956, everyone has their Hungarian flags out. I decided to do something Hungarian too, while trying out some tools for preparing models for 3D printing. So far I’ve been using Blender, because I have some experience with it, but it’s for creating 3D scenes and although you can use it to design 3D models for printing, it’s not CAD software. This time I tried Autodesk’s web-based program Tinkercad, which although lacking many of the features you’d get in a full-blown CAD program, is plenty enough for me to design simple things like this. Not being a mechanical engineer, I probably wouldn’t even know what features I’m missing!

photo collage of 3D printed "Kettős Kereszt" painted in the colours of the Hungarian flag

3D printed “Kettős Kereszt” painted in the colours of the Hungarian flag

The program is very intuitive to use. I put a few cubes on the workplane, stretched them out into intersecting rectangular boxes and exported an STL file for printing within minutes. You can see a screenshot of the result above. I also made a version with a hole cut out of the top so you could hang it on a key chain. That turned out to be as easy as putting a cylinder in one of the boxes, stretching it out of the top and bottom box faces and marking it as a “hole” in the model.

After scaling the model down to 30% so it fits on my print bed, the final print came out as shown in this photo. It took less than 10 minutes to print at 30% in-fill and seems pretty rigid. I’ve painted on the red, white and green of the Hungarian flag and will hang this up somewhere, who knows, maybe it’ll even be good for a Christmas decoration. If you’d like to print your own Hungarian cross you can download both of my STL files here:

In honour of the heroes! Tisztelet a hősöknek!