summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJoshua Shreve <j.a.shreve@gmail.com>2021-07-12 21:04:37 -0400
committerJoshua Shreve <j.a.shreve@gmail.com>2021-07-12 21:04:37 -0400
commit34276fd65a74bf4a87d70f8650f6b3262384ef78 (patch)
tree2ed978ca01d57ab52f0c79495208ea398311a5f0 /src
parent89b63be39ac151408b5e25a3ad06668d9a79c20d (diff)
Minor fixes for missing web on MINI thumb cluster. Added readme content and options for USB out only and no connector / controller features.
Diffstat (limited to 'src')
-rw-r--r--src/dactyl_manuform.py34
-rw-r--r--src/generate_configuration.py19
-rw-r--r--src/hot_swap_plate_V02.FCStdbin127150 -> 146004 bytes
-rw-r--r--src/model_builder.py22
-rw-r--r--src/run_config.json4
5 files changed, 54 insertions, 25 deletions
diff --git a/src/dactyl_manuform.py b/src/dactyl_manuform.py
index 0632399..ade1208 100644
--- a/src/dactyl_manuform.py
+++ b/src/dactyl_manuform.py
@@ -18,15 +18,12 @@ def rad2deg(rad: float) -> float:
# EXTREMELY UGLY BUT FUNCTIONAL BOOTSTRAP
###############################################
-from generate_configuration import *
-save_config()
-
## IMPORT DEFAULT CONFIG IN CASE NEW PARAMETERS EXIST
import generate_configuration as cfg
for item in cfg.shape_config:
locals()[item] = cfg.shape_config[item]
-## LOAD RUN CONFIGURATION FILE
+## LOAD RUN CONFIGURATION FILE AND WRITE TO ANY VARIABLES IN FILE.
with open('run_config.json', mode='r') as fid:
data = json.load(fid)
for item in data:
@@ -34,9 +31,9 @@ for item in data:
# Really rough setup. Check for ENGINE, set it not present from configuration.
try:
- print('Current Engine = {}'.format(ENGINE))
+ print('Found Current Engine in Config = {}'.format(ENGINE))
except Exception:
- print('Current Engine = {}'.format('None'))
+ print('Engine Not Found in Config')
ENGINE = 'solid'
# ENGINE = 'cadquery'
print('Setting Current Engine = {}'.format(ENGINE))
@@ -1025,10 +1022,28 @@ def mini_thumb_connectors():
]
)
)
+ hulls.append(
+ triangle_hulls(
+ [
+ key_place(web_post_tr(), 3, lastrow),
+ key_place(web_post_br(), 3, lastrow),
+ key_place(web_post_bl(), 4, cornerrow),
+ ]
+ )
+ )
hulls.append(
triangle_hulls(
[
+ key_place(web_post_tr(), 3, lastrow),
+ key_place(web_post_br(), 3, cornerrow),
+ key_place(web_post_bl(), 4, cornerrow),
+ ]
+ )
+ )
+ hulls.append(
+ triangle_hulls(
+ [
key_place(web_post_br(), 1, cornerrow),
key_place(web_post_tl(), 2, lastrow),
key_place(web_post_bl(), 2, cornerrow),
@@ -2460,10 +2475,10 @@ def model_side(side="right"):
s2 = union([walls_shape])
s2 = union([s2, *screw_insert_outers()])
- if controller_mount_type in ['RJ9_USB_TEENSY']:
+ if controller_mount_type in ['RJ9_USB_TEENSY', 'USB_TEENSY']:
s2 = union([s2, teensy_holder()])
- if controller_mount_type in ['RJ9_USB_TEENSY', 'RJ9_USB_WALL']:
+ if controller_mount_type in ['RJ9_USB_TEENSY', 'RJ9_USB_WALL', 'USB_WALL', 'USB_TEENSY']:
s2 = union([s2, usb_holder()])
s2 = difference(s2, [usb_holder_hole()])
@@ -2473,6 +2488,9 @@ def model_side(side="right"):
if controller_mount_type in ['EXTERNAL']:
s2 = difference(s2, [external_mount_hole()])
+ if controller_mount_type in ['None']:
+ 0 # do nothing, only here to expressly state inaction.
+
s2 = difference(s2, [union(screw_insert_holes())])
shape = union([shape, s2])
diff --git a/src/generate_configuration.py b/src/generate_configuration.py
index aa22322..69fc0c8 100644
--- a/src/generate_configuration.py
+++ b/src/generate_configuration.py
@@ -20,8 +20,8 @@ shape_config = {
'show_caps': False,
- 'nrows': 5, # key rows
- 'ncols': 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
@@ -37,13 +37,13 @@ shape_config = {
'thumb_offsets': [6, -3, 7],
'keyboard_z_offset': (
- 9 # controls overall height# original=9 with centercol=3# use 16 for centercol=2
+ 13 # controls overall height# original=9 with centercol=3# use 16 for centercol=2
),
- 'thumb_style': 'CARBONFET', # 'DEFAULT', 'MINI', 'CARBONFET'
+ 'thumb_style': 'DEFAULT', # 'DEFAULT', 'MINI', 'CARBONFET'
##############################
- # NEW TEST PARAMETERS
+ # EXPERIMENTAL PARAMETERS
##############################
'pinky_1_5U': False, # LEAVE AS FALSE, CURRENTLY BROKEN
'first_1_5U_row': 0,
@@ -208,10 +208,11 @@ shape_config = {
###################################
# connector options are
# 'RJ9_USB_WALL' = Standard internal plate with RJ9 opening and square cutout for connection.
+ # 'USB_WALL' = Standard internal plate with a square cutout for connection, no RJ9.
# 'RJ9_USB_TEENSY' = Teensy holder
- # 'EXTERNAL' = square cutout for a holder such as the on from lolligagger.
- # controller_mount_type = 'RJ9_USB_WALL'
- # controller_mount_type = 'RJ9_USB_TEENSY'
+ # 'USB_TEENSY' = Teensy holder, no RJ9
+ # 'EXTERNAL' = square cutout for a holder such as the one from lolligagger.
+ # 'NONE' = No openings in the back.
'controller_mount_type': 'EXTERNAL',
'external_holder_height': 12.5,
@@ -283,3 +284,5 @@ def update_config(fname, fname_out=None):
if __name__ == '__main__':
save_config()
+ from dactyl_manuform import *
+ run() \ No newline at end of file
diff --git a/src/hot_swap_plate_V02.FCStd b/src/hot_swap_plate_V02.FCStd
index ab4e97f..353c635 100644
--- a/src/hot_swap_plate_V02.FCStd
+++ b/src/hot_swap_plate_V02.FCStd
Binary files differ
diff --git a/src/model_builder.py b/src/model_builder.py
index fd611ba..ef4824c 100644
--- a/src/model_builder.py
+++ b/src/model_builder.py
@@ -70,7 +70,7 @@ configurations = [
'save_dir': '6x6_CtrlTray',
'nrows': 6, # key rows
'ncols': 6, # key columns
- 'oled_mount_type': 'CLIP',
+ 'oled_mount_type': None,
'controller_mount_type': 'EXTERNAL',
},
{
@@ -79,7 +79,7 @@ configurations = [
'nrows': 4, # key rows
'ncols': 5, # key columns
'oled_mount_type': None,
- 'controller_mount_type': 'EXTERNAL',
+ 'controller_mount_type': 'RJ9_USB_WALL',
},
{
'config_name': '4x6_Basic',
@@ -107,20 +107,28 @@ configurations = [
}
]
-init = True
+
+# ENGINES = ['solid', 'cadquery']
+ENGINES = ['cadquery']
+
+init = True
for config in configurations:
shape_config = copy.deepcopy(base)
for item in config:
shape_config[item] = config[item]
-
- with open('run_config.json', mode='w') as fid:
- json.dump(shape_config, fid, indent=4)
+ for engine in ENGINES:
+ shape_config['ENGINE'] = engine
+ with open('run_config.json', mode='w') as fid:
+ json.dump(shape_config, fid, indent=4)
if init:
import dactyl_manuform as dactyl_manuform
+ dactyl_manuform.run()
+ init = False
else:
importlib.reload(dactyl_manuform)
+ dactyl_manuform.run()
+
- init = False
diff --git a/src/run_config.json b/src/run_config.json
index 8196262..2240874 100644
--- a/src/run_config.json
+++ b/src/run_config.json
@@ -18,8 +18,8 @@
-3,
7
],
- "keyboard_z_offset": 9,
- "thumb_style": "CARBONFET",
+ "keyboard_z_offset": 13,
+ "thumb_style": "DEFAULT",
"pinky_1_5U": false,
"first_1_5U_row": 0,
"last_1_5U_row": 5,