@@ -94,7 +94,10 @@ def debugprint(info):
9494centerrow = nrows - centerrow_offset
9595
9696lastrow = nrows - 1
97- cornerrow = lastrow - 1
97+ if reduced_outer_keys :
98+ cornerrow = lastrow - 1
99+ else :
100+ cornerrow = lastrow
98101lastcol = 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-
13761359def 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 ),
0 commit comments