Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
XDA profile
  • Loading branch information
rianadon committed Aug 20, 2023
commit 032f4664984fd55fa7691c0e33bb943d280f0a22
5 changes: 4 additions & 1 deletion src/key_profiles.scad
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ include <key_profiles/dss.scad>
include <key_profiles/asa.scad>
include <key_profiles/typewriter.scad>
include <key_profiles/hex.scad>
include <key_profiles/xda.scad>

// man, wouldn't it be so cool if functions were first order
module key_profile(key_profile_type, row, column=0) {
Expand Down Expand Up @@ -48,7 +49,9 @@ module key_profile(key_profile_type, row, column=0) {
} else if (key_profile_type == "cherry") {
cherry_row(row, column) children();
} else if (key_profile_type == "mt3") {
mt3_row(row, column) children();
mt3_row(row, column) children();
} else if (key_profile_type == "xda") {
xda_row(row, column) children();
} else if (key_profile_type == "disable") {
children();
} else {
Expand Down
29 changes: 29 additions & 0 deletions src/key_profiles/xda.scad
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
use <../functions.scad>
include <../settings.scad>

module xda_row(row=0, column = 0) {
$key_shape_type = "sculpted_square";
$bottom_key_width = 18.1;
$bottom_key_height = 18.1;
$width_difference = 3.7;
$height_difference = 3.7;
$top_tilt = 0;
$top_skew = 0;
$dish_type = "spherical";
$dish_skew_x = 0;
$dish_skew_y = 0;
$height_slices = 10;
$enable_side_sculpting = true;
$corner_radius = 0.6;

$side_sculpting = function(progress) (1 - progress) * 3.5;
$corner_sculpting = function(progress) pow(progress, 2) * 3;

$top_tilt_y = side_tilt(column);
extra_height = $double_sculpted ? extra_side_tilt_height(column) : 0;

// These together make the height = 9.7 at the corners and 9 at the center
$total_depth = 10.3 + extra_height;
$dish_depth = 1.3;
children();
}