Skip to content

Instantly share code, notes, and snippets.

@devilholk
Created November 26, 2018 02:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save devilholk/7c081c35136d3a64a28a69456f7860a3 to your computer and use it in GitHub Desktop.
Save devilholk/7c081c35136d3a64a28a69456f7860a3 to your computer and use it in GitHub Desktop.
For connecting a flat piece to a slider that slides along a pole
/*
___ _ _ _ _ ___ _ ___ _ _ _
/ __| |___| |_| |_ ___ __| | | _ \___| |___ / __| (_)__| |___ _ _
\__ \ / _ \ _| _/ -_) _` | | _/ _ \ / -_) \__ \ | / _` / -_) '_|
|___/_\___/\__|\__\___\__,_| |_| \___/_\___| |___/_|_\__,_\___|_|
by: Mikael Lövqvist @ LED Alert Hackerspace
.-----. outer diameter: 2 × pole_shroud_thickness + pole_diameter
( o ) inner diameter: pole_diameter
|\ \ \ \----- slot_width
| \ \ \/ \
| \ \ \ \
| \__\ \__\
( | | | |
\ | | | | height
length \ | |_| |
\|_____\_|
width \
+--- distance from the bottom of this slot
to the bottom of the piece is known as
slot_min_wall
*/
module slotted_pole_slider(
length = 30,
height = 10,
width = 6,
slot_min_wall = 3,
slot_width = 2.2,
pole_diameter = 3.3,
pole_shroud_thickness = 2.5) {
pole_shroud_diameter = pole_diameter + pole_shroud_thickness * 2;
slot_depth = height - slot_min_wall;
rotate(180, [1,0,0]) difference() {
union() {
difference() {
translate([pole_shroud_diameter*.5,0,0]) cube([length-pole_shroud_diameter*.5, width, height]);
translate([-1,(width-slot_width)*.5,-1]) cube([length+2, slot_width, slot_depth+1]);
}
translate([pole_shroud_diameter*.5,width/2,0]) cylinder(d=pole_shroud_diameter, h=height);
}
translate([pole_shroud_diameter*.5,width/2,0]) translate([0,0,-1]) cylinder(d=pole_diameter, h=height+2);
}
}
slotted_pole_slider();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment