Skip to content

Commit e0f6c67

Browse files
committed
Minor wall correction. Minor directory fix with openscad imports.
Need to prioritize trackball geometry generation. OS and workflow path differences are causing import issues with OpenSCAD as it imports from the scad file ion OpenSCAD not during generation.
1 parent 01a3ff8 commit e0f6c67

File tree

3 files changed

+27
-12
lines changed

3 files changed

+27
-12
lines changed

src/dactyl_manuform.py

Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ def rad2deg(rad: float) -> float:
7676
####################################################
7777

7878

79-
debug_exports = False
79+
debug_exports = False
8080
debug_trace = False
8181

8282
def debugprint(info):
@@ -2486,15 +2486,19 @@ def front_wall(skeleton=False):
24862486
3, lastrow, 0, -1, web_post_bl(), 3, lastrow, 0.5, -1, web_post_br()
24872487
)])
24882488
shape = union([shape,key_wall_brace(
2489-
3, lastrow, 0.5, -1, web_post_br(), 4, cornerrow, 1, -1, web_post_bl()
2489+
3, lastrow, 0.5, -1, web_post_br(), 4, cornerrow, .5, -1, web_post_bl()
24902490
)])
2491-
for i in range(ncols - 4):
2492-
x = i + 4
2491+
shape = union([shape,key_wall_brace(
2492+
4, cornerrow, .5, -1, web_post_bl(), 4, cornerrow, 0, -1, web_post_br()
2493+
)])
2494+
2495+
for i in range(ncols - 5):
2496+
x = i + 5
2497+
24932498
shape = union([shape,key_wall_brace(
24942499
x, cornerrow, 0, -1, web_post_bl(), x, cornerrow, 0, -1, web_post_br()
24952500
)])
2496-
for i in range(ncols - 5):
2497-
x = i + 5
2501+
24982502
shape = union([shape, key_wall_brace(
24992503
x, cornerrow, 0, -1, web_post_bl(), x - 1, cornerrow, 0, -1, web_post_br()
25002504
)])
@@ -4013,12 +4017,21 @@ def model_side(side="right"):
40134017

40144018
has_trackball = False
40154019
if ('TRACKBALL' in thumb_style) and (side == ball_side or ball_side == 'both'):
4020+
print("Has Trackball")
40164021
tbprecut, tb, tbcutout, sensor, ball = generate_trackball_in_cluster()
40174022
has_trackball = True
40184023
thumb_section = difference(thumb_section, [tbprecut])
4024+
if debug_exports:
4025+
export_file(shape=thumb_section, fname=path.join(r"..", "things", r"debug_thumb_test_1_shape".format(side)))
40194026
thumb_section = union([thumb_section, tb])
4027+
if debug_exports:
4028+
export_file(shape=thumb_section, fname=path.join(r"..", "things", r"debug_thumb_test_2_shape".format(side)))
40204029
thumb_section = difference(thumb_section, [tbcutout])
4030+
if debug_exports:
4031+
export_file(shape=thumb_section, fname=path.join(r"..", "things", r"debug_thumb_test_3_shape".format(side)))
40214032
thumb_section = union([thumb_section, sensor])
4033+
if debug_exports:
4034+
export_file(shape=thumb_section, fname=path.join(r"..", "things", r"debug_thumb_test_4_shape".format(side)))
40224035

40234036
if plate_pcb_clear:
40244037
thumb_section = difference(thumb_section, [thumb_pcb_plate_cutouts(side=side)])
@@ -4027,8 +4040,8 @@ def model_side(side="right"):
40274040
block = translate(block, (0, 0, -20))
40284041
main_shape = difference(main_shape, [block])
40294042
thumb_section = difference(thumb_section, [block])
4030-
4031-
4043+
if debug_exports:
4044+
export_file(shape=thumb_section, fname=path.join(r"..", "things", r"debug_thumb_test_5_shape".format(side)))
40324045

40334046
if separable_thumb:
40344047
thumb_section = difference(thumb_section, [main_shape])
@@ -4038,6 +4051,8 @@ def model_side(side="right"):
40384051
thumb_section = add([thumb_section, ball])
40394052
else:
40404053
main_shape = union([main_shape, thumb_section])
4054+
if debug_exports:
4055+
export_file(shape=main_shape, fname=path.join(r"..", "things", r"debug_thumb_test_6_shape".format(side)))
40414056
if show_caps:
40424057
main_shape = add([main_shape, thumbcaps(side=side)])
40434058
if has_trackball:

src/generate_configuration_test.py

Lines changed: 3 additions & 3 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': 3, #5, # key rows
28-
'ncols': 5, #6, # key columns
27+
'nrows': 5, #5, # key rows
28+
'ncols': 6, #6, # key columns
2929

3030
'alpha': pi / 12.0, # curvature of the columns
3131
'beta': pi / 36.0, # curvature of the rows
@@ -61,7 +61,7 @@
6161
##############################
6262

6363
# 'DEFAULT' 6-key, 'MINI' 5-key, 'CARBONFET' 6-key, 'MINIDOX' 3-key, 'TRACKBALL_ORBYL', 'TRACKBALL_CJ'
64-
'thumb_style': 'MINIDOX',
64+
'thumb_style': 'CARBONFET',
6565
'default_1U_cluster': True, # only used with default, makes top right thumb cluster key 1U
6666
# Thumb key size. May need slight oversizing, check w/ caps. Additional spacing will be automatically added for larger keys.
6767
'minidox_Usize': 1.6,

src/helpers_solid.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ def extrude_poly(outer_poly, inner_polys=None, height=1):
144144

145145
def import_file(fname, convexity=2):
146146
print("IMPORTING FROM {}".format(fname))
147-
return sl.import_stl(fname + ".stl", convexity=convexity)
147+
return sl.import_stl(fname.replace("\\", "/") + ".stl", convexity=convexity)
148148

149149

150150
def export_file(shape, fname):

0 commit comments

Comments
 (0)