diff options
author | Joshua Shreve <j.a.shreve@gmail.com> | 2021-11-15 15:41:36 -0500 |
---|---|---|
committer | Joshua Shreve <j.a.shreve@gmail.com> | 2021-11-15 15:41:36 -0500 |
commit | e0f6c67602b8387b3122cb37aafaa393a4647568 (patch) | |
tree | 9de5e0c667afc70fe8cf6d8a7d669eaf204f03c1 | |
parent | 01a3ff885863369e55664553b681ccb4619f498b (diff) |
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.
-rw-r--r-- | src/dactyl_manuform.py | 31 | ||||
-rw-r--r-- | src/generate_configuration_test.py | 6 | ||||
-rw-r--r-- | src/helpers_solid.py | 2 |
3 files changed, 27 insertions, 12 deletions
diff --git a/src/dactyl_manuform.py b/src/dactyl_manuform.py index ca9a3c2..e1d8aba 100644 --- a/src/dactyl_manuform.py +++ b/src/dactyl_manuform.py @@ -76,7 +76,7 @@ else: #################################################### -debug_exports = False +debug_exports = False debug_trace = False def debugprint(info): @@ -2486,15 +2486,19 @@ def front_wall(skeleton=False): 3, lastrow, 0, -1, web_post_bl(), 3, lastrow, 0.5, -1, web_post_br() )]) shape = union([shape,key_wall_brace( - 3, lastrow, 0.5, -1, web_post_br(), 4, cornerrow, 1, -1, web_post_bl() + 3, lastrow, 0.5, -1, web_post_br(), 4, cornerrow, .5, -1, web_post_bl() )]) - for i in range(ncols - 4): - x = i + 4 + shape = union([shape,key_wall_brace( + 4, cornerrow, .5, -1, web_post_bl(), 4, cornerrow, 0, -1, web_post_br() + )]) + + for i in range(ncols - 5): + x = i + 5 + shape = union([shape,key_wall_brace( x, cornerrow, 0, -1, web_post_bl(), x, cornerrow, 0, -1, web_post_br() )]) - for i in range(ncols - 5): - x = i + 5 + shape = union([shape, key_wall_brace( x, cornerrow, 0, -1, web_post_bl(), x - 1, cornerrow, 0, -1, web_post_br() )]) @@ -4013,12 +4017,21 @@ def model_side(side="right"): has_trackball = False if ('TRACKBALL' in thumb_style) and (side == ball_side or ball_side == 'both'): + print("Has Trackball") tbprecut, tb, tbcutout, sensor, ball = generate_trackball_in_cluster() has_trackball = True thumb_section = difference(thumb_section, [tbprecut]) + if debug_exports: + export_file(shape=thumb_section, fname=path.join(r"..", "things", r"debug_thumb_test_1_shape".format(side))) thumb_section = union([thumb_section, tb]) + if debug_exports: + export_file(shape=thumb_section, fname=path.join(r"..", "things", r"debug_thumb_test_2_shape".format(side))) thumb_section = difference(thumb_section, [tbcutout]) + if debug_exports: + export_file(shape=thumb_section, fname=path.join(r"..", "things", r"debug_thumb_test_3_shape".format(side))) thumb_section = union([thumb_section, sensor]) + if debug_exports: + export_file(shape=thumb_section, fname=path.join(r"..", "things", r"debug_thumb_test_4_shape".format(side))) if plate_pcb_clear: thumb_section = difference(thumb_section, [thumb_pcb_plate_cutouts(side=side)]) @@ -4027,8 +4040,8 @@ def model_side(side="right"): block = translate(block, (0, 0, -20)) main_shape = difference(main_shape, [block]) thumb_section = difference(thumb_section, [block]) - - + if debug_exports: + export_file(shape=thumb_section, fname=path.join(r"..", "things", r"debug_thumb_test_5_shape".format(side))) if separable_thumb: thumb_section = difference(thumb_section, [main_shape]) @@ -4038,6 +4051,8 @@ def model_side(side="right"): thumb_section = add([thumb_section, ball]) else: main_shape = union([main_shape, thumb_section]) + if debug_exports: + export_file(shape=main_shape, fname=path.join(r"..", "things", r"debug_thumb_test_6_shape".format(side))) if show_caps: main_shape = add([main_shape, thumbcaps(side=side)]) if has_trackball: diff --git a/src/generate_configuration_test.py b/src/generate_configuration_test.py index fe61709..26ad096 100644 --- a/src/generate_configuration_test.py +++ b/src/generate_configuration_test.py @@ -24,8 +24,8 @@ shape_config = { 'show_caps': False, 'show_pcbs': False, #only runs if caps are shown, easist place to initially inject geometry - 'nrows': 3, #5, # key rows - 'ncols': 5, #6, # key columns + 'nrows': 5, #5, # key rows + 'ncols': 6, #6, # key columns 'alpha': pi / 12.0, # curvature of the columns 'beta': pi / 36.0, # curvature of the rows @@ -61,7 +61,7 @@ shape_config = { ############################## # 'DEFAULT' 6-key, 'MINI' 5-key, 'CARBONFET' 6-key, 'MINIDOX' 3-key, 'TRACKBALL_ORBYL', 'TRACKBALL_CJ' - 'thumb_style': 'MINIDOX', + 'thumb_style': 'CARBONFET', 'default_1U_cluster': True, # only used with default, makes top right thumb cluster key 1U # Thumb key size. May need slight oversizing, check w/ caps. Additional spacing will be automatically added for larger keys. 'minidox_Usize': 1.6, diff --git a/src/helpers_solid.py b/src/helpers_solid.py index 2557e01..fcd9e73 100644 --- a/src/helpers_solid.py +++ b/src/helpers_solid.py @@ -144,7 +144,7 @@ def extrude_poly(outer_poly, inner_polys=None, height=1): def import_file(fname, convexity=2): print("IMPORTING FROM {}".format(fname)) - return sl.import_stl(fname + ".stl", convexity=convexity) + return sl.import_stl(fname.replace("\\", "/") + ".stl", convexity=convexity) def export_file(shape, fname): |