Skip to content

Commit b64d5b8

Browse files
committed
Testing fix for linux geometry varying from windows geometry.
1 parent d958945 commit b64d5b8

File tree

4 files changed

+72
-42
lines changed

4 files changed

+72
-42
lines changed

src/dactyl_manuform.py

Lines changed: 61 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -647,7 +647,8 @@ def connectors():
647647
hulls.append(triangle_hulls(places))
648648

649649

650-
return union(hulls)
650+
# return union(hulls)
651+
return add(hulls)
651652

652653

653654
############
@@ -937,8 +938,10 @@ def default_thumbcaps():
937938
def default_thumb(side="right"):
938939
print('thumb()')
939940
shape = default_thumb_1x_layout(rotate(single_plate(side=side), (0, 0, -90)))
940-
shape = union([shape, default_thumb_15x_layout(rotate(single_plate(side=side), (0, 0, -90)))])
941-
shape = union([shape, default_thumb_15x_layout(double_plate(), plate=False)])
941+
# shape = union([shape, default_thumb_15x_layout(rotate(single_plate(side=side), (0, 0, -90)))])
942+
# shape = union([shape, default_thumb_15x_layout(double_plate(), plate=False)])
943+
shape = add([shape, default_thumb_15x_layout(rotate(single_plate(side=side), (0, 0, -90)))])
944+
shape = add([shape, default_thumb_15x_layout(double_plate(), plate=False)])
942945
shape = difference(shape, [default_thumb_pcb_plate_cutouts()])
943946
return shape
944947

@@ -1127,7 +1130,8 @@ def default_thumb_connectors():
11271130
)
11281131
)
11291132

1130-
return union(hulls)
1133+
return add(hulls)
1134+
# return union(hulls)
11311135

11321136
############################
11331137
# MINI THUMB CLUSTER
@@ -1170,7 +1174,8 @@ def mini_thumb_bl_place(shape):
11701174

11711175

11721176
def mini_thumb_1x_layout(shape):
1173-
return union([
1177+
# return union([
1178+
return add([
11741179
mini_thumb_mr_place(rotate(shape, [0, 0, thumb_plate_mr_rotation])),
11751180
mini_thumb_br_place(rotate(shape, [0, 0, thumb_plate_br_rotation])),
11761181
mini_thumb_tl_place(rotate(shape, [0, 0, thumb_plate_tl_rotation])),
@@ -1179,7 +1184,8 @@ def mini_thumb_1x_layout(shape):
11791184

11801185

11811186
def mini_thumb_15x_layout(shape):
1182-
return union([mini_thumb_tr_place(rotate(shape, [0, 0, thumb_plate_tr_rotation]))])
1187+
# return union([mini_thumb_tr_place(rotate(shape, [0, 0, thumb_plate_tr_rotation]))])
1188+
return add([mini_thumb_tr_place(rotate(shape, [0, 0, thumb_plate_tr_rotation]))])
11831189

11841190

11851191
def mini_thumbcaps():
@@ -1190,13 +1196,15 @@ def mini_thumbcaps():
11901196

11911197
def mini_thumb(side="right"):
11921198
shape = mini_thumb_1x_layout(single_plate(side=side))
1193-
shape = union([shape, mini_thumb_15x_layout(single_plate(side=side))])
1199+
# shape = union([shape, mini_thumb_15x_layout(single_plate(side=side))])
1200+
shape = add([shape, mini_thumb_15x_layout(single_plate(side=side))])
11941201

11951202
return shape
11961203

11971204
def mini_thumb_pcb_plate_cutouts(side="right"):
11981205
shape = mini_thumb_1x_layout(plate_pcb_cutout(side=side))
1199-
shape = union([shape, mini_thumb_15x_layout(plate_pcb_cutout(side=side))])
1206+
# shape = union([shape, mini_thumb_15x_layout(plate_pcb_cutout(side=side))])
1207+
shape = add([shape, mini_thumb_15x_layout(plate_pcb_cutout(side=side))])
12001208
return shape
12011209

12021210

@@ -1318,7 +1326,8 @@ def mini_thumb_connectors():
13181326
)
13191327
)
13201328

1321-
return union(hulls)
1329+
# return union(hulls)
1330+
return add(hulls)
13221331

13231332

13241333
############################
@@ -1365,15 +1374,17 @@ def minidox_thumb_br_place(shape):
13651374

13661375

13671376
def minidox_thumb_1x_layout(shape):
1368-
return union([
1377+
# return union([
1378+
return add([
13691379
minidox_thumb_tr_place(rotate(shape, [0, 0, thumb_plate_tr_rotation])),
13701380
minidox_thumb_tl_place(rotate(shape, [0, 0, thumb_plate_tl_rotation])),
13711381
minidox_thumb_ml_place(rotate(shape, [0, 0, thumb_plate_ml_rotation])),
13721382
])
13731383

13741384

13751385
def minidox_thumb_fx_layout(shape):
1376-
return union([
1386+
# return union([
1387+
return add([
13771388
minidox_thumb_tr_place(rotate(shape, [0, 0, thumb_plate_tr_rotation])),
13781389
minidox_thumb_tl_place(rotate(shape, [0, 0, thumb_plate_tl_rotation])),
13791390
minidox_thumb_ml_place(rotate(shape, [0, 0, thumb_plate_ml_rotation])),
@@ -1388,13 +1399,15 @@ def minidox_thumbcaps():
13881399
def minidox_thumb(side="right"):
13891400

13901401
shape = minidox_thumb_fx_layout(rotate(single_plate(side=side), [0.0, 0.0, -90]))
1391-
shape = union([shape, minidox_thumb_fx_layout(adjustable_plate(minidox_Usize))])
1402+
# shape = union([shape, minidox_thumb_fx_layout(adjustable_plate(minidox_Usize))])
1403+
shape = add([shape, minidox_thumb_fx_layout(adjustable_plate(minidox_Usize))])
13921404
# shape = minidox_thumb_1x_layout(single_plate(side=side))
13931405
return shape
13941406

13951407
def minidox_thumb_pcb_plate_cutouts(side="right"):
13961408
shape = minidox_thumb_fx_layout(plate_pcb_cutout(side=side))
1397-
shape = union([shape, minidox_thumb_fx_layout(plate_pcb_cutout())])
1409+
# shape = union([shape, minidox_thumb_fx_layout(plate_pcb_cutout())])
1410+
shape = add([shape, minidox_thumb_fx_layout(plate_pcb_cutout())])
13981411
return shape
13991412

14001413
def minidox_thumb_post_tr():
@@ -1475,7 +1488,8 @@ def minidox_thumb_connectors():
14751488
)
14761489
)
14771490

1478-
return union(hulls)
1491+
# return union(hulls)
1492+
return add(hulls)
14791493

14801494

14811495
############################
@@ -1521,7 +1535,8 @@ def carbonfet_thumb_bl_place(shape):
15211535

15221536

15231537
def carbonfet_thumb_1x_layout(shape):
1524-
return union([
1538+
# return union([
1539+
return add([
15251540
carbonfet_thumb_tr_place(rotate(shape, [0, 0, thumb_plate_tr_rotation])),
15261541
carbonfet_thumb_mr_place(rotate(shape, [0, 0, thumb_plate_mr_rotation])),
15271542
carbonfet_thumb_br_place(rotate(shape, [0, 0, thumb_plate_br_rotation])),
@@ -1531,12 +1546,14 @@ def carbonfet_thumb_1x_layout(shape):
15311546

15321547
def carbonfet_thumb_15x_layout(shape, plate=True):
15331548
if plate:
1534-
return union([
1549+
# return union([
1550+
return add([
15351551
carbonfet_thumb_bl_place(rotate(shape, [0, 0, thumb_plate_bl_rotation])),
15361552
carbonfet_thumb_ml_place(rotate(shape, [0, 0, thumb_plate_ml_rotation]))
15371553
])
15381554
else:
1539-
return union([
1555+
# return union([
1556+
return add([
15401557
carbonfet_thumb_bl_place(shape),
15411558
carbonfet_thumb_ml_place(shape)
15421559
])
@@ -1550,14 +1567,17 @@ def carbonfet_thumbcaps():
15501567

15511568
def carbonfet_thumb(side="right"):
15521569
shape = carbonfet_thumb_1x_layout(single_plate(side=side))
1553-
shape = union([shape, carbonfet_thumb_15x_layout(double_plate_half(), plate=False)])
1554-
shape = union([shape, carbonfet_thumb_15x_layout(single_plate(side=side))])
1570+
# shape = union([shape, carbonfet_thumb_15x_layout(double_plate_half(), plate=False)])
1571+
# shape = union([shape, carbonfet_thumb_15x_layout(single_plate(side=side))])
1572+
shape = add([shape, carbonfet_thumb_15x_layout(double_plate_half(), plate=False)])
1573+
shape = add([shape, carbonfet_thumb_15x_layout(single_plate(side=side))])
15551574

15561575
return shape
15571576

15581577
def carbonfet_thumb_pcb_plate_cutouts(side="right"):
15591578
shape = carbonfet_thumb_1x_layout(plate_pcb_cutout(side=side))
1560-
shape = union([shape, carbonfet_thumb_15x_layout(plate_pcb_cutout())])
1579+
# shape = union([shape, carbonfet_thumb_15x_layout(plate_pcb_cutout())])
1580+
shape = add([shape, carbonfet_thumb_15x_layout(plate_pcb_cutout())])
15611581
return shape
15621582

15631583
def carbonfet_thumb_post_tr():
@@ -1695,7 +1715,8 @@ def carbonfet_thumb_connectors():
16951715
)
16961716
)
16971717

1698-
return union(hulls)
1718+
# return union(hulls)
1719+
return add(hulls)
16991720

17001721

17011722
############################
@@ -1772,7 +1793,8 @@ def tbjs_thumb_bl_place(shape):
17721793

17731794

17741795
def tbjs_thumb_1x_layout(shape):
1775-
return union([
1796+
# return union([
1797+
return add([
17761798
tbjs_thumb_tl_place(rotate(shape, [0, 0, thumb_plate_tr_rotation])),
17771799
tbjs_thumb_mr_place(rotate(shape, [0, 0, thumb_plate_mr_rotation])),
17781800
tbjs_thumb_bl_place(rotate(shape, [0, 0, thumb_plate_bl_rotation])),
@@ -1792,7 +1814,8 @@ def tbjs_thumb_fx_layout(shape):
17921814
]
17931815

17941816
def trackball_layout(shape):
1795-
return union([
1817+
# return union([
1818+
return add([
17961819
tbjs_place(shape),
17971820
])
17981821

@@ -1808,7 +1831,8 @@ def tbjs_thumb(side="right"):
18081831
# shape = tbjs_thumb_fx_layout(rotate(single_plate(side=side), [0.0, 0.0, -90]))
18091832
shape = tbjs_thumb_1x_layout(single_plate(side=side))
18101833
# shape = tbjs_thumb_fx_layout(adjustable_square_plate(Uwidth=tbjs_Uwidth, Uheight=tbjs_Uheight))
1811-
shape = union([shape, *tbjs_thumb_fx_layout(adjustable_square_plate(Uwidth=tbjs_Uwidth, Uheight=tbjs_Uheight))])
1834+
# shape = union([shape, *tbjs_thumb_fx_layout(adjustable_square_plate(Uwidth=tbjs_Uwidth, Uheight=tbjs_Uheight))])
1835+
shape = add([shape, *tbjs_thumb_fx_layout(adjustable_square_plate(Uwidth=tbjs_Uwidth, Uheight=tbjs_Uheight))])
18121836

18131837
# shape = union([shape, trackball_layout(trackball_socket())])
18141838
# shape = tbjs_thumb_1x_layout(single_plate(side=side))
@@ -1957,7 +1981,8 @@ def tbjs_thumb_connectors():
19571981
)
19581982
)
19591983

1960-
return union(hulls)
1984+
# return union(hulls)
1985+
return add(hulls)
19611986

19621987

19631988

@@ -1994,7 +2019,8 @@ def tbcj_thumb_bl_place(shape):
19942019
return shape
19952020

19962021
def tbcj_thumb_layout(shape):
1997-
return union([
2022+
# return union([
2023+
return add([
19982024
tbcj_thumb_tr_place(rotate(shape, [0, 0, thumb_plate_tr_rotation])),
19992025
tbcj_thumb_tl_place(rotate(shape, [0, 0, thumb_plate_tl_rotation])),
20002026
tbcj_thumb_ml_place(rotate(shape, [0, 0, thumb_plate_ml_rotation])),
@@ -2068,7 +2094,8 @@ def tbcj_place(shape):
20682094
def tbcj_thumb(side="right"):
20692095
t = tbcj_thumb_layout(single_plate(side=side))
20702096
tb = tbcj_place(tbcj_holder())
2071-
return union([t, tb])
2097+
# return union([t, tb])
2098+
return add([t, tb])
20722099

20732100
def tbcj_thumb_pcb_plate_cutouts(side="right"):
20742101
t = tbcj_thumb_layout(plate_pcb_cutout(side=side))
@@ -2214,7 +2241,8 @@ def tbcj_thumb_connectors():
22142241
)
22152242
)
22162243

2217-
return union(hulls)
2244+
# return union(hulls)
2245+
return add(hulls)
22182246

22192247

22202248

@@ -2320,7 +2348,8 @@ def wall_brace(place1, dx1, dy1, post1, place2, dx2, dy2, post2, back=False, ske
23202348

23212349
if len(hulls)>0:
23222350
shape2 = bottom_hull(hulls)
2323-
shape1 = union([shape1, shape2])
2351+
# shape1 = union([shape1, shape2])
2352+
shape1 = add([shape1, shape2])
23242353

23252354
return shape1
23262355

@@ -2380,7 +2409,7 @@ def right_wall(skeleton=False):
23802409

23812410
shape = None
23822411

2383-
shape = union([shape,key_wall_brace(
2412+
shape = union([shape, key_wall_brace(
23842413
lastcol, y, 1, 0, web_post_tr(), lastcol, y, 1, 0, web_post_br(),
23852414
skeleton=skeleton,
23862415
)])
@@ -3896,7 +3925,8 @@ def wire_posts():
38963925

38973926
def model_side(side="right"):
38983927
print('model_right()')
3899-
shape = union([key_holes(side=side)])
3928+
shape = add([key_holes(side=side)])
3929+
# shape = union([key_holes(side=side)])
39003930
if debug_exports:
39013931
export_file(shape=shape, fname=path.join(r"..", "things", r"debug_key_plates"))
39023932
connector_shape = connectors()

src/generate_configuration.py

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

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

3030
'alpha': pi / 12.0, # curvature of the columns
@@ -89,7 +89,7 @@
8989
'thumb_plate_bl_rotation': 0.0, # Bottom right plate rotation tweaks as thumb cluster is crowded for hot swap, etc.
9090
##############################
9191
# EXPERIMENTAL
92-
'separable_thumb': True, #creates a separable thumb section with additional screws to hold it down. Only attached at base.
92+
'separable_thumb': False, #creates a separable thumb section with additional screws to hold it down. Only attached at base.
9393
##############################
9494

9595
###################################

src/generate_configuration_test.py

Lines changed: 3 additions & 3 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,7 +24,7 @@
2424
'show_caps': False,
2525
'show_pcbs': False, #only runs if caps are shown, easist place to initially inject geometry
2626

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

3030
'alpha': pi / 12.0, # curvature of the columns

src/run_config.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
22
"ENGINE": "cadquery",
3-
"save_dir": "DM_4x5_NOTCHPLT_DEFTMB_OLED_EXTCTRL",
4-
"config_name": "DM_4x5_NOTCHPLT_DEFTMB_OLED_EXTCTRL",
3+
"save_dir": ".",
4+
"config_name": "DM",
55
"show_caps": false,
66
"show_pcbs": false,
7-
"nrows": 4,
8-
"ncols": 5,
7+
"nrows": 6,
8+
"ncols": 6,
99
"alpha": 0.26179916666666664,
1010
"beta": 0.08726638888888888,
1111
"centercol": 3,
@@ -25,7 +25,7 @@
2525
"web_thickness": 5.1,
2626
"post_size": 0.1,
2727
"post_adj": 0,
28-
"thumb_style": "DEFAULT",
28+
"thumb_style": "TRACKBALL_ORBYL",
2929
"default_1U_cluster": true,
3030
"minidox_Usize": 1.6,
3131
"default_thumb_screw_xy_locations": [
@@ -146,7 +146,7 @@
146146
"thumb_plate_ml_rotation": 0.0,
147147
"thumb_plate_br_rotation": 0.0,
148148
"thumb_plate_bl_rotation": 0.0,
149-
"separable_thumb": true,
149+
"separable_thumb": false,
150150
"trackball_in_wall": false,
151151
"tbiw_ball_center_row": 0.2,
152152
"tbiw_translational_offset": [

0 commit comments

Comments
 (0)