summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJoshua Shreve <j.a.shreve@gmail.com>2021-07-16 21:05:41 -0400
committerGitHub <noreply@github.com>2021-07-16 21:05:41 -0400
commitfaa55f32b84466beefd69fd74af484f1070880ab (patch)
tree099e7f96c1f1ecd5e4add72115311b6f499fc7f4 /src
parent2308d88617e77cf58414d01694de523970e60996 (diff)
parent2481de6bc74619b4a8165254b8e4f514d2b8806e (diff)
Merge pull request #8 from nbovee/thumb_post_fix
Thumb post fix
Diffstat (limited to 'src')
-rw-r--r--src/dactyl_manuform.py17
-rw-r--r--src/generate_configuration.py2
-rw-r--r--src/run_config.json2
3 files changed, 12 insertions, 9 deletions
diff --git a/src/dactyl_manuform.py b/src/dactyl_manuform.py
index 6012fac..69098e6 100644
--- a/src/dactyl_manuform.py
+++ b/src/dactyl_manuform.py
@@ -102,6 +102,7 @@ if 'HS_' in plate_style:
mount_width = keyswitch_width + 2 * plate_rim
mount_height = keyswitch_height + 2 * plate_rim
mount_thickness = plate_thickness
+double_plate_height = (sa_double_length - mount_height) / 3
if oled_mount_type is not None:
left_wall_x_offset = oled_left_wall_x_offset_override
@@ -256,8 +257,7 @@ def single_plate(cylinder_segments=100, side="right"):
## SA Keycaps ##
################
-sa_length = 18.25
-sa_double_length = 37.5
+
def sa_cap(Usize=1):
@@ -636,10 +636,9 @@ def thumb_15x_layout(shape, cap=False, plate=True):
def double_plate_half():
debugprint('double_plate()')
- plate_height = (sa_double_length - mount_height) / 3
- top_plate = box(mount_width, plate_height, web_thickness)
+ top_plate = box(mount_width, double_plate_height, web_thickness)
top_plate = translate(top_plate,
- [0, (plate_height + mount_height) / 2, plate_thickness - (web_thickness / 2)]
+ [0, (double_plate_height + mount_height) / 2, plate_thickness - (web_thickness / 2)]
)
return top_plate
@@ -693,28 +692,28 @@ def default_thumb(side="right"):
def thumb_post_tr():
debugprint('thumb_post_tr()')
return translate(web_post(),
- [(mount_width / 2) - post_adj, (mount_height / 1.15) - post_adj, 0]
+ [(mount_width / 2) - post_adj, ((mount_height/2) + double_plate_height) - post_adj, 0]
)
def thumb_post_tl():
debugprint('thumb_post_tl()')
return translate(web_post(),
- [-(mount_width / 2) + post_adj, (mount_height / 1.15) - post_adj, 0]
+ [-(mount_width / 2) + post_adj, ((mount_height/2) + double_plate_height) - post_adj, 0]
)
def thumb_post_bl():
debugprint('thumb_post_bl()')
return translate(web_post(),
- [-(mount_width / 2) + post_adj, -(mount_height / 1.15) + post_adj, 0]
+ [-(mount_width / 2) + post_adj, -((mount_height/2) + double_plate_height) + post_adj, 0]
)
def thumb_post_br():
debugprint('thumb_post_br()')
return translate(web_post(),
- [(mount_width / 2) - post_adj, -(mount_height / 1.15) + post_adj, 0]
+ [(mount_width / 2) - post_adj, -((mount_height/2) + double_plate_height) + post_adj, 0]
)
diff --git a/src/generate_configuration.py b/src/generate_configuration.py
index 2c2d7e7..b8f86ad 100644
--- a/src/generate_configuration.py
+++ b/src/generate_configuration.py
@@ -113,6 +113,8 @@ shape_config = {
'notch_width': 5.0, # If using notch, it is identical to undecut, but only locally by the switch clip
'sa_profile_key_height': 12.7,
+ 'sa_length': 18.25,
+ 'sa_double_length': 37.5,
'plate_thickness': 4+1.1,
'plate_rim': 1.5 + 0.5,
diff --git a/src/run_config.json b/src/run_config.json
index 2bae82c..82583b6 100644
--- a/src/run_config.json
+++ b/src/run_config.json
@@ -77,6 +77,8 @@
"undercut_keyswitch_width": 14.0,
"notch_width": 5.0,
"sa_profile_key_height": 12.7,
+ "sa_length": 18.25,
+ "sa_double_length": 37.5,
"plate_thickness": 5.1,
"plate_rim": 2.0,
"clip_thickness": 1.4,