From 665698771f2a7c875e3204b54226a68c74628742 Mon Sep 17 00:00:00 2001 From: Luis Visintini Date: Mon, 30 Aug 2021 13:59:43 +0100 Subject: [PATCH 1/2] Add new ASA profile (by Akko) --- src/key_profiles.scad | 3 +++ src/key_profiles/asa.scad | 44 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 src/key_profiles/asa.scad diff --git a/src/key_profiles.scad b/src/key_profiles.scad index 8aa2a62..9d190b0 100644 --- a/src/key_profiles.scad +++ b/src/key_profiles.scad @@ -11,6 +11,7 @@ include include include include +include // man, wouldn't it be so cool if functions were first order module key_profile(key_profile_type, row, column=0) { @@ -24,6 +25,8 @@ module key_profile(key_profile_type, row, column=0) { dss_row(row, column) children(); } else if (key_profile_type == "sa") { sa_row(row, column) children(); + } else if (key_profile_type == "asa") { + asa_row(row, column) children(); } else if (key_profile_type == "g20") { g20_row(row, column) children(); } else if (key_profile_type == "hipro") { diff --git a/src/key_profiles/asa.scad b/src/key_profiles/asa.scad new file mode 100644 index 0000000..dc76f6c --- /dev/null +++ b/src/key_profiles/asa.scad @@ -0,0 +1,44 @@ +module asa_row(row=3, column = 0) { + $key_shape_type = "sculpted_square"; + $bottom_key_width = 18.4; + $bottom_key_height = 18.4; + $width_difference = 5.7; + $height_difference = 5.7; + $dish_type = "spherical"; + $dish_depth = 1; + $dish_skew_x = 0; + $dish_skew_y = 0; + $top_skew = 1.75; + $stem_inset = 1.2; + $height_slices = 10; + $corner_radius = 1; + + // this is _incredibly_ intensive + //$rounded_key = true; + + $top_tilt_y = side_tilt(column); + extra_height = $double_sculpted ? extra_side_tilt_height(column) : 0; + + if (row <= 1){ + $total_depth = 10.65 + extra_height; + $top_tilt = 7; + children(); + } else if (row == 2) { + $total_depth = 9.65 + extra_height; + $top_tilt = 3.25; + children(); + } else if (row == 3) { + $total_depth = 10.35 + extra_height; + $top_tilt = 1.5; + children(); + } else if (row == 4 || row == 5){ + $total_depth = 11.9 + extra_height; + $top_tilt = 0.43; + children(); + } else { + // Same as row == 3 + $total_depth = 10.35 + extra_height; + $top_tilt = 1.5; + children(); + } +} From 2d03e5dd4bfa235cae0bbd8d8897b17ffd0d356d Mon Sep 17 00:00:00 2001 From: Luis Visintini Date: Sat, 6 Nov 2021 14:02:02 +0000 Subject: [PATCH 2/2] Updates made after review by @limitium --- src/key_profiles/asa.scad | 38 ++++++++++++++++++-------------------- 1 file changed, 18 insertions(+), 20 deletions(-) diff --git a/src/key_profiles/asa.scad b/src/key_profiles/asa.scad index dc76f6c..aaa9ede 100644 --- a/src/key_profiles/asa.scad +++ b/src/key_profiles/asa.scad @@ -1,11 +1,13 @@ module asa_row(row=3, column = 0) { $key_shape_type = "sculpted_square"; - $bottom_key_width = 18.4; - $bottom_key_height = 18.4; - $width_difference = 5.7; - $height_difference = 5.7; + $bottom_key_height = 18.06; + $bottom_key_width = 18.05; // Default (R3) + $total_depth = 10.35; // Default (R3) + $top_tilt = 1.5; // Default (R3) + $width_difference = 5.05; + $height_difference = 5.56; $dish_type = "spherical"; - $dish_depth = 1; + $dish_depth = 1.2; $dish_skew_x = 0; $dish_skew_y = 0; $top_skew = 1.75; @@ -16,29 +18,25 @@ module asa_row(row=3, column = 0) { // this is _incredibly_ intensive //$rounded_key = true; - $top_tilt_y = side_tilt(column); - extra_height = $double_sculpted ? extra_side_tilt_height(column) : 0; - - if (row <= 1){ - $total_depth = 10.65 + extra_height; + if (row == 1){ + $bottom_key_width = 17.95; + $width_difference = 4.95; + $total_depth = 10.65; $top_tilt = 7; children(); } else if (row == 2) { - $total_depth = 9.65 + extra_height; + $bottom_key_width = 18.17; + $width_difference = 5.17; + $total_depth = 9.65; $top_tilt = 3.25; children(); - } else if (row == 3) { - $total_depth = 10.35 + extra_height; - $top_tilt = 1.5; - children(); - } else if (row == 4 || row == 5){ - $total_depth = 11.9 + extra_height; + } else if (row == 4){ + $bottom_key_width = 18.02; + $width_difference = 5.02; + $total_depth = 11.9; $top_tilt = 0.43; children(); } else { - // Same as row == 3 - $total_depth = 10.35 + extra_height; - $top_tilt = 1.5; children(); } }