From 507a4b22b238689bda96380df7bf38e1f0e7ee3a Mon Sep 17 00:00:00 2001 From: Joshua Shreve Date: Thu, 5 Aug 2021 07:50:27 -0400 Subject: Interim commit with partially functioning trackball. trackball in wall is mostly working (still WIP), trackball cluster has layout but no webs or walls. --- src/generate_configuration.py | 35 ++++++++++++++++++++++++++++++++--- 1 file changed, 32 insertions(+), 3 deletions(-) (limited to 'src/generate_configuration.py') diff --git a/src/generate_configuration.py b/src/generate_configuration.py index e2d71b0..e9f823a 100644 --- a/src/generate_configuration.py +++ b/src/generate_configuration.py @@ -18,7 +18,7 @@ shape_config = { 'save_dir': '.', 'config_name': "DM", - 'show_caps': False, + 'show_caps': True, 'nrows': 5, #5, # key rows 'ncols': 6, #6, # key columns @@ -43,8 +43,8 @@ shape_config = { ############################## # THUMB PARAMETERS ############################## - 'thumb_style': 'MINIDOX', # 'DEFAULT' 6-key, 'MINI' 5-key, 'CARBONFET' 6-key, 'MINIDOX' 3-key - 'default_1U_cluster': True, # only used with default, makes top right thumb cluster key 1U + 'thumb_style': 'MINIDOX', # 'DEFAULT' 6-key, 'MINI' 5-key, 'CARBONFET' 6-key, 'MINIDOX' 3-key, 'TRACKBALL' + 'default_1U_cluster': False, # only used with default, makes top right thumb cluster key 1U 'minidox_Usize': 1.6 , # Thumb key size. May need slight oversizing, check w/ caps. Additional spacing will be automatically added for larger keys. @@ -56,6 +56,32 @@ shape_config = { 'thumb_plate_br_rotation': 0.0, # Bottom right plate rotation tweaks as thumb cluster is crowded for hot swap, etc. 'thumb_plate_bl_rotation': 0.0, # Bottom right plate rotation tweaks as thumb cluster is crowded for hot swap, etc. + ################################### + ## Trackball ## + ################################### + 'trackball_in_wall': True, # Separate trackball option, placing it in the OLED area + 'tbiw_hole_diameter': 40, + 'tbiw_hole_height': 40, + 'tbiw_ball_center_row': 0.2, # up from cornerrow instead of down from top + 'tbiw_translational_offset': (-2.0, 0.0, 3), + 'tbiw_rotation_offset': (0.0, 0.0, 0.0), + 'tbiw_left_wall_x_offset_override': 46.0, + 'tbiw_left_wall_z_offset_override': 0.0, + 'tbiw_left_wall_lower_y_offset': 0.0, + 'tbiw_left_wall_lower_z_offset': 0.0, + + 'tbiw_oled_center_row': .75, # not none, offsets are from this position + 'tbiw_oled_translation_offset': (-2.5, 0, 0), # Z offset tweaks are expected depending on curvature and OLED mount choice. + 'tbiw_oled_rotation_offset': (0, 0, 0), + + 'trackball_Usize': 1.5, # size for inner key near trackball + 'trackball_rotation': 0.0, # used to rotate the sensor direction around z. + 'ball_side': 'right', + 'ball_diameter': 34.0, + 'ball_wall_thickness': 3.0, # should not be changed unless the import models are changed. + 'ball_z_offset': -3.75, + + ############################## # EXPERIMENTAL PARAMETERS ############################## @@ -237,6 +263,9 @@ shape_config = { 'wire_post_overhang': 3.5, 'wire_post_diameter': 2.6, + + + ################################### ## Controller Mount / Connectors ## ################################### -- cgit v1.2.3 From b09b92f639477ca8264118fcc728c6e8094b1cd8 Mon Sep 17 00:00:00 2001 From: Joshua Shreve Date: Thu, 5 Aug 2021 22:13:28 -0400 Subject: Adding CAD geometry. Debugging minor issues. --- src/generate_configuration.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/generate_configuration.py') diff --git a/src/generate_configuration.py b/src/generate_configuration.py index e9f823a..c6afee2 100644 --- a/src/generate_configuration.py +++ b/src/generate_configuration.py @@ -7,8 +7,8 @@ r2d = 180 / pi shape_config = { - 'ENGINE': 'solid', # 'solid' = solid python / OpenSCAD, 'cadquery' = cadquery / OpenCascade - # 'ENGINE': 'cadquery', # 'solid' = solid python / OpenSCAD, 'cadquery' = cadquery / OpenCascade + # 'ENGINE': 'solid', # 'solid' = solid python / OpenSCAD, 'cadquery' = cadquery / OpenCascade + 'ENGINE': 'cadquery', # 'solid' = solid python / OpenSCAD, 'cadquery' = cadquery / OpenCascade ###################### @@ -18,7 +18,7 @@ shape_config = { 'save_dir': '.', 'config_name': "DM", - 'show_caps': True, + 'show_caps': False, 'nrows': 5, #5, # key rows 'ncols': 6, #6, # key columns @@ -60,7 +60,7 @@ shape_config = { ## Trackball ## ################################### 'trackball_in_wall': True, # Separate trackball option, placing it in the OLED area - 'tbiw_hole_diameter': 40, + 'tbiw_hole_diameter': 36, 'tbiw_hole_height': 40, 'tbiw_ball_center_row': 0.2, # up from cornerrow instead of down from top 'tbiw_translational_offset': (-2.0, 0.0, 3), @@ -79,7 +79,7 @@ shape_config = { 'ball_side': 'right', 'ball_diameter': 34.0, 'ball_wall_thickness': 3.0, # should not be changed unless the import models are changed. - 'ball_z_offset': -3.75, + 'ball_z_offset': -3.25, ############################## -- cgit v1.2.3 From 49f0253b9f22790ce5d50ed83f901328e0acea89 Mon Sep 17 00:00:00 2001 From: Joshua Shreve Date: Fri, 6 Aug 2021 17:16:46 -0400 Subject: Minor mods, CAD trackball socket in models. --- src/generate_configuration.py | 1 + 1 file changed, 1 insertion(+) (limited to 'src/generate_configuration.py') diff --git a/src/generate_configuration.py b/src/generate_configuration.py index c6afee2..08c67c0 100644 --- a/src/generate_configuration.py +++ b/src/generate_configuration.py @@ -76,6 +76,7 @@ shape_config = { 'trackball_Usize': 1.5, # size for inner key near trackball 'trackball_rotation': 0.0, # used to rotate the sensor direction around z. + # 'trackball_sensor_rotation': 0.0, # used to rotate the sensor direction around z. 'ball_side': 'right', 'ball_diameter': 34.0, 'ball_wall_thickness': 3.0, # should not be changed unless the import models are changed. -- cgit v1.2.3 From ca9783df5dc645a027743902f7f3b2e0348fd716 Mon Sep 17 00:00:00 2001 From: Joshua Shreve Date: Wed, 11 Aug 2021 20:55:08 -0400 Subject: Interim checkin. Initial version of trackball webs/walls in, still working on component cut/union order. Fixed base plates and walls to be identical in caquery and solid. Fixed if/elif/else structure that misplaced the MINI cluster screw mount. Added intial pass at add on PCB as option to add with caps for interference checks. Moved bottom_hull to helper libraries as they are specific to engine. Fixed bottom_hull functions to correct minor discrepency between the engines. Fixed solid intersect function. --- src/generate_configuration.py | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) (limited to 'src/generate_configuration.py') diff --git a/src/generate_configuration.py b/src/generate_configuration.py index 08c67c0..62adb1d 100644 --- a/src/generate_configuration.py +++ b/src/generate_configuration.py @@ -18,7 +18,8 @@ shape_config = { 'save_dir': '.', 'config_name': "DM", - 'show_caps': False, + 'show_caps': False, + 'show_pcbs': False, #only runs if caps are shown, easist place to initially inject geometry 'nrows': 5, #5, # key rows 'ncols': 6, #6, # key columns @@ -43,7 +44,7 @@ shape_config = { ############################## # THUMB PARAMETERS ############################## - 'thumb_style': 'MINIDOX', # 'DEFAULT' 6-key, 'MINI' 5-key, 'CARBONFET' 6-key, 'MINIDOX' 3-key, 'TRACKBALL' + 'thumb_style': 'MINI', # 'DEFAULT' 6-key, 'MINI' 5-key, 'CARBONFET' 6-key, 'MINIDOX' 3-key, 'TRACKBALL' 'default_1U_cluster': False, # only used with default, makes top right thumb cluster key 1U 'minidox_Usize': 1.6 , # Thumb key size. May need slight oversizing, check w/ caps. Additional spacing will be automatically added for larger keys. @@ -59,19 +60,19 @@ shape_config = { ################################### ## Trackball ## ################################### - 'trackball_in_wall': True, # Separate trackball option, placing it in the OLED area + 'trackball_in_wall': False, # Separate trackball option, placing it in the OLED area 'tbiw_hole_diameter': 36, 'tbiw_hole_height': 40, 'tbiw_ball_center_row': 0.2, # up from cornerrow instead of down from top - 'tbiw_translational_offset': (-2.0, 0.0, 3), + 'tbiw_translational_offset': (0.0, 0.0, 3), 'tbiw_rotation_offset': (0.0, 0.0, 0.0), - 'tbiw_left_wall_x_offset_override': 46.0, + 'tbiw_left_wall_x_offset_override': 50.0, 'tbiw_left_wall_z_offset_override': 0.0, 'tbiw_left_wall_lower_y_offset': 0.0, 'tbiw_left_wall_lower_z_offset': 0.0, 'tbiw_oled_center_row': .75, # not none, offsets are from this position - 'tbiw_oled_translation_offset': (-2.5, 0, 0), # Z offset tweaks are expected depending on curvature and OLED mount choice. + 'tbiw_oled_translation_offset': (-3.5, 0, 1.5), # Z offset tweaks are expected depending on curvature and OLED mount choice. 'tbiw_oled_rotation_offset': (0, 0, 0), 'trackball_Usize': 1.5, # size for inner key near trackball @@ -80,7 +81,8 @@ shape_config = { 'ball_side': 'right', 'ball_diameter': 34.0, 'ball_wall_thickness': 3.0, # should not be changed unless the import models are changed. - 'ball_z_offset': -3.25, + 'ball_gap':1.0, + 'ball_z_offset': -3.0, ############################## @@ -301,15 +303,25 @@ shape_config = { # Offset is from the top inner corner of the top inner key. ################################### - ## EXPERIMENTAL + ## HOLES ON PLATE FOR PCB MOUNT ################################### - 'plate_holes': False, + 'plate_holes': True, 'plate_holes_xy_offset': (0.0, 0.0), 'plate_holes_width': 14.3, 'plate_holes_height': 14.3, 'plate_holes_diameter': 1.7, 'plate_holes_depth': 20.0, + ################################### + ## SHOW PCB FOR FIT CHECK + ################################### + 'pcb_width': 18.0, + 'pcb_height': 18.0, + 'pcb_thickness': 1.5, + 'pcb_hole_diameter': 2, + 'pcb_hole_pattern_width': 14.3, + 'pcb_hole_pattern_height': 14.3, + ################################### ## COLUMN OFFSETS #################################### -- cgit v1.2.3 From adac76f4e7d119dd12fa9612387ac8ba609124fb Mon Sep 17 00:00:00 2001 From: Joshua Shreve Date: Wed, 11 Aug 2021 21:11:22 -0400 Subject: Added undercut for tray. Discovered why people had an issue with the tray. The cadquery had interference and solid did not. After fixing the unintentional difference, I found both had intereference. Added an undercut to locally thin the wall for tray engagement. --- src/generate_configuration.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/generate_configuration.py') diff --git a/src/generate_configuration.py b/src/generate_configuration.py index 62adb1d..ba1fb3e 100644 --- a/src/generate_configuration.py +++ b/src/generate_configuration.py @@ -7,8 +7,8 @@ r2d = 180 / pi shape_config = { - # 'ENGINE': 'solid', # 'solid' = solid python / OpenSCAD, 'cadquery' = cadquery / OpenCascade - 'ENGINE': 'cadquery', # 'solid' = solid python / OpenSCAD, 'cadquery' = cadquery / OpenCascade + 'ENGINE': 'solid', # 'solid' = solid python / OpenSCAD, 'cadquery' = cadquery / OpenCascade + # 'ENGINE': 'cadquery', # 'solid' = solid python / OpenSCAD, 'cadquery' = cadquery / OpenCascade ###################### @@ -284,7 +284,7 @@ shape_config = { 'external_holder_height': 12.5, 'external_holder_width': 28.75, 'external_holder_xoffset': -5.0, - + 'external_holder_yoffset': -4.5, #Tweak this value to get the right undercut for the tray engagement. # Offset is from the top inner corner of the top inner key. -- cgit v1.2.3 From d24e5b2847300e24149156146c7212ca9aebee2d Mon Sep 17 00:00:00 2001 From: Joshua Shreve Date: Fri, 13 Aug 2021 17:11:44 -0400 Subject: very interim commit to check tbiw issues. --- src/generate_configuration.py | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'src/generate_configuration.py') diff --git a/src/generate_configuration.py b/src/generate_configuration.py index ba1fb3e..f454d24 100644 --- a/src/generate_configuration.py +++ b/src/generate_configuration.py @@ -7,8 +7,8 @@ r2d = 180 / pi shape_config = { - 'ENGINE': 'solid', # 'solid' = solid python / OpenSCAD, 'cadquery' = cadquery / OpenCascade - # 'ENGINE': 'cadquery', # 'solid' = solid python / OpenSCAD, 'cadquery' = cadquery / OpenCascade + # 'ENGINE': 'solid', # 'solid' = solid python / OpenSCAD, 'cadquery' = cadquery / OpenCascade + 'ENGINE': 'cadquery', # 'solid' = solid python / OpenSCAD, 'cadquery' = cadquery / OpenCascade ###################### @@ -58,9 +58,9 @@ shape_config = { 'thumb_plate_bl_rotation': 0.0, # Bottom right plate rotation tweaks as thumb cluster is crowded for hot swap, etc. ################################### - ## Trackball ## + ## Trackball in Wall ## ################################### - 'trackball_in_wall': False, # Separate trackball option, placing it in the OLED area + 'trackball_in_wall': True, # Separate trackball option, placing it in the OLED area 'tbiw_hole_diameter': 36, 'tbiw_hole_height': 40, 'tbiw_ball_center_row': 0.2, # up from cornerrow instead of down from top @@ -75,6 +75,15 @@ shape_config = { 'tbiw_oled_translation_offset': (-3.5, 0, 1.5), # Z offset tweaks are expected depending on curvature and OLED mount choice. 'tbiw_oled_rotation_offset': (0, 0, 0), + ################################### + ## Trackball Thumb Cluster ## + ################################### + + + + ################################### + ## Trackball General ## + ################################### 'trackball_Usize': 1.5, # size for inner key near trackball 'trackball_rotation': 0.0, # used to rotate the sensor direction around z. # 'trackball_sensor_rotation': 0.0, # used to rotate the sensor direction around z. -- cgit v1.2.3 From 206391e59865281b8d8e7db499c30dd36d27b7c7 Mon Sep 17 00:00:00 2001 From: Joshua Shreve Date: Fri, 13 Aug 2021 21:12:36 -0400 Subject: Fixed non-ball side rendering for trackball thumb. Still WIP. --- src/generate_configuration.py | 31 ++++++++++++++++++++++--------- 1 file changed, 22 insertions(+), 9 deletions(-) (limited to 'src/generate_configuration.py') diff --git a/src/generate_configuration.py b/src/generate_configuration.py index f454d24..d6f0180 100644 --- a/src/generate_configuration.py +++ b/src/generate_configuration.py @@ -7,8 +7,8 @@ r2d = 180 / pi shape_config = { - # 'ENGINE': 'solid', # 'solid' = solid python / OpenSCAD, 'cadquery' = cadquery / OpenCascade - 'ENGINE': 'cadquery', # 'solid' = solid python / OpenSCAD, 'cadquery' = cadquery / OpenCascade + 'ENGINE': 'solid', # 'solid' = solid python / OpenSCAD, 'cadquery' = cadquery / OpenCascade + # 'ENGINE': 'cadquery', # 'solid' = solid python / OpenSCAD, 'cadquery' = cadquery / OpenCascade ###################### @@ -44,7 +44,7 @@ shape_config = { ############################## # THUMB PARAMETERS ############################## - 'thumb_style': 'MINI', # 'DEFAULT' 6-key, 'MINI' 5-key, 'CARBONFET' 6-key, 'MINIDOX' 3-key, 'TRACKBALL' + 'thumb_style': 'TRACKBALL', # 'DEFAULT' 6-key, 'MINI' 5-key, 'CARBONFET' 6-key, 'MINIDOX' 3-key, 'TRACKBALL' 'default_1U_cluster': False, # only used with default, makes top right thumb cluster key 1U 'minidox_Usize': 1.6 , # Thumb key size. May need slight oversizing, check w/ caps. Additional spacing will be automatically added for larger keys. @@ -60,7 +60,7 @@ shape_config = { ################################### ## Trackball in Wall ## ################################### - 'trackball_in_wall': True, # Separate trackball option, placing it in the OLED area + 'trackball_in_wall': False, # Separate trackball option, placing it in the OLED area 'tbiw_hole_diameter': 36, 'tbiw_hole_height': 40, 'tbiw_ball_center_row': 0.2, # up from cornerrow instead of down from top @@ -76,11 +76,24 @@ shape_config = { 'tbiw_oled_rotation_offset': (0, 0, 0), ################################### - ## Trackball Thumb Cluster ## + ## Trackball JS Thumb Cluster ## ################################### - - - + 'other_thumb': 'DEFAULT', # cluster used for second thumb except if ball_side == 'both' + 'tbjs_key_diameter': 64, + # Offsets are per key and are applied before rotating into place around the ball + # X and Y act like Tangential and Radial around the ball + 'tbjs_translational_offsets': [ + (0.0, 0.0, -3.0), + (0.0, 0.0, -3.0), + (0.0, 0.0, -3.0), + (0.0, 0.0, -3.0), + ], + 'tbjs_rotation_offsets': [ + (0.0, 0.0, 0.0), + (0.0, 0.0, 0.0), + (0.0, 0.0, 0.0), + (0.0, 0.0, 0.0), + ], ################################### ## Trackball General ## ################################### @@ -89,7 +102,7 @@ shape_config = { # 'trackball_sensor_rotation': 0.0, # used to rotate the sensor direction around z. 'ball_side': 'right', 'ball_diameter': 34.0, - 'ball_wall_thickness': 3.0, # should not be changed unless the import models are changed. + 'ball_wall_thickness': 3.0+2.0, # should not be changed unless the import models are changed. 'ball_gap':1.0, 'ball_z_offset': -3.0, -- cgit v1.2.3 From 9dff5864b671133e350a14dd80246baed8f3fa59 Mon Sep 17 00:00:00 2001 From: Joshua Shreve Date: Sun, 15 Aug 2021 20:21:13 -0400 Subject: Trackball updates. Still need to refresh geometry. Optical distance is too long. --- src/generate_configuration.py | 55 ++++++++++++++++++++++++------------------- 1 file changed, 31 insertions(+), 24 deletions(-) (limited to 'src/generate_configuration.py') diff --git a/src/generate_configuration.py b/src/generate_configuration.py index d6f0180..f64ca84 100644 --- a/src/generate_configuration.py +++ b/src/generate_configuration.py @@ -7,8 +7,8 @@ r2d = 180 / pi shape_config = { - 'ENGINE': 'solid', # 'solid' = solid python / OpenSCAD, 'cadquery' = cadquery / OpenCascade - # 'ENGINE': 'cadquery', # 'solid' = solid python / OpenSCAD, 'cadquery' = cadquery / OpenCascade + 'ENGINE': 'solid', # 'solid' = solid python / OpenSCAD, 'cadquery' = cadquery / OpenCascade + # 'ENGINE': 'cadquery', # 'solid' = solid python / OpenSCAD, 'cadquery' = cadquery / OpenCascade ###################### @@ -44,11 +44,11 @@ shape_config = { ############################## # THUMB PARAMETERS ############################## - 'thumb_style': 'TRACKBALL', # 'DEFAULT' 6-key, 'MINI' 5-key, 'CARBONFET' 6-key, 'MINIDOX' 3-key, 'TRACKBALL' - 'default_1U_cluster': False, # only used with default, makes top right thumb cluster key 1U - 'minidox_Usize': 1.6 - , # Thumb key size. May need slight oversizing, check w/ caps. Additional spacing will be automatically added for larger keys. - + # 'DEFAULT' 6-key, 'MINI' 5-key, 'CARBONFET' 6-key, 'MINIDOX' 3-key, 'TRACKBALL_ORBISSYL', 'TRACKBALL_CJ' + 'thumb_style': 'TRACKBALL_ORBISSYL', + '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, # Thumb plate rotations, anything other than 90 degree increments WILL NOT WORK. 'thumb_plate_tr_rotation': 0.0, # Top right plate rotation tweaks as thumb cluster is crowded for hot swap, etc. 'thumb_plate_tl_rotation': 0.0, # Top left plate rotation tweaks as thumb cluster is crowded for hot swap, etc. @@ -61,8 +61,6 @@ shape_config = { ## Trackball in Wall ## ################################### 'trackball_in_wall': False, # Separate trackball option, placing it in the OLED area - 'tbiw_hole_diameter': 36, - 'tbiw_hole_height': 40, 'tbiw_ball_center_row': 0.2, # up from cornerrow instead of down from top 'tbiw_translational_offset': (0.0, 0.0, 3), 'tbiw_rotation_offset': (0.0, 0.0, 0.0), @@ -79,16 +77,18 @@ shape_config = { ## Trackball JS Thumb Cluster ## ################################### 'other_thumb': 'DEFAULT', # cluster used for second thumb except if ball_side == 'both' - 'tbjs_key_diameter': 64, + 'tbjs_key_diameter': 70, # Offsets are per key and are applied before rotating into place around the ball # X and Y act like Tangential and Radial around the ball - 'tbjs_translational_offsets': [ - (0.0, 0.0, -3.0), - (0.0, 0.0, -3.0), - (0.0, 0.0, -3.0), - (0.0, 0.0, -3.0), + 'tbjs_translation_offset': (0, 0, 10), # applied to the whole assy + 'tbjs_rotation_offset': (0, 0, 0), # applied to the whole assy + 'tbjs_key_translation_offsets': [ + (0.0, 0.0, -3.0-5), + (0.0, 0.0, -3.0-5), + (0.0, 0.0, -3.0-5), + (0.0, 0.0, -3.0-5), ], - 'tbjs_rotation_offsets': [ + 'tbjs_key_rotation_offsets': [ (0.0, 0.0, 0.0), (0.0, 0.0, 0.0), (0.0, 0.0, 0.0), @@ -97,15 +97,22 @@ shape_config = { ################################### ## Trackball General ## ################################### + # EXPERIMENTAL + 'trackball_modular': False, # May add removable trackball in subsequent releases, no current use. + # END EXPERIMENTAL + 'trackball_Usize': 1.5, # size for inner key near trackball - 'trackball_rotation': 0.0, # used to rotate the sensor direction around z. - # 'trackball_sensor_rotation': 0.0, # used to rotate the sensor direction around z. - 'ball_side': 'right', + 'ball_side': 'both', 'ball_diameter': 34.0, - 'ball_wall_thickness': 3.0+2.0, # should not be changed unless the import models are changed. - 'ball_gap':1.0, - 'ball_z_offset': -3.0, - + 'ball_wall_thickness': 3, # should not be changed unless the import models are changed. + 'ball_gap': 1.0, + 'trackball_hole_diameter': 35, + 'trackball_hole_height': 40, + # Removed trackball_rotation, ball_z_offset. and trackball_sensor_rotation and added more flexibility. + 'tb_socket_translation_offset': (0, 0, 2.0), # applied to the socket and sensor, large values will cause web/wall issues. + 'tb_socket_rotation_offset': (0, 0, -90), # applied to the socket and sensor, large values will cause web/wall issues. + 'tb_sensor_translation_offset': (0, 0, 0), #deviation from socket offsets, for fixing generated geometry issues + 'tb_sensor_rotation_offset': (0, 0, 0), #deviation from socket offsets, for changing the sensor roll orientation ############################## # EXPERIMENTAL PARAMETERS @@ -327,7 +334,7 @@ shape_config = { ################################### ## HOLES ON PLATE FOR PCB MOUNT ################################### - 'plate_holes': True, + 'plate_holes': False, 'plate_holes_xy_offset': (0.0, 0.0), 'plate_holes_width': 14.3, 'plate_holes_height': 14.3, -- cgit v1.2.3 From 29a89e462800f26f70f22cbe05211e153339e928 Mon Sep 17 00:00:00 2001 From: Joshua Shreve Date: Tue, 17 Aug 2021 20:39:54 -0400 Subject: File cleanup. --- src/generate_configuration.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/generate_configuration.py') diff --git a/src/generate_configuration.py b/src/generate_configuration.py index f64ca84..ad00131 100644 --- a/src/generate_configuration.py +++ b/src/generate_configuration.py @@ -106,11 +106,11 @@ shape_config = { 'ball_diameter': 34.0, 'ball_wall_thickness': 3, # should not be changed unless the import models are changed. 'ball_gap': 1.0, - 'trackball_hole_diameter': 35, + 'trackball_hole_diameter': 36.5, 'trackball_hole_height': 40, # Removed trackball_rotation, ball_z_offset. and trackball_sensor_rotation and added more flexibility. 'tb_socket_translation_offset': (0, 0, 2.0), # applied to the socket and sensor, large values will cause web/wall issues. - 'tb_socket_rotation_offset': (0, 0, -90), # applied to the socket and sensor, large values will cause web/wall issues. + 'tb_socket_rotation_offset': (0, 0, 0), # applied to the socket and sensor, large values will cause web/wall issues. 'tb_sensor_translation_offset': (0, 0, 0), #deviation from socket offsets, for fixing generated geometry issues 'tb_sensor_rotation_offset': (0, 0, 0), #deviation from socket offsets, for changing the sensor roll orientation -- cgit v1.2.3 From 6832d68703355e6f61e4174d97c5f398797b09b0 Mon Sep 17 00:00:00 2001 From: Joshua Shreve Date: Tue, 17 Aug 2021 21:21:10 -0400 Subject: Name change. --- src/generate_configuration.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/generate_configuration.py') diff --git a/src/generate_configuration.py b/src/generate_configuration.py index ad00131..fbf3eba 100644 --- a/src/generate_configuration.py +++ b/src/generate_configuration.py @@ -18,7 +18,7 @@ shape_config = { 'save_dir': '.', 'config_name': "DM", - 'show_caps': False, + 'show_caps': True, 'show_pcbs': False, #only runs if caps are shown, easist place to initially inject geometry 'nrows': 5, #5, # key rows @@ -44,8 +44,8 @@ shape_config = { ############################## # THUMB PARAMETERS ############################## - # 'DEFAULT' 6-key, 'MINI' 5-key, 'CARBONFET' 6-key, 'MINIDOX' 3-key, 'TRACKBALL_ORBISSYL', 'TRACKBALL_CJ' - 'thumb_style': 'TRACKBALL_ORBISSYL', + # 'DEFAULT' 6-key, 'MINI' 5-key, 'CARBONFET' 6-key, 'MINIDOX' 3-key, 'TRACKBALL_ORBYL', 'TRACKBALL_CJ' + 'thumb_style': 'TRACKBALL_ORBYL', '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, @@ -102,7 +102,7 @@ shape_config = { # END EXPERIMENTAL 'trackball_Usize': 1.5, # size for inner key near trackball - 'ball_side': 'both', + 'ball_side': 'right', #'left', 'right', or 'both' 'ball_diameter': 34.0, 'ball_wall_thickness': 3, # should not be changed unless the import models are changed. 'ball_gap': 1.0, -- cgit v1.2.3 From d8c4a98391895b59fe9e4bf1a323620903babaa4 Mon Sep 17 00:00:00 2001 From: Joshua Shreve Date: Wed, 18 Aug 2021 07:49:21 -0400 Subject: Fixed Trackball in Wall, extra rotation. Now aims forward. --- src/generate_configuration.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/generate_configuration.py') diff --git a/src/generate_configuration.py b/src/generate_configuration.py index fbf3eba..cb6891e 100644 --- a/src/generate_configuration.py +++ b/src/generate_configuration.py @@ -45,7 +45,7 @@ shape_config = { # THUMB PARAMETERS ############################## # 'DEFAULT' 6-key, 'MINI' 5-key, 'CARBONFET' 6-key, 'MINIDOX' 3-key, 'TRACKBALL_ORBYL', 'TRACKBALL_CJ' - 'thumb_style': 'TRACKBALL_ORBYL', + 'thumb_style': 'MINIDOX', '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, @@ -60,9 +60,9 @@ shape_config = { ################################### ## Trackball in Wall ## ################################### - 'trackball_in_wall': False, # Separate trackball option, placing it in the OLED area + 'trackball_in_wall': True, # Separate trackball option, placing it in the OLED area 'tbiw_ball_center_row': 0.2, # up from cornerrow instead of down from top - 'tbiw_translational_offset': (0.0, 0.0, 3), + 'tbiw_translational_offset': (0.0, 0.0, 0.0), 'tbiw_rotation_offset': (0.0, 0.0, 0.0), 'tbiw_left_wall_x_offset_override': 50.0, 'tbiw_left_wall_z_offset_override': 0.0, -- cgit v1.2.3 From 3a74bee2fcd1561f5cf23a4f57fe41062203313e Mon Sep 17 00:00:00 2001 From: Edward Date: Thu, 19 Aug 2021 15:40:34 -0400 Subject: allow multiple config files generate_configuration.py now only generates a configuration file; it no longer also runs dactyl_manuform.py. it will save the generated configuration file to the configs directory, and it will be named according to the config_name. passing a --config= argument to the script will set the config_name and save_dir. dactyl_manuform.py now also accepts a --config= argument. if non is passed, the default values from generate_configuration.py are used. otherwise, the defaults will be overridden by the values from the config specified. because of these changes, i removed run_config.json. it should have default values anyway, so it seemed reduandant and confusing. the run command has also been updated to allow for the config changes, and some bugs have also been fixed. --- src/generate_configuration.py | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) (limited to 'src/generate_configuration.py') diff --git a/src/generate_configuration.py b/src/generate_configuration.py index e2d71b0..08d02ff 100644 --- a/src/generate_configuration.py +++ b/src/generate_configuration.py @@ -1,3 +1,6 @@ +import sys +import getopt +import os import json @@ -301,23 +304,18 @@ shape_config = { #################################### def save_config(): - print("Saving Configuration") - with open('run_config.json', mode='w') as fid: - json.dump(shape_config, fid, indent=4) - -def update_config(fname, fname_out=None): - if fname_out is None: - fname_out == "updated_config.json" - # Open existing config, update with any new parameters, and save to updated_config.json - with open(fname, mode='r') as fid: - last_shape_config = json.load(fid) - shape_config.update(last_shape_config) - - with open(fname_out, mode='w') as fid: + # Check to see if the user has specified an alternate config + opts, args = getopt.getopt(sys.argv[1:], "", ["config="]); + for opt, arg in opts: + if opt in ('--config'): + # If a config file was specified, set the config_name and save_dir + shape_config['save_dir'] = arg + shape_config['config_name'] = arg + + # Write the config to ./configs/.json + with open(os.path.join(r"..", "configs", shape_config['config_name'] + '.json'), mode='w') as fid: json.dump(shape_config, fid, indent=4) if __name__ == '__main__': - save_config() - from dactyl_manuform import * - run() \ No newline at end of file + save_config() \ No newline at end of file -- cgit v1.2.3 From b9c0013ea9dd83aaa83c994b0a572ace64d75c72 Mon Sep 17 00:00:00 2001 From: Joshua Shreve Date: Fri, 20 Aug 2021 16:56:35 -0400 Subject: Now supports trackball in wall and in a cluster. An unlikely config, but it simplifies construction by removing the setting interdependency. --- src/generate_configuration.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/generate_configuration.py') diff --git a/src/generate_configuration.py b/src/generate_configuration.py index cb6891e..373c3eb 100644 --- a/src/generate_configuration.py +++ b/src/generate_configuration.py @@ -45,7 +45,7 @@ shape_config = { # THUMB PARAMETERS ############################## # 'DEFAULT' 6-key, 'MINI' 5-key, 'CARBONFET' 6-key, 'MINIDOX' 3-key, 'TRACKBALL_ORBYL', 'TRACKBALL_CJ' - 'thumb_style': 'MINIDOX', + 'thumb_style': 'TRACKBALL_ORBYL', '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, -- cgit v1.2.3 From c9df94ec88a1465bc900bc75dc9c1288056c26cf Mon Sep 17 00:00:00 2001 From: Joshua Shreve Date: Fri, 20 Aug 2021 17:57:30 -0400 Subject: Adapted Trackball from Cjen1 to match newer structure. Appears to work as intended. --- src/generate_configuration.py | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) (limited to 'src/generate_configuration.py') diff --git a/src/generate_configuration.py b/src/generate_configuration.py index 373c3eb..ee70e3b 100644 --- a/src/generate_configuration.py +++ b/src/generate_configuration.py @@ -45,7 +45,7 @@ shape_config = { # THUMB PARAMETERS ############################## # 'DEFAULT' 6-key, 'MINI' 5-key, 'CARBONFET' 6-key, 'MINIDOX' 3-key, 'TRACKBALL_ORBYL', 'TRACKBALL_CJ' - 'thumb_style': 'TRACKBALL_ORBYL', + 'thumb_style': 'TRACKBALL_CJ', '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, @@ -60,7 +60,7 @@ shape_config = { ################################### ## Trackball in Wall ## ################################### - 'trackball_in_wall': True, # Separate trackball option, placing it in the OLED area + 'trackball_in_wall': False, # Separate trackball option, placing it in the OLED area 'tbiw_ball_center_row': 0.2, # up from cornerrow instead of down from top 'tbiw_translational_offset': (0.0, 0.0, 0.0), 'tbiw_rotation_offset': (0.0, 0.0, 0.0), @@ -73,9 +73,9 @@ shape_config = { 'tbiw_oled_translation_offset': (-3.5, 0, 1.5), # Z offset tweaks are expected depending on curvature and OLED mount choice. 'tbiw_oled_rotation_offset': (0, 0, 0), - ################################### - ## Trackball JS Thumb Cluster ## - ################################### + ########################################### + ## Trackball JS / ORBYL Thumb Cluster ## + ########################################## 'other_thumb': 'DEFAULT', # cluster used for second thumb except if ball_side == 'both' 'tbjs_key_diameter': 70, # Offsets are per key and are applied before rotating into place around the ball @@ -94,6 +94,15 @@ shape_config = { (0.0, 0.0, 0.0), (0.0, 0.0, 0.0), ], + + ################################### + ## Trackball CJ Thumb Cluster ## + ################################### + 'tbcj_inner_diameter': 42, + 'tbcj_thickness': 2, + 'tbcj_outer_diameter': 53, + + ################################### ## Trackball General ## ################################### @@ -108,6 +117,8 @@ shape_config = { 'ball_gap': 1.0, 'trackball_hole_diameter': 36.5, 'trackball_hole_height': 40, + 'trackball_plate_thickness': 2, + 'trackball_plate_width': 2, # Removed trackball_rotation, ball_z_offset. and trackball_sensor_rotation and added more flexibility. 'tb_socket_translation_offset': (0, 0, 2.0), # applied to the socket and sensor, large values will cause web/wall issues. 'tb_socket_rotation_offset': (0, 0, 0), # applied to the socket and sensor, large values will cause web/wall issues. -- cgit v1.2.3 From 9e2c0c3b72eb0bb27210bf19d76e7e4b6f5ce295 Mon Sep 17 00:00:00 2001 From: Joshua Shreve Date: Sat, 21 Aug 2021 20:31:07 -0400 Subject: Added config update to add new parameters to config. Retained ability to run the run_config.json file if there are no CLI arguments. Retained ability to run the run_config.json file if there are no CLI arguments. Will eventually deprecate run_config in favor of the configs directory, but don't want to mess up existing configs until they have time to migrate. Un-ignored configs. Would like to build a set of user configs through PRs to see variety. Add gallery directory for those with submit configs for people to see examples. All PRs for configs are expected to have identically named files (with some suffix for multiple) to show example images. --- src/generate_configuration.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/generate_configuration.py') diff --git a/src/generate_configuration.py b/src/generate_configuration.py index 79ef5b3..7b0ef84 100644 --- a/src/generate_configuration.py +++ b/src/generate_configuration.py @@ -387,7 +387,13 @@ shape_config = { def save_config(): # Check to see if the user has specified an alternate config - opts, args = getopt.getopt(sys.argv[1:], "", ["config="]); + opts, args = getopt.getopt(sys.argv[1:], "", ["config=", "update="]) + for opt, arg in opts: + if opt in ('--update'): + with open(os.path.join(r"..", "configs", arg + '.json'), mode='r') as fid: + data = json.load(fid) + shape_config.update(data) + for opt, arg in opts: if opt in ('--config'): # If a config file was specified, set the config_name and save_dir -- cgit v1.2.3 From 27f491bda62c18e314380ddc6456962a2417b84b Mon Sep 17 00:00:00 2001 From: Joshua Shreve Date: Mon, 23 Aug 2021 19:59:18 -0400 Subject: generate_config.py once again defaulting to original behavior. --- src/generate_configuration.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'src/generate_configuration.py') diff --git a/src/generate_configuration.py b/src/generate_configuration.py index 7b0ef84..f5fa716 100644 --- a/src/generate_configuration.py +++ b/src/generate_configuration.py @@ -48,7 +48,7 @@ shape_config = { # THUMB PARAMETERS ############################## # 'DEFAULT' 6-key, 'MINI' 5-key, 'CARBONFET' 6-key, 'MINIDOX' 3-key, 'TRACKBALL_ORBYL', 'TRACKBALL_CJ' - 'thumb_style': 'TRACKBALL_CJ', + 'thumb_style': 'TRACKBALL_ORBYL', '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, @@ -388,21 +388,29 @@ shape_config = { def save_config(): # Check to see if the user has specified an alternate config opts, args = getopt.getopt(sys.argv[1:], "", ["config=", "update="]) + got_opts = False for opt, arg in opts: if opt in ('--update'): with open(os.path.join(r"..", "configs", arg + '.json'), mode='r') as fid: data = json.load(fid) shape_config.update(data) + got_opts = True for opt, arg in opts: if opt in ('--config'): # If a config file was specified, set the config_name and save_dir shape_config['save_dir'] = arg shape_config['config_name'] = arg + got_opts = True # Write the config to ./configs/.json - with open(os.path.join(r"..", "configs", shape_config['config_name'] + '.json'), mode='w') as fid: - json.dump(shape_config, fid, indent=4) + if got_opts: + with open(os.path.join(r"..", "configs", shape_config['config_name'] + '.json'), mode='w') as fid: + json.dump(shape_config, fid, indent=4) + + else: + with open(os.path.join(r".", 'run_config.json'), mode='w') as fid: + json.dump(shape_config, fid, indent=4) if __name__ == '__main__': -- cgit v1.2.3