mirror of
https://github.com/rsheldiii/KeyV2.git
synced 2025-09-15 00:29:52 +00:00
Add cherry profile
This commit is contained in:
parent
fa49ee0c70
commit
f4f595c651
3 changed files with 116 additions and 11 deletions
|
@ -9,6 +9,7 @@ include <key_profiles/sa.scad>
|
|||
include <key_profiles/g20.scad>
|
||||
include <key_profiles/hipro.scad>
|
||||
include <key_profiles/grid.scad>
|
||||
include <key_profiles/cherry.scad>
|
||||
|
||||
// man, wouldn't it be so cool if functions were first order
|
||||
module key_profile(key_profile_type, row, column=0) {
|
||||
|
@ -26,6 +27,8 @@ module key_profile(key_profile_type, row, column=0) {
|
|||
hipro_row(row, column) children();
|
||||
} else if (key_profile_type == "grid") {
|
||||
grid_row(row, column) children();
|
||||
} else if (key_profile_type == "cherry") {
|
||||
cherry_row(row, column) children();
|
||||
} else if (key_profile_type == "disable") {
|
||||
children();
|
||||
} else {
|
||||
|
|
48
src/key_profiles/cherry.scad
Normal file
48
src/key_profiles/cherry.scad
Normal file
|
@ -0,0 +1,48 @@
|
|||
// based off GMK keycap set
|
||||
|
||||
module cherry_row(row=3, column=0) {
|
||||
$bottom_key_width = 18.16;
|
||||
$bottom_key_height = 18.16;
|
||||
$width_difference = $bottom_key_width - 11.85;
|
||||
$height_difference = $bottom_key_height - 14.64;
|
||||
$dish_type = "cylindrical";
|
||||
$dish_depth = 0.65;
|
||||
$dish_skew_x = 0;
|
||||
$dish_skew_y = 0;
|
||||
$top_skew = 2;
|
||||
|
||||
$top_tilt_y = side_tilt(column);
|
||||
extra_height = $double_sculpted ? extra_side_tilt_height(column) : 0;
|
||||
|
||||
// NOTE: cherry keycaps have this stem inset, but I'm reticent to turn it on
|
||||
// since it'll be surprising to folks. the height has been adjusted accordingly
|
||||
// $stem_inset = 0.6;
|
||||
extra_stem_inset_height = max(0.6 - $stem_inset, 0);
|
||||
|
||||
// <= is a hack so you can do these in a for loop. function row = 0
|
||||
if (row <= 1) {
|
||||
$total_depth = 9.8 - extra_stem_inset_height + extra_height;
|
||||
$top_tilt = 0;
|
||||
|
||||
children();
|
||||
} else if (row == 2) {
|
||||
$total_depth = 7.45 - extra_stem_inset_height + extra_height;
|
||||
$top_tilt = 2.5;
|
||||
|
||||
children();
|
||||
} else if (row == 3) {
|
||||
$total_depth = 6.55 - extra_stem_inset_height + extra_height;
|
||||
$top_tilt = 5;
|
||||
children();
|
||||
} else if (row == 3) {
|
||||
$total_depth = 6.7 + 0.65 - extra_stem_inset_height + extra_height;
|
||||
$top_tilt = 11.5;
|
||||
children();
|
||||
} else if (row >= 4) {
|
||||
$total_depth = 6.7 + 0.65 - extra_stem_inset_height + extra_height;
|
||||
$top_tilt = 11.5;
|
||||
children();
|
||||
} else {
|
||||
children();
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue