Skip to content

Commit 01a3ff8

Browse files
committed
Added setting for constant rows across.
Works okay, may have issues with some staggers due to thumb cluster details.
1 parent 75da53f commit 01a3ff8

File tree

3 files changed

+50
-62
lines changed

3 files changed

+50
-62
lines changed

src/dactyl_manuform.py

Lines changed: 38 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,10 @@ def debugprint(info):
9494
centerrow = nrows - centerrow_offset
9595

9696
lastrow = nrows - 1
97-
cornerrow = lastrow - 1
97+
if reduced_outer_keys:
98+
cornerrow = lastrow - 1
99+
else:
100+
cornerrow = lastrow
98101
lastcol = ncols - 1
99102

100103

@@ -507,7 +510,7 @@ def key_holes(side="right"):
507510
holes = []
508511
for column in range(ncols):
509512
for row in range(nrows):
510-
if (column in [2, 3]) or (not row == lastrow):
513+
if (column in [2, 3]) or (not row == lastrow) or (not reduced_outer_keys):
511514
holes.append(key_place(single_plate(side=side), column, row))
512515

513516
shape = union(holes)
@@ -592,7 +595,7 @@ def connectors():
592595
debugprint('connectors()')
593596
hulls = []
594597
for column in range(ncols - 1):
595-
if (column in [2]):
598+
if (column in [2]) or (not reduced_outer_keys):
596599
iterrows = lastrow+1
597600
else:
598601
iterrows = lastrow
@@ -606,7 +609,7 @@ def connectors():
606609
hulls.append(triangle_hulls(places))
607610

608611
for column in range(ncols):
609-
if (column in [2, 3]):
612+
if (column in [2, 3]) or (not reduced_outer_keys):
610613
iterrows = lastrow
611614
else:
612615
iterrows = cornerrow
@@ -619,7 +622,7 @@ def connectors():
619622
hulls.append(triangle_hulls(places))
620623

621624
for column in range(ncols - 1):
622-
if (column in [2]):
625+
if (column in [2]) or (not reduced_outer_keys):
623626
iterrows = lastrow
624627
else:
625628
iterrows = cornerrow
@@ -631,20 +634,21 @@ def connectors():
631634
places.append(key_place(web_post_tl(), column + 1, row + 1))
632635
hulls.append(triangle_hulls(places))
633636

634-
if column == 1:
635-
places = []
636-
places.append(key_place(web_post_bl(), column + 1, iterrows))
637-
places.append(key_place(web_post_br(), column, iterrows))
638-
places.append(key_place(web_post_tl(), column + 1, iterrows + 1))
639-
places.append(key_place(web_post_bl(), column + 1, iterrows + 1))
640-
hulls.append(triangle_hulls(places))
641-
if column == 3:
642-
places = []
643-
places.append(key_place(web_post_br(), column, iterrows))
644-
places.append(key_place(web_post_bl(), column + 1, iterrows))
645-
places.append(key_place(web_post_tr(), column, iterrows + 1))
646-
places.append(key_place(web_post_br(), column, iterrows + 1))
647-
hulls.append(triangle_hulls(places))
637+
if reduced_outer_keys:
638+
if column == 1:
639+
places = []
640+
places.append(key_place(web_post_bl(), column + 1, iterrows))
641+
places.append(key_place(web_post_br(), column, iterrows))
642+
places.append(key_place(web_post_tl(), column + 1, iterrows + 1))
643+
places.append(key_place(web_post_bl(), column + 1, iterrows + 1))
644+
hulls.append(triangle_hulls(places))
645+
if column == 3:
646+
places = []
647+
places.append(key_place(web_post_br(), column, iterrows))
648+
places.append(key_place(web_post_bl(), column + 1, iterrows))
649+
places.append(key_place(web_post_tr(), column, iterrows + 1))
650+
places.append(key_place(web_post_br(), column, iterrows + 1))
651+
hulls.append(triangle_hulls(places))
648652

649653

650654
return union(hulls)
@@ -1352,27 +1356,6 @@ def minidox_thumb_ml_place(shape):
13521356
shape = translate(shape, [-53, -26, -12])
13531357
return shape
13541358

1355-
def minidox_thumb_mr_place(shape):
1356-
shape = rotate(shape, [10, -23, 25])
1357-
shape = translate(shape, thumborigin())
1358-
shape = translate(shape, [-23, -34, -6])
1359-
return shape
1360-
1361-
1362-
def minidox_thumb_bl_place(shape):
1363-
shape = rotate(shape, [6, -32, 35])
1364-
shape = translate(shape, thumborigin())
1365-
shape = translate(shape, [-51, -25, -11.5])
1366-
return shape
1367-
1368-
1369-
def minidox_thumb_br_place(shape):
1370-
shape = rotate(shape, [6, -32, 35])
1371-
shape = translate(shape, thumborigin())
1372-
shape = translate(shape, [-51, -25, -11.5])
1373-
return shape
1374-
1375-
13761359
def minidox_thumb_1x_layout(shape):
13771360
return union([
13781361
#return add([
@@ -2416,7 +2399,7 @@ def right_wall(skeleton=False):
24162399
skeleton=skeleton,
24172400
)])
24182401

2419-
for i in range(lastrow - 1):
2402+
for i in range(cornerrow):
24202403
y = i + 1
24212404
shape = union([shape, key_wall_brace(
24222405
lastcol, y - 1, 1, 0, web_post_br(), lastcol, y, 1, 0, web_post_tr(),
@@ -2453,13 +2436,14 @@ def left_wall(side='right', skeleton=False):
24532436
skeleton=skeleton,
24542437
)])
24552438

2456-
for i in range(lastrow):
2439+
# for i in range(lastrow):
2440+
for i in range(cornerrow+1):
24572441
y = i
2458-
low = (y == (lastrow-1))
2442+
low = (y == (cornerrow))
24592443
temp_shape1 = wall_brace(
24602444
(lambda sh: left_key_place(sh, y, 1, side=side)), -1, 0, web_post(),
24612445
(lambda sh: left_key_place(sh, y, -1, low_corner=low, side=side)), -1, 0, web_post(),
2462-
skeleton=skeleton and (y < (lastrow-1)),
2446+
skeleton=skeleton and (y < (cornerrow)),
24632447
)
24642448
shape = union([shape, temp_shape1])
24652449

@@ -2472,13 +2456,13 @@ def left_wall(side='right', skeleton=False):
24722456

24732457
shape = union([shape, temp_shape2])
24742458

2475-
for i in range(lastrow - 1):
2459+
for i in range(cornerrow):
24762460
y = i + 1
2477-
low = (y == (lastrow-1))
2461+
low = (y == (cornerrow))
24782462
temp_shape1 = wall_brace(
24792463
(lambda sh: left_key_place(sh, y - 1, -1, side=side)), -1, 0, web_post(),
24802464
(lambda sh: left_key_place(sh, y, 1, side=side)), -1, 0, web_post(),
2481-
skeleton=skeleton and (y < (lastrow - 1)),
2465+
skeleton=skeleton and (y < (cornerrow)),
24822466
)
24832467
shape = union([shape, temp_shape1])
24842468

@@ -2660,7 +2644,7 @@ def tbjs_thumb_connection(side='right', skeleton=False):
26602644
triangle_hulls(
26612645
[
26622646
key_place(web_post_bl(), 0, cornerrow),
2663-
left_key_place(web_post(), lastrow - 1, -1, side=side, low_corner=True),
2647+
left_key_place(web_post(), cornerrow, -1, side=side, low_corner=True),
26642648
# left_key_place(translate(web_post(), wall_locate1(-1, 0)), cornerrow, -1, low_corner=True),
26652649
tbjs_place(tbjs_post_tl()),
26662650
]
@@ -2721,7 +2705,7 @@ def tbjs_thumb_walls(skeleton=False):
27212705

27222706
shape = union([shape, wall_brace(
27232707
tbjs_place, -1.5, 0, tbjs_post_tl(),
2724-
(lambda sh: left_key_place(sh, lastrow - 1, -1, side=ball_side, low_corner=True)), -1, 0, web_post(),
2708+
(lambda sh: left_key_place(sh, cornerrow, -1, side=ball_side, low_corner=True)), -1, 0, web_post(),
27252709
)])
27262710
shape = union([shape, wall_brace(
27272711
tbjs_place, -1.5, 0, tbjs_post_tl(),
@@ -2918,8 +2902,8 @@ def minidox_thumb_connection(side='right', skeleton=False):
29182902
[
29192903
left_key_place(translate(web_post(), wall_locate2(-1, 0)), cornerrow, -1, low_corner=True, side=side),
29202904
left_key_place(translate(web_post(), wall_locate3(-1, 0)), cornerrow, -1, low_corner=True, side=side),
2921-
minidox_thumb_bl_place(translate(minidox_thumb_post_tr(), wall_locate2(-0.3, 1))),
2922-
minidox_thumb_bl_place(translate(minidox_thumb_post_tr(), wall_locate3(-0.3, 1))),
2905+
minidox_thumb_ml_place(translate(minidox_thumb_post_tr(), wall_locate2(-0.3, 1))),
2906+
minidox_thumb_ml_place(translate(minidox_thumb_post_tr(), wall_locate3(-0.3, 1))),
29232907
]
29242908
)])
29252909

@@ -3844,11 +3828,11 @@ def screw_insert_all_shapes(bottom_radius, top_radius, height, offset=0, side='r
38443828
print('screw_insert_all_shapes()')
38453829
shape = (
38463830
translate(screw_insert(0, 0, bottom_radius, top_radius, height, side=side), (0, 0, offset)),
3847-
translate(screw_insert(0, lastrow-1, bottom_radius, top_radius, height, side=side), (0, left_wall_lower_y_offset, offset)),
3831+
translate(screw_insert(0, cornerrow, bottom_radius, top_radius, height, side=side), (0, left_wall_lower_y_offset, offset)),
38483832
translate(screw_insert(3, lastrow, bottom_radius, top_radius, height, side=side), (0, 0, offset)),
38493833
translate(screw_insert(3, 0, bottom_radius, top_radius, height, side=side), (0,0, offset)),
38503834
translate(screw_insert(lastcol, 0, bottom_radius, top_radius, height, side=side), (0, 0, offset)),
3851-
translate(screw_insert(lastcol, lastrow-1, bottom_radius, top_radius, height, side=side), (0, 0, offset)),
3835+
translate(screw_insert(lastcol, cornerrow, bottom_radius, top_radius, height, side=side), (0, 0, offset)),
38523836
# translate(screw_insert_thumb(bottom_radius, top_radius, height), (0, 0, offset)),
38533837
)
38543838

@@ -3915,7 +3899,7 @@ def wire_posts():
39153899
shape = union([shape, default_thumb_ml_place(wire_post(1, 0).translate([5, 0, -2]))])
39163900

39173901
for column in range(lastcol):
3918-
for row in range(lastrow - 1):
3902+
for row in range(cornerrow):
39193903
shape = union([
39203904
shape,
39213905
key_place(wire_post(1, 0).translate([-5, 0, 0]), column, row),

src/generate_configuration.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424
'show_caps': False,
2525
'show_pcbs': False, #only runs if caps are shown, easist place to initially inject geometry
2626

27-
'nrows': 6, #5, # key rows
28-
'ncols': 6, #6, # key columns
27+
'nrows': 5, #5, # key rows
28+
'ncols': 3, #6, # key columns
2929

3030
'alpha': pi / 12.0, # curvature of the columns
3131
'beta': pi / 36.0, # curvature of the rows
@@ -38,6 +38,8 @@
3838

3939
'column_style_gt5': "orthographic",
4040
'column_style': "standard", # options include :standard, :orthographic, and :fixed
41+
'reduced_outer_keys': True,
42+
4143

4244
'thumb_offsets': [6, -3, 7],
4345
'keyboard_z_offset': (

src/generate_configuration_test.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010

1111
shape_config = {
1212

13-
# 'ENGINE': 'solid', # 'solid' = solid python / OpenSCAD, 'cadquery' = cadquery / OpenCascade
14-
'ENGINE': 'cadquery', # 'solid' = solid python / OpenSCAD, 'cadquery' = cadquery / OpenCascade
13+
'ENGINE': 'solid', # 'solid' = solid python / OpenSCAD, 'cadquery' = cadquery / OpenCascade
14+
# 'ENGINE': 'cadquery', # 'solid' = solid python / OpenSCAD, 'cadquery' = cadquery / OpenCascade
1515

1616

1717
######################
@@ -24,8 +24,8 @@
2424
'show_caps': False,
2525
'show_pcbs': False, #only runs if caps are shown, easist place to initially inject geometry
2626

27-
'nrows': 6, #5, # key rows
28-
'ncols': 6, #6, # key columns
27+
'nrows': 3, #5, # key rows
28+
'ncols': 5, #6, # key columns
2929

3030
'alpha': pi / 12.0, # curvature of the columns
3131
'beta': pi / 36.0, # curvature of the rows
@@ -38,6 +38,8 @@
3838

3939
'column_style_gt5': "orthographic",
4040
'column_style': "standard", # options include :standard, :orthographic, and :fixed
41+
'reduced_outer_keys': True,
42+
4143

4244
'thumb_offsets': [6, -3, 7],
4345
'keyboard_z_offset': (
@@ -59,7 +61,7 @@
5961
##############################
6062

6163
# 'DEFAULT' 6-key, 'MINI' 5-key, 'CARBONFET' 6-key, 'MINIDOX' 3-key, 'TRACKBALL_ORBYL', 'TRACKBALL_CJ'
62-
'thumb_style': 'DEFAULT',
64+
'thumb_style': 'MINIDOX',
6365
'default_1U_cluster': True, # only used with default, makes top right thumb cluster key 1U
6466
# Thumb key size. May need slight oversizing, check w/ caps. Additional spacing will be automatically added for larger keys.
6567
'minidox_Usize': 1.6,
@@ -265,7 +267,7 @@
265267
# 'SLIDING' = Features to slide the OLED in place and use a pin or block to secure from underneath.
266268
# 'CLIP' = Features to set the OLED in a frame a snap a bezel down to hold it in place.
267269

268-
'oled_mount_type': 'CLIP',
270+
'oled_mount_type': 'NONE',
269271
'oled_center_row': 1.25, # if not None, this will override the oled_mount_location_xyz and oled_mount_rotation_xyz settings
270272
'oled_translation_offset': (0, 0, 4), # Z offset tweaks are expected depending on curvature and OLED mount choice.
271273
'oled_rotation_offset': (0, 0, 0),

0 commit comments

Comments
 (0)