Skip to content

Commit

Permalink
Minor additional shifts on default thumbcluster to allow 1.5U and 1U …
Browse files Browse the repository at this point in the history
…settings to work well.
  • Loading branch information
joshreve committed Jul 25, 2021
1 parent 67c14b3 commit 0456cbb
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 16 deletions.
32 changes: 18 additions & 14 deletions src/dactyl_manuform.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def debugprint(info):
if default_1U_cluster:
double_plate_height = (.7*sa_double_length - mount_height) / 3
else:
double_plate_height = (sa_double_length - mount_height) / 3
double_plate_height = (.95*sa_double_length - mount_height) / 3

if oled_mount_type is not None:
left_wall_x_offset = oled_left_wall_x_offset_override
Expand Down Expand Up @@ -554,7 +554,7 @@ def thumb_tr_place(shape):

def thumb_tl_place(shape):
debugprint('thumb_tl_place()')
shape = rotate(shape, [10, -18, 10])
shape = rotate(shape, [7.5, -18, 10])
shape = translate(shape, thumborigin())
shape = translate(shape, [-32.5, -14.5, -2.5])
return shape
Expand Down Expand Up @@ -595,12 +595,17 @@ def thumb_bl_place(shape):
def thumb_1x_layout(shape, cap=False):
debugprint('thumb_1x_layout()')
if cap:
shapes = thumb_mr_place(shape)
shapes = shapes.add(thumb_ml_place(rotate(shape, [0, 0, thumb_plate_ml_rotation])))
shapes = shapes.add(thumb_br_place(rotate(shape, [0, 0, thumb_plate_br_rotation])))
shapes = shapes.add(thumb_bl_place(rotate(shape, [0, 0, thumb_plate_bl_rotation])))
shape_list = [
thumb_mr_place(rotate(shape, [0, 0, thumb_plate_mr_rotation])),
thumb_ml_place(rotate(shape, [0, 0, thumb_plate_ml_rotation])),
thumb_br_place(rotate(shape, [0, 0, thumb_plate_br_rotation])),
thumb_bl_place(rotate(shape, [0, 0, thumb_plate_bl_rotation])),
]

if default_1U_cluster:
shapes = shapes.add(thumb_tr_place(rotate(rotate(shape, (0, 0, 90)), [0, 0, thumb_plate_tr_rotation])))
shape_list.append(thumb_tr_place(rotate(rotate(shape, (0, 0, 90)), [0, 0, thumb_plate_tr_rotation])))
shape_list.append(thumb_tl_place(rotate(shape, [0, 0, thumb_plate_tl_rotation])))
shapes = add(shape_list)

else:
shape_list = [
Expand All @@ -621,8 +626,7 @@ def thumb_15x_layout(shape, cap=False, plate=True):
if cap:
shape = rotate(shape, (0, 0, 90))
cap_list = [thumb_tl_place(rotate(shape, [0, 0, thumb_plate_tl_rotation]))]
if not default_1U_cluster:
cap_list.append(thumb_tr_place(rotate(shape, [0, 0, thumb_plate_tr_rotation])))
cap_list.append(thumb_tr_place(rotate(shape, [0, 0, thumb_plate_tr_rotation])))
return add(cap_list)
else:
shape_list = [thumb_tl_place(rotate(shape, [0, 0, thumb_plate_tl_rotation]))]
Expand All @@ -633,15 +637,14 @@ def thumb_15x_layout(shape, cap=False, plate=True):
if cap:
shape = rotate(shape, (0, 0, 90))
shape_list = [
thumb_tl_place(shape),#.solids().objects[0]
thumb_tl_place(shape),
]
if not default_1U_cluster:
shape_list.append(thumb_tr_place(shape))
shape_list.append(thumb_tr_place(shape))

return add(shape_list)
else:
shape_list = [
thumb_tl_place(shape),#.solids().objects[0]
thumb_tl_place(shape),
]
if not default_1U_cluster:
shape_list.append(thumb_tr_place(shape))
Expand Down Expand Up @@ -693,7 +696,8 @@ def thumb_connectors():

def default_thumbcaps():
t1 = thumb_1x_layout(sa_cap(1), cap=True)
t1.add(thumb_15x_layout(sa_cap(1.5), cap=True))
if not default_1U_cluster:
t1.add(thumb_15x_layout(sa_cap(1.5), cap=True))
return t1


Expand Down
2 changes: 1 addition & 1 deletion src/generate_configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
'save_dir': '.',
'config_name': "DM",

'show_caps': False,
'show_caps': True,

'nrows': 5, #5, # key rows
'ncols': 6, #6, # key columns
Expand Down
2 changes: 1 addition & 1 deletion src/run_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"ENGINE": "solid",
"save_dir": ".",
"config_name": "DM",
"show_caps": false,
"show_caps": true,
"nrows": 5,
"ncols": 6,
"alpha": 0.26179916666666664,
Expand Down

0 comments on commit 0456cbb

Please sign in to comment.