@@ -647,7 +647,8 @@ def connectors():
647
647
hulls .append (triangle_hulls (places ))
648
648
649
649
650
- return union (hulls )
650
+ # return union(hulls)
651
+ return add (hulls )
651
652
652
653
653
654
############
@@ -937,8 +938,10 @@ def default_thumbcaps():
937
938
def default_thumb (side = "right" ):
938
939
print ('thumb()' )
939
940
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 )])
942
945
shape = difference (shape , [default_thumb_pcb_plate_cutouts ()])
943
946
return shape
944
947
@@ -1127,7 +1130,8 @@ def default_thumb_connectors():
1127
1130
)
1128
1131
)
1129
1132
1130
- return union (hulls )
1133
+ return add (hulls )
1134
+ # return union(hulls)
1131
1135
1132
1136
############################
1133
1137
# MINI THUMB CLUSTER
@@ -1170,7 +1174,8 @@ def mini_thumb_bl_place(shape):
1170
1174
1171
1175
1172
1176
def mini_thumb_1x_layout (shape ):
1173
- return union ([
1177
+ # return union([
1178
+ return add ([
1174
1179
mini_thumb_mr_place (rotate (shape , [0 , 0 , thumb_plate_mr_rotation ])),
1175
1180
mini_thumb_br_place (rotate (shape , [0 , 0 , thumb_plate_br_rotation ])),
1176
1181
mini_thumb_tl_place (rotate (shape , [0 , 0 , thumb_plate_tl_rotation ])),
@@ -1179,7 +1184,8 @@ def mini_thumb_1x_layout(shape):
1179
1184
1180
1185
1181
1186
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 ]))])
1183
1189
1184
1190
1185
1191
def mini_thumbcaps ():
@@ -1190,13 +1196,15 @@ def mini_thumbcaps():
1190
1196
1191
1197
def mini_thumb (side = "right" ):
1192
1198
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 ))])
1194
1201
1195
1202
return shape
1196
1203
1197
1204
def mini_thumb_pcb_plate_cutouts (side = "right" ):
1198
1205
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 ))])
1200
1208
return shape
1201
1209
1202
1210
@@ -1318,7 +1326,8 @@ def mini_thumb_connectors():
1318
1326
)
1319
1327
)
1320
1328
1321
- return union (hulls )
1329
+ # return union(hulls)
1330
+ return add (hulls )
1322
1331
1323
1332
1324
1333
############################
@@ -1365,15 +1374,17 @@ def minidox_thumb_br_place(shape):
1365
1374
1366
1375
1367
1376
def minidox_thumb_1x_layout (shape ):
1368
- return union ([
1377
+ # return union([
1378
+ return add ([
1369
1379
minidox_thumb_tr_place (rotate (shape , [0 , 0 , thumb_plate_tr_rotation ])),
1370
1380
minidox_thumb_tl_place (rotate (shape , [0 , 0 , thumb_plate_tl_rotation ])),
1371
1381
minidox_thumb_ml_place (rotate (shape , [0 , 0 , thumb_plate_ml_rotation ])),
1372
1382
])
1373
1383
1374
1384
1375
1385
def minidox_thumb_fx_layout (shape ):
1376
- return union ([
1386
+ # return union([
1387
+ return add ([
1377
1388
minidox_thumb_tr_place (rotate (shape , [0 , 0 , thumb_plate_tr_rotation ])),
1378
1389
minidox_thumb_tl_place (rotate (shape , [0 , 0 , thumb_plate_tl_rotation ])),
1379
1390
minidox_thumb_ml_place (rotate (shape , [0 , 0 , thumb_plate_ml_rotation ])),
@@ -1388,13 +1399,15 @@ def minidox_thumbcaps():
1388
1399
def minidox_thumb (side = "right" ):
1389
1400
1390
1401
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 ))])
1392
1404
# shape = minidox_thumb_1x_layout(single_plate(side=side))
1393
1405
return shape
1394
1406
1395
1407
def minidox_thumb_pcb_plate_cutouts (side = "right" ):
1396
1408
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 ())])
1398
1411
return shape
1399
1412
1400
1413
def minidox_thumb_post_tr ():
@@ -1475,7 +1488,8 @@ def minidox_thumb_connectors():
1475
1488
)
1476
1489
)
1477
1490
1478
- return union (hulls )
1491
+ # return union(hulls)
1492
+ return add (hulls )
1479
1493
1480
1494
1481
1495
############################
@@ -1521,7 +1535,8 @@ def carbonfet_thumb_bl_place(shape):
1521
1535
1522
1536
1523
1537
def carbonfet_thumb_1x_layout (shape ):
1524
- return union ([
1538
+ # return union([
1539
+ return add ([
1525
1540
carbonfet_thumb_tr_place (rotate (shape , [0 , 0 , thumb_plate_tr_rotation ])),
1526
1541
carbonfet_thumb_mr_place (rotate (shape , [0 , 0 , thumb_plate_mr_rotation ])),
1527
1542
carbonfet_thumb_br_place (rotate (shape , [0 , 0 , thumb_plate_br_rotation ])),
@@ -1531,12 +1546,14 @@ def carbonfet_thumb_1x_layout(shape):
1531
1546
1532
1547
def carbonfet_thumb_15x_layout (shape , plate = True ):
1533
1548
if plate :
1534
- return union ([
1549
+ # return union([
1550
+ return add ([
1535
1551
carbonfet_thumb_bl_place (rotate (shape , [0 , 0 , thumb_plate_bl_rotation ])),
1536
1552
carbonfet_thumb_ml_place (rotate (shape , [0 , 0 , thumb_plate_ml_rotation ]))
1537
1553
])
1538
1554
else :
1539
- return union ([
1555
+ # return union([
1556
+ return add ([
1540
1557
carbonfet_thumb_bl_place (shape ),
1541
1558
carbonfet_thumb_ml_place (shape )
1542
1559
])
@@ -1550,14 +1567,17 @@ def carbonfet_thumbcaps():
1550
1567
1551
1568
def carbonfet_thumb (side = "right" ):
1552
1569
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 ))])
1555
1574
1556
1575
return shape
1557
1576
1558
1577
def carbonfet_thumb_pcb_plate_cutouts (side = "right" ):
1559
1578
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 ())])
1561
1581
return shape
1562
1582
1563
1583
def carbonfet_thumb_post_tr ():
@@ -1695,7 +1715,8 @@ def carbonfet_thumb_connectors():
1695
1715
)
1696
1716
)
1697
1717
1698
- return union (hulls )
1718
+ # return union(hulls)
1719
+ return add (hulls )
1699
1720
1700
1721
1701
1722
############################
@@ -1772,7 +1793,8 @@ def tbjs_thumb_bl_place(shape):
1772
1793
1773
1794
1774
1795
def tbjs_thumb_1x_layout (shape ):
1775
- return union ([
1796
+ # return union([
1797
+ return add ([
1776
1798
tbjs_thumb_tl_place (rotate (shape , [0 , 0 , thumb_plate_tr_rotation ])),
1777
1799
tbjs_thumb_mr_place (rotate (shape , [0 , 0 , thumb_plate_mr_rotation ])),
1778
1800
tbjs_thumb_bl_place (rotate (shape , [0 , 0 , thumb_plate_bl_rotation ])),
@@ -1792,7 +1814,8 @@ def tbjs_thumb_fx_layout(shape):
1792
1814
]
1793
1815
1794
1816
def trackball_layout (shape ):
1795
- return union ([
1817
+ # return union([
1818
+ return add ([
1796
1819
tbjs_place (shape ),
1797
1820
])
1798
1821
@@ -1808,7 +1831,8 @@ def tbjs_thumb(side="right"):
1808
1831
# shape = tbjs_thumb_fx_layout(rotate(single_plate(side=side), [0.0, 0.0, -90]))
1809
1832
shape = tbjs_thumb_1x_layout (single_plate (side = side ))
1810
1833
# 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 ))])
1812
1836
1813
1837
# shape = union([shape, trackball_layout(trackball_socket())])
1814
1838
# shape = tbjs_thumb_1x_layout(single_plate(side=side))
@@ -1957,7 +1981,8 @@ def tbjs_thumb_connectors():
1957
1981
)
1958
1982
)
1959
1983
1960
- return union (hulls )
1984
+ # return union(hulls)
1985
+ return add (hulls )
1961
1986
1962
1987
1963
1988
@@ -1994,7 +2019,8 @@ def tbcj_thumb_bl_place(shape):
1994
2019
return shape
1995
2020
1996
2021
def tbcj_thumb_layout (shape ):
1997
- return union ([
2022
+ # return union([
2023
+ return add ([
1998
2024
tbcj_thumb_tr_place (rotate (shape , [0 , 0 , thumb_plate_tr_rotation ])),
1999
2025
tbcj_thumb_tl_place (rotate (shape , [0 , 0 , thumb_plate_tl_rotation ])),
2000
2026
tbcj_thumb_ml_place (rotate (shape , [0 , 0 , thumb_plate_ml_rotation ])),
@@ -2068,7 +2094,8 @@ def tbcj_place(shape):
2068
2094
def tbcj_thumb (side = "right" ):
2069
2095
t = tbcj_thumb_layout (single_plate (side = side ))
2070
2096
tb = tbcj_place (tbcj_holder ())
2071
- return union ([t , tb ])
2097
+ # return union([t, tb])
2098
+ return add ([t , tb ])
2072
2099
2073
2100
def tbcj_thumb_pcb_plate_cutouts (side = "right" ):
2074
2101
t = tbcj_thumb_layout (plate_pcb_cutout (side = side ))
@@ -2214,7 +2241,8 @@ def tbcj_thumb_connectors():
2214
2241
)
2215
2242
)
2216
2243
2217
- return union (hulls )
2244
+ # return union(hulls)
2245
+ return add (hulls )
2218
2246
2219
2247
2220
2248
@@ -2320,7 +2348,8 @@ def wall_brace(place1, dx1, dy1, post1, place2, dx2, dy2, post2, back=False, ske
2320
2348
2321
2349
if len (hulls )> 0 :
2322
2350
shape2 = bottom_hull (hulls )
2323
- shape1 = union ([shape1 , shape2 ])
2351
+ # shape1 = union([shape1, shape2])
2352
+ shape1 = add ([shape1 , shape2 ])
2324
2353
2325
2354
return shape1
2326
2355
@@ -2380,7 +2409,7 @@ def right_wall(skeleton=False):
2380
2409
2381
2410
shape = None
2382
2411
2383
- shape = union ([shape ,key_wall_brace (
2412
+ shape = union ([shape , key_wall_brace (
2384
2413
lastcol , y , 1 , 0 , web_post_tr (), lastcol , y , 1 , 0 , web_post_br (),
2385
2414
skeleton = skeleton ,
2386
2415
)])
@@ -3896,7 +3925,8 @@ def wire_posts():
3896
3925
3897
3926
def model_side (side = "right" ):
3898
3927
print ('model_right()' )
3899
- shape = union ([key_holes (side = side )])
3928
+ shape = add ([key_holes (side = side )])
3929
+ # shape = union([key_holes(side=side)])
3900
3930
if debug_exports :
3901
3931
export_file (shape = shape , fname = path .join (r".." , "things" , r"debug_key_plates" ))
3902
3932
connector_shape = connectors ()
0 commit comments