summaryrefslogtreecommitdiff
path: root/src/dactyl_manuform.py
diff options
context:
space:
mode:
authorEdward <ed@itsed.com>2021-08-19 18:41:33 -0400
committerEdward <ed@itsed.com>2021-08-19 18:41:33 -0400
commit5281fb752d0d9728191775faef527d0fffd3d7b8 (patch)
tree7f1e271d5b4512667e62da63b4e4e62f522bd165 /src/dactyl_manuform.py
parentd8c4a98391895b59fe9e4bf1a323620903babaa4 (diff)
moved parts to their own directory
also fixed bug that would not correctly inlcude parts for configs with a `save_dir` set to a subdirectory of the things directory
Diffstat (limited to 'src/dactyl_manuform.py')
-rw-r--r--src/dactyl_manuform.py16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/dactyl_manuform.py b/src/dactyl_manuform.py
index c913ced..22cf2f5 100644
--- a/src/dactyl_manuform.py
+++ b/src/dactyl_manuform.py
@@ -39,9 +39,11 @@ except Exception:
print('Setting Current Engine = {}'.format(ENGINE))
if save_dir in ['', None, '.']:
- save_path = os.path.join(r"..", "things")
+ save_path = path.join(r"..", "things")
+ parts_path = path.join(r"..", "src", "parts")
else:
- save_path = os.path.join(r"..", "things", save_dir)
+ save_path = path.join(r"..", "things", save_dir)
+ parts_path = path.join(r"..", r"..", "src", "parts")
###############################################
# END EXTREMELY UGLY BOOTSTRAP
@@ -96,7 +98,7 @@ else:
if 'HS_' in plate_style:
symmetry = "asymmetric"
- plate_file = path.join("..", "src", r"hot_swap_plate")
+ plate_file = path.join(parts_path, r"hot_swap_plate")
plate_offset = 0.0
if (trackball_in_wall or ('TRACKBALL' in thumb_style)) and not ball_side == 'both':
@@ -277,10 +279,10 @@ def trackball_socket(segments=100, side="right"):
# cyl = translate(cyl, (0, 0, -8))
# shape = union([shape, cyl])
- tb_file = path.join("..", "src", r"trackball_socket_body_34mm")
- tbcut_file = path.join("..", "src", r"trackball_socket_cutter_34mm")
- sens_file = path.join("..", "src", r"trackball_sensor_mount")
- senscut_file = path.join("..", "src", r"trackball_sensor_cutter")
+ tb_file = path.join(parts_path, r"trackball_socket_body_34mm")
+ tbcut_file = path.join(parts_path, r"trackball_socket_cutter_34mm")
+ sens_file = path.join(parts_path, r"trackball_sensor_mount")
+ senscut_file = path.join(parts_path, r"trackball_sensor_cutter")
# shape = import_file(tb_file)