Skip to content

Instantly share code, notes, and snippets.

@codekansas
Created May 3, 2020 20:38
Show Gist options
  • Save codekansas/321e273b81c3d80a1b99bcbeafc80677 to your computer and use it in GitHub Desktop.
Save codekansas/321e273b81c3d80a1b99bcbeafc80677 to your computer and use it in GitHub Desktop.
// Total dimensions.
height = 120;
width = 40;
padding = 10;
module col(h, sph=false) {
difference() {
cube([width, width, h]);
if (sph)
translate([width / 2, width / 2, h])
sphere(d=width - padding);
else
translate([width / 2, width / 2, padding])
cylinder(h, d=width - padding);
}
}
module strut(h) {
translate([width / 2, 0, 0])
difference() {
polyhedron(
points=[
[width / 2, -width, 0],
[width / 2, 0, 0],
[-width / 2, 0, 0],
[-width / 2, -width, 0],
[0, 0, -width],
],
faces=[
[0,1,4],
[1,2,4],
[2,3,4],
[3,0,4],
[1,0,3],
[2,1,3],
]
);
translate([0, -width / 2, 0])
sphere(d=width - padding);
}
}
col(height);
translate([width, 0, 0])
col(2 * height / 3);
translate([width * 2, 0, 0])
col(height / 3, true);
translate([0, -width, 0])
col(2 * height / 3);
translate([width, -width, 0])
col(height / 3, true);
translate([0, -2 * width, 0])
col(height / 3, true);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment