Add Key Bump for Layouts

This commit is contained in:
JONATHAN DOVE 2022-02-20 19:36:11 -05:00
parent 47f17efcf1
commit 61b39b701a
No known key found for this signature in database
GPG Key ID: 186955F9110D0214
2 changed files with 10 additions and 0 deletions

View File

@ -177,6 +177,14 @@ module inner_shape(extra_wall_thickness = 0, extra_keytop_thickness = 0) {
// additive objects at the top of the key
module additive_features(inset) {
top_of_key() {
// Allow for key bump in layout
if ($layout_key_bump) {
for (layout_bump_key = $layout_bump_keys){
if (str($legends[0][0]) == layout_bump_key){
keybump($key_bump_depth, $key_bump_edge);
}
}
}
if($key_bump) keybump($key_bump_depth, $key_bump_edge);
if(!inset && $children > 0) color($secondary_color) children();
}

View File

@ -136,6 +136,8 @@ $minkowski_radius = .33;
//insert locating bump
$key_bump = false;
$layout_key_bump = false;
$layout_bump_keys = ["F","f","J","j"];
//height of the location bump from the top surface of the key
$key_bump_depth = 0.5;
//distance to move the bump from the front edge of the key