Modeled and test-fitted keycaps
This commit is contained in:
37
enclosure/keys.scad
Normal file
37
enclosure/keys.scad
Normal file
@@ -0,0 +1,37 @@
|
||||
// Contains the keycaps
|
||||
|
||||
distance_from_key_to_enclosure = 6;
|
||||
enclosure_hole_depth = 6;
|
||||
button_height_above_enclosure_surface = 3;
|
||||
|
||||
module keycap() {
|
||||
stopper_flange_height = 2;
|
||||
// Keycap
|
||||
cylinder(h = enclosure_hole_depth + stopper_flange_height + button_height_above_enclosure_surface, d = 18, $fn = 128);
|
||||
// Stopper flange
|
||||
cylinder(h = stopper_flange_height, d = 24);
|
||||
// Stem
|
||||
stem_height = distance_from_key_to_enclosure - stopper_flange_height;
|
||||
translate([0, 0, -stem_height / 2]){
|
||||
difference() {
|
||||
cube([5, 3.89, stem_height], true);
|
||||
cube([1, 3.9, stem_height + 0.1], true);
|
||||
cube([3.9, 1, stem_height + 0.1], true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module next_keycap() {
|
||||
keycap();
|
||||
}
|
||||
module prev_keycap() {
|
||||
keycap();
|
||||
}
|
||||
module vol_up_keycap() {
|
||||
keycap();
|
||||
}
|
||||
module vol_down_keycap() {
|
||||
keycap();
|
||||
}
|
||||
|
||||
keycap();
|
||||
Reference in New Issue
Block a user