Skip to content

Instantly share code, notes, and snippets.

@jeremy-brenner
Created January 20, 2019 20:30
Show Gist options
  • Save jeremy-brenner/56078b277911cd99363e2a7a0ffe9eab to your computer and use it in GitHub Desktop.
Save jeremy-brenner/56078b277911cd99363e2a7a0ffe9eab to your computer and use it in GitHub Desktop.
const thickness = 3;
const side_height = 20;
const len = 210;
const wid = 155;
const pole_radius = 22;
const pole_height = 75;
const screw_hole_radius = 2.5;
const screw_hole_separation = 189;
function screwHole() {
return rotate([0,90,0],
cylinder({r: screw_hole_radius, h: thickness, center: [true, true, true] })
);
}
function side() {
return difference(
cube({
size: [thickness, len, side_height],
center: [true, true, false]
}),
screwHole().translate([0,screw_hole_separation/2,side_height/2]),
screwHole().translate([0,screw_hole_separation/-2,side_height/2])
);
}
function main () {
return difference(
union(
cube({size: [wid, len, thickness], center: [true, true, false]}),
cylinder({r: pole_radius+6, h: pole_height, center: [true, true, false] }),
side().translate([wid/2,0,0]),
side().translate([wid/-2,0,0])
),
cylinder({r: pole_radius, h: pole_height, center: [true, true, false] }),
rotate([0,90,0],cylinder({r: 1.5, h: pole_radius*2+12, center: [true,true,true] } ))
.translate([0,0,pole_height/2]),
cube({size: [100,50, 15], center: [true, true, false]})
.translate([0,-65,0]),
cube({size: [100,50, 15], center: [true, true, false]})
.translate([0,65,0])
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment