Skip to content

Commit

Permalink
Adjustments to default cluster and column shift
Browse files Browse the repository at this point in the history
  • Loading branch information
bullwinkle3000 committed Apr 4, 2023
1 parent 9316769 commit c860a1b
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 11 deletions.
35 changes: 24 additions & 11 deletions src/clusters/default_cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -438,8 +438,8 @@ def connection(self, side='right'):
# clunky bit on the top left thumb connection (normal connectors don't work well)
shape = union([bottom_hull(
[
left_key_place(translate(web_post(), wall_locate2(-1, 0)), cornerrow, -1, low_corner=True, side=side),
left_key_place(translate(web_post(), wall_locate3(-1, 0)), cornerrow, -1, low_corner=True, side=side),
left_cluster_key_place(translate(web_post(), wall_locate2(-1, 0)), cornerrow, -1, low_corner=True, side=side),
left_cluster_key_place(translate(web_post(), wall_locate3(-1, 0)), cornerrow, -1, low_corner=True, side=side),
self.ml_place(translate(web_post_tr(), wall_locate2(-0.3, 1))),
self.ml_place(translate(web_post_tr(), wall_locate3(-0.3, 1))),
]
Expand All @@ -448,9 +448,9 @@ def connection(self, side='right'):
shape = union([shape,
hull_from_shapes(
[
left_key_place(translate(web_post(), wall_locate2(-1, 0)), cornerrow, -1,
left_cluster_key_place(translate(web_post(), wall_locate2(-1, 0)), cornerrow, -1,
low_corner=True, side=side),
left_key_place(translate(web_post(), wall_locate3(-1, 0)), cornerrow, -1,
left_cluster_key_place(translate(web_post(), wall_locate3(-1, 0)), cornerrow, -1,
low_corner=True, side=side),
self.ml_place(translate(web_post_tr(), wall_locate2(-0.3, 1))),
self.ml_place(translate(web_post_tr(), wall_locate3(-0.3, 1))),
Expand All @@ -461,18 +461,18 @@ def connection(self, side='right'):

shape = union([shape, hull_from_shapes(
[
left_key_place(translate(web_post(), wall_locate1(-1, 0)), cornerrow, -1, low_corner=True, side=side),
left_key_place(translate(web_post(), wall_locate2(-1, 0)), cornerrow, -1, low_corner=True, side=side),
left_key_place(translate(web_post(), wall_locate3(-1, 0)), cornerrow, -1, low_corner=True, side=side),
left_cluster_key_place(translate(web_post(), wall_locate1(-1, 0)), cornerrow, -1, low_corner=True, side=side),
left_cluster_key_place(translate(web_post(), wall_locate2(-1, 0)), cornerrow, -1, low_corner=True, side=side),
left_cluster_key_place(translate(web_post(), wall_locate3(-1, 0)), cornerrow, -1, low_corner=True, side=side),
self.tl_place(self.thumb_post_tl()),
]
)])

shape = union([shape, hull_from_shapes(
[
left_key_place(web_post(), cornerrow, -1, low_corner=True, side=side),
left_key_place(translate(web_post(), wall_locate1(-1, 0)), cornerrow, -1, low_corner=True, side=side),
cluster_key_place(web_post_bl(), 0, cornerrow),
left_cluster_key_place(web_post(), cornerrow, -1, low_corner=True, side=side),
left_cluster_key_place(translate(web_post(), wall_locate1(-1, 0)), cornerrow, -1, low_corner=True, side=side),
key_place(web_post_bl(), 0, cornerrow),
self.tl_place(self.thumb_post_tl()),
]
)])
Expand All @@ -487,11 +487,24 @@ def connection(self, side='right'):
]
)])

shape = union([shape, hull_from_shapes(
[
self.tl_place(self.thumb_post_tl()),
cluster_key_place(web_post_bl(), 0, cornerrow),
key_place(web_post_bl(), 0, cornerrow),
# left_cluster_key_place(web_post_bl(), cornerrow, 0, low_corner=False, side=side),
translate(key_place(web_post_bl(), 0, cornerrow), wall_locate1(-1, 0)),
self.tl_place(self.thumb_post_tl()),
]
)])

# shape = union([shape, key_place(sphere(5), 0, cornerrow)])

return shape

def screw_positions(self):
position = self.thumborigin()
position = list(np.array(position) + np.array([-21, -58, 0]))
position = list(np.array(position) + np.array([-15, -58, 0]))
position[2] = 0

return position
Expand Down
4 changes: 4 additions & 0 deletions src/dactyl_manuform.py
Original file line number Diff line number Diff line change
Expand Up @@ -896,12 +896,16 @@ def left_key_position(row, direction, low_corner=False, side='right'):

def left_key_place(shape, row, direction, low_corner=False, side='right'):
debugprint("left_key_place()")
if row > bottom_key(0):
row = bottom_key(0)
pos = left_key_position(row, direction, low_corner=low_corner, side=side)
return translate(shape, pos)

# This is hackish... It just allows the search and replace of key_place in the cluster code
# to not go big boom
def left_cluster_key_place(shape, row, direction, low_corner=False, side='right'):
if row > bottom_key(0):
row = bottom_key(0)
return left_key_place(shape, row, direction, low_corner, side)

def wall_locate1(dx, dy):
Expand Down

0 comments on commit c860a1b

Please sign in to comment.