summaryrefslogtreecommitdiff
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
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.
-rw-r--r--README.md33
-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
6 files changed, 83 insertions, 29 deletions
diff --git a/README.md b/README.md
index d853323..53f3f80 100644
--- a/README.md
+++ b/README.md
@@ -13,12 +13,35 @@ As part of the effort to create a new engine I converted the code to cadquery/Op
## Added Features
+### Refactored
+Your settings are now created by `generate_configuration.py` or by direct modification fo the `run_config.json` file.
+This allows you to save `run_config.json` to share your configuration.
+
+Additionally, the OpenSCAD/solid python and OpenCASCADE/cadquery versions are merged with separate helper functions
+to decouple the generator from the target library. This also lets me stay sane by only modifying one file for most updates.
+Running `dactyl_manuform.py` will automatically load the `run_config.json` file.
+
+### Everyone gets a thumb cluster!
+
+Added support of for the thumb clusters in the [carbonfet Dactyl library](https://github.com/carbonfet/dactyl-manuform).
+These are the "mini" and "carbonfet" thumb clusters. Feel free to try them out with by setting `'thumb_style'` to
+`'DEFAULT'`, `'MINI'`, or `'CARBONFET'`.
+
+Rendered and actual images to be added in future commits.
+
### Clippable switch mounting
-Tired of hot glue and constraining the socket with "nubs"? I've added an adjustable undercut for using the clips on the sockets. May require some tweaking and little filing, but I have my DM built without any glue and you can too. Just use `plate_style = 'UNDERCUT'`.
+Tired of hot glue and constraining the socket with "nubs"? I've added an adjustable undercut for using the clips on
+the sockets. May require some tweaking and little filing, but I have my DM built without any glue and you can too.
+Just use `plate_style = 'UNDERCUT'`. I've also added an improved local undercut using `plate_style = 'NOTCH'`.
### Kailh Hotswap
-Added a new switch for hot swap and a way to include any additional geometry in the key plate by use of an imported file. For hot swap just use `plate_style = 'HS_HOLE'` or `plate_style = 'HS_NUB'`. To import an arbitrary geometry set the `plate_file = None` and `plate_offset = 0.0`. The file must be .step for OpenCascade / cadquery and .stl for openSCAD / solid python. The zero reference should be the key center (XY), and the top of the plate (Z). Plate offset is a Z-axis translation for minor adjustments without modifying the geometry file.
+Added a new switch for hot swap and a way to include any additional geometry in the key plate by use of an imported file.
+For hot swap just use `plate_style = 'HS_NOTCH'`, `plate_style = 'HS_HOLE'`, or `plate_style = 'HS_NUB'`.
+To import an arbitrary geometry set the `plate_file = None` and `plate_offset = 0.0`.
+The file must be .step for OpenCascade / cadquery and .stl for openSCAD / solid python.
+The zero reference should be the key center (XY), and the top of the plate (Z).
+Plate offset is a Z-axis translation for minor adjustments without modifying the geometry file.
**DISCLAIMER: I have not built the hot swap version and cannot speak to the geometry. I found it running around in various places and don't know the origin. At least one user has claimed it works.**
@@ -87,7 +110,7 @@ This is now a bit of a monster of many minds and yet continues to bear fruit. I
* ~~Run `python dactyl_manuform_cadquery.py` or `python3 dactyl_manuform_cadquery.py`~~
* ~~Run `python dactyl_manuform.py` or `python3 dactyl_manuform.py`~~
* Run `generate_configuration.py` or directly edit `run_config.json` to configure the design
-* Run `run.py` to create the geometry (ENGINE variable in run determines method)
+* Run `dactyl_manuform.py` to create the geometry (ENGINE variable in run determines method)
* This will regenerate the `things/` files (or in subdirectory if defined in config)
* `*left.*`
* `*right.*`
@@ -188,6 +211,8 @@ This site also shows connections for the Arduino Pro Micro controllers.
## License
-Copyright © 2015-2020 Matthew Adereth, Tom Short, and Joshua Shreve
+General Code Copyright © 2015-2021 Matthew Adereth, Tom Short, and Joshua Shreve
+Mini thumb cluster Copyright © 2015-2018 Matthew Adereth, Tom Short, and Leo Lou
+Carbonfet thumb cluster © 2015-2018 Matthew Adereth, Tom Short, and carbonfet (github username)
The source code for generating the models (everything excluding the [things/](things/) and [resources/](resources/) directories is distributed under the [GNU AFFERO GENERAL PUBLIC LICENSE Version 3](LICENSE). The generated models and PCB designs are distributed under the [Creative Commons Attribution-NonCommercial-ShareAlike License Version 3.0](LICENSE-models).
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,