Skip to content

Instantly share code, notes, and snippets.

@ryankurte
Created January 18, 2016 05:50
Show Gist options
  • Save ryankurte/077d0ec1da12e2a0d936 to your computer and use it in GitHub Desktop.
Save ryankurte/077d0ec1da12e2a0d936 to your computer and use it in GitHub Desktop.
Replacement knob for gas cooker
height = 7;
d_outside = 17.2;
hole_size = 3.4;
hole_taper = 6;
thickness = 3;
inner = 6;
inner_key = 4.4;
bump_r = 3;
bump_n = 18;
slop = 0.4;
difference() {
union() {
cylinder(h=height, r=d_outside/2, $fa=1, $fs=0.5);
for(i = [0 : bump_n]) {
rotate([0, 0, i * 360 / bump_n]) {
translate([0, d_outside/2, height/2]) {
cylinder(h=height, r=bump_r/2, center=true, $fa=1, $fs=0.5);
}
}
}
}
//Center hole
cylinder(h=height, r=hole_size/2, $fa=1, $fs=0.5);
//Screw hole + taper
translate([0, 0, height - (hole_taper - hole_size)/2]) {
cylinder(h=(hole_taper - hole_size)/2, r1=hole_size/2, r2=(hole_taper)/2, $fa=1, $fs=0.5);
}
//Keyed cutout
translate([0, 0, 0]) {
intersection() {
cylinder(h=height - thickness, r=inner/2, $fa=1, $fs=0.5);
translate([0, 0, 0]) {
cube(size = [inner, inner_key, (height - thickness) * 2], center=true);
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment