Skip to content

Instantly share code, notes, and snippets.

@mschuetz
Last active June 13, 2021 13:22
Show Gist options
  • Save mschuetz/f4703b4067653ec3681b262484a7ab1b to your computer and use it in GitHub Desktop.
Save mschuetz/f4703b4067653ec3681b262484a7ab1b to your computer and use it in GitHub Desktop.
bsx=77;
bsy=32;
// distance of screwhole to edge of pcb
screwdist=3.5;
screwr=1.75;
clearance=2;
wall=2;
module box() {
difference() {
cube([bsx + 2*clearance + 2*wall, bsy + 2*clearance + 2*wall, 10]);
translate([wall, wall, wall])
cube([bsx + 2*clearance, bsy + 2*clearance, 10]);
}
}
module base() {
difference() {
union() {
box();
translate([screwr*2 + wall+clearance, screwr*2 + wall+clearance, wall])
cylinder(r=screwr*2, h=3);
translate([screwr*2 + wall+clearance, screwr*2 + wall+clearance + bsy - 2*screwdist, wall])
cylinder(r=screwr*2, h=3);
translate([screwr*2 + wall+clearance + bsx - 2*screwdist, screwr*2 + wall+clearance, wall])
cylinder(r=screwr*2, h=3);
translate([screwr*2 + wall+clearance + bsx - 2*screwdist, screwr*2 + wall+clearance + bsy - 2*screwdist, wall])
cylinder(r=screwr*2, h=3);
}
translate([screwr*2 + wall+clearance, screwr*2 + wall+clearance, -0.1])
cylinder(r=screwr, h=10, $fn=20);
translate([screwr*2 + wall+clearance, screwr*2 + wall+clearance + bsy - 2*screwdist, -0.1])
cylinder(r=screwr, h=10, $fn=20);
translate([screwr*2 + wall+clearance + bsx - 2*screwdist, screwr*2 + wall+clearance, -0.1])
cylinder(r=screwr, h=10, $fn=20);
translate([screwr*2 + wall+clearance + bsx - 2*screwdist, screwr*2 + wall+clearance + bsy - 2*screwdist, -0.1])
cylinder(r=screwr, h=10, $fn=20);
translate([wall + clearance + screwdist + screwr*2, -0.1, wall])
cube([bsx - 2*screwdist - 4*screwr, wall*2.1, 10.1-wall]);
translate([-0.1, wall + clearance+screwdist + screwr*2, wall])
rotate([0,0,0])
cube([wall*2.1, bsy - 2*screwdist - 4*screwr, 10.1-wall]);
}
}
base();
Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment