From 665698771f2a7c875e3204b54226a68c74628742 Mon Sep 17 00:00:00 2001 From: Luis Visintini Date: Mon, 30 Aug 2021 13:59:43 +0100 Subject: [PATCH] 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(); + } +}