Skip to content

Instantly share code, notes, and snippets.

@winder
Last active June 26, 2022 11:49
Show Gist options
  • Star 6 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save winder/bacf94d3c11acf84624c4ad19767deb2 to your computer and use it in GitHub Desktop.
Save winder/bacf94d3c11acf84624c4ad19767deb2 to your computer and use it in GitHub Desktop.
3D Printed Standoff
// manually install from https://github.com/Irev-Dev/Round-Anything
// into library directory:
// Windows: My Documents\OpenSCAD\libraries
// Linux: $HOME/.local/share/OpenSCAD/libraries
// Mac OS X: $HOME/Documents/OpenSCAD/libraries
include <Round-Anything/polyround.scad>
$fn=40;
// primary dimensions
BIG_H=3.1;. // Height of spacer between switch and and PCB
BIG_R=2.7;. // Radius of spacer between switch and and PCB
SMALL_H=3.0; // Height of spacer that passes through PCB
SMALL_R=2.0; // Radius of spacer that passes through PCB
// detail dimensions
RECESS_H=.4; // Height of recessed area in spacer that passes through PCB
RECESS_R=1.8; // Radius of recessed area in spacer that passes through PCB
BOLT_R=1.1;. // Radius of bolt hole that passes through the part
difference() {
union() {
extrudeWithRadius(BIG_H, 0, .7, $fn) circle(BIG_R);
translate([0, 0, BIG_H])
cylinder(RECESS_H, RECESS_R, RECESS_R);
translate([0, 0, BIG_H+RECESS_H])
cylinder(SMALL_H-RECESS_H, SMALL_R, SMALL_R);
}
cylinder(SMALL_H, BOLT_R, BOLT_R);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment