Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix USB_C_WALL comment #113

Open
wants to merge 180 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
180 commits
Select commit Hold shift + click to select a range
d6d2dc5
playing
nethermead Aug 23, 2021
cfeea34
tweaked tbjs trackball, need to pull it out into its own setup
nethermead Aug 24, 2021
d996036
adjusted hotswap rotations for thumbs, added hotswap step file for ca…
nethermead Aug 26, 2021
2884820
updating
nethermead Sep 4, 2021
76f1f01
Latest fixes
nethermead Sep 12, 2021
b2443b6
tweaked for BH
nethermead Sep 26, 2021
5369e47
full_last_rows setting works
nethermead Sep 26, 2021
b704260
full_last_rows works and cleaned out cusomization
nethermead Sep 26, 2021
35f74b8
merged from master
nethermead Sep 26, 2021
86266e8
removed IDEA project file
bullwinkle3000 Sep 26, 2021
9c3ef44
Walls missing
bullwinkle3000 Sep 29, 2021
e9a0b08
1.25u
bullwinkle3000 Oct 9, 2021
9e31477
added trackball_shapes.py and generated_holder.stl for start of code …
bullwinkle3000 Oct 11, 2021
5f0a09d
Trackball holder, cutter, and sensor mount all in the ballpark.
bullwinkle3000 Oct 15, 2021
bd7f903
building cluster classes
bullwinkle3000 Oct 16, 2021
b2d8dde
default cluster builds
bullwinkle3000 Oct 16, 2021
2a4f3e5
Carbonfet good, checking minidox issue
bullwinkle3000 Oct 17, 2021
de85ccc
Found where Minidox had a fourth key added in space, removed for now.
bullwinkle3000 Oct 18, 2021
a45e290
Minidox fixed and mini 5-key cluster updated.
bullwinkle3000 Oct 18, 2021
f8e0f15
Cleaned mini methods from dactyl_manuform.py
bullwinkle3000 Oct 18, 2021
3245fb2
Trackball Orbyl in place
bullwinkle3000 Oct 18, 2021
f95128a
Wild track working, need to fix "other" side cluster
bullwinkle3000 Oct 18, 2021
b97dc01
Added freecad script to run in Freecad GUI console to help automate c…
bullwinkle3000 Oct 20, 2021
73e3703
cadquery check on freecad script export
bullwinkle3000 Oct 20, 2021
35ded44
Fixes from brad_dolph branch
bullwinkle3000 Oct 22, 2021
7dc4f75
right and left working better
bullwinkle3000 Oct 25, 2021
1dbca9b
Removed a few last thumb cluster methods.
bullwinkle3000 Oct 26, 2021
63a6fa6
STL exports on cadquery builds
bullwinkle3000 Oct 30, 2021
6492a2b
Trimmed fat
bullwinkle3000 Oct 30, 2021
cbe9868
Prepping for linux setup
bullwinkle3000 Oct 31, 2021
f93c732
Cluster and trackball integral data pulled into separate JSON files
bullwinkle3000 Nov 2, 2021
d907e35
Runs, needs tweaks, trackball stls not present
bullwinkle3000 Nov 2, 2021
7dd83e8
Moved cluster json out of configs directory to clusters/json directory.
bullwinkle3000 Nov 3, 2021
0751ccc
tweaks
bullwinkle3000 Nov 5, 2021
38235f8
Update .gitignore
bullwinkle3000 Nov 5, 2021
608ec8a
Update .gitignore
bullwinkle3000 Nov 5, 2021
4d0679e
Squashed commit of the following:
bullwinkle3000 Nov 5, 2021
a0acb9c
Merge remote-tracking branch 'origin/master' into wilder
bullwinkle3000 Nov 6, 2021
4d75032
Moving workflow setup out of general repo
bullwinkle3000 Nov 6, 2021
30736bc
Relocated customer bits out of ignored directory and outside of repo
bullwinkle3000 Nov 6, 2021
bc503a5
Merge branch 'wilder'
bullwinkle3000 Nov 6, 2021
081722a
Ensure existence of missing var on trackball_wilder (check if really …
bullwinkle3000 Nov 6, 2021
984c190
Bulk run kinda works, but there's an issue with rear wall by loligagger.
bullwinkle3000 Nov 9, 2021
6e6d50e
Bulk run kinda works, but there's an issue with rear wall by loligagger.
bullwinkle3000 Nov 9, 2021
9f0407f
Slight clean
bullwinkle3000 Nov 10, 2021
1ccacab
Bulk working well
bullwinkle3000 Nov 11, 2021
fd6b7cb
Testing merged trackball socket and sensor mount with more mount thic…
bullwinkle3000 Nov 12, 2021
efd7a0b
Added four posts beneath TrackballWilder to prevent print issues.
bullwinkle3000 Nov 13, 2021
38a02c8
Clean config json
bullwinkle3000 Nov 13, 2021
ac0e0ce
Removed null on override name
bullwinkle3000 Nov 15, 2021
d0934eb
Merge from bulk_build.
bullwinkle3000 Nov 15, 2021
1bc0f66
Anonymize
bullwinkle3000 Nov 15, 2021
fcfebca
Tweaked overrides handling. Builds should work with default run_conf…
bullwinkle3000 Nov 15, 2021
1a3be26
Replaced wonky trackball_sensor_mount.stl with original. Openscad se…
bullwinkle3000 Nov 15, 2021
0c8522d
Trackball cutter wasn't working, fixed now.
bullwinkle3000 Nov 16, 2021
b2f8cf9
Safeguarding state
bullwinkle3000 Nov 17, 2021
67e2901
Working on Loligagger holder code
bullwinkle3000 Nov 18, 2021
ee29b50
Key rotations off on wilder cluster
bullwinkle3000 Nov 19, 2021
fea97d5
usb_holder finishes, but has issues.
bullwinkle3000 Nov 19, 2021
1251b7c
Added --save_path argument to customize save paths on local system wi…
bullwinkle3000 Nov 22, 2021
13fcddf
Was missing this stl
bullwinkle3000 Nov 29, 2021
6c705dd
Left cluster wasn't getting proper screw holes.
bullwinkle3000 Dec 20, 2021
8020f55
Trackball mr keyhole had a wall cutting through it.
bullwinkle3000 Jan 5, 2022
e0dcb13
Fixed bulk_build.py
bullwinkle3000 Jan 17, 2022
60edca6
Carbonfet wasn't working.
bullwinkle3000 Jan 21, 2022
1291f92
Removed potential hole and blocking wall in Wilder cluster.
bullwinkle3000 Jan 27, 2022
e87288b
OLED adjustments
bullwinkle3000 Feb 25, 2022
6f3e96b
Added .ipynb_checkpoints to .gitignore
bullwinkle3000 Feb 25, 2022
0f9279f
Missing assets
bullwinkle3000 Mar 2, 2022
8130f10
First pass at integrated wrist rests
bullwinkle3000 Mar 15, 2022
e2294b5
BTUs sorta in place
bullwinkle3000 Mar 27, 2022
28a7b89
Adjusted screws again
bullwinkle3000 Mar 29, 2022
7333038
BTU edits
bullwinkle3000 Apr 6, 2022
e54d50c
BTU updates, still needs support
bullwinkle3000 Apr 7, 2022
25e272c
New BTU cluster (based on wilder version only for now)
bullwinkle3000 Apr 7, 2022
8a8c18a
New BTU cluster (based on wilder version only for now)
bullwinkle3000 Apr 7, 2022
10badfd
Merged from wilder branch.
bullwinkle3000 Apr 8, 2022
98ce69c
Keep testing override in config
bullwinkle3000 Apr 9, 2022
50df563
Lowered mini cluster by 4mm
bullwinkle3000 Apr 14, 2022
c7dbab4
Lowered mini cluster by 4mm
bullwinkle3000 Apr 14, 2022
6ff5f61
Updated hot swap socket
bullwinkle3000 Apr 22, 2022
7c7a8b0
Redundant code
bullwinkle3000 Apr 23, 2022
4603d28
Logo import cherry picked
bullwinkle3000 Apr 26, 2022
73f7f08
Fixed trackball_in_wall not working
bullwinkle3000 Apr 28, 2022
0f10955
Back to derek_hotswap
bullwinkle3000 Apr 29, 2022
149586f
added quick_render option
bullwinkle3000 Apr 29, 2022
c127fb5
Adjusted wild cluster looking pretty good
bullwinkle3000 May 1, 2022
4a51dd8
Screw hole in space fixed
bullwinkle3000 May 1, 2022
82e5c80
Added logo_file: null to run
bullwinkle3000 May 3, 2022
f0dfb5b
null isn't None, eh? Oops.
bullwinkle3000 May 4, 2022
1711c5c
Logo and screw offsets params and always generate left half items, ne…
bullwinkle3000 May 8, 2022
bab79ff
Reverting hotswap
bullwinkle3000 May 23, 2022
771c838
Simpler trackball clsuter checks
bullwinkle3000 Jun 2, 2022
b17c387
Added 'resin' parameter which short-circuits trackball supports if true.
bullwinkle3000 Jun 18, 2022
c381626
Widened controller holder
bullwinkle3000 Jun 18, 2022
eead0f9
Screw holes, insert holes, and external holder width adjusted.
bullwinkle3000 Jun 19, 2022
48c3993
Tightened width of external holder.
bullwinkle3000 Jun 20, 2022
69aff59
Dang overrides...
bullwinkle3000 Jun 23, 2022
aee251b
Added some mounts, basic Elite C "lolligagger" mounts and blackpill e…
bullwinkle3000 Jul 11, 2022
40116c5
Merged from new_sensor_holder.
bullwinkle3000 Jul 21, 2022
56678b4
Oops. Forgot da step file.
bullwinkle3000 Jul 21, 2022
b258175
Added amoeba mounts
bullwinkle3000 Jul 30, 2022
e0f8237
More space on carbonfet top switch hole.
bullwinkle3000 Aug 8, 2022
f9da6c2
Fixed issue with cluster adding funky wall with full_last_rows option.
bullwinkle3000 Aug 8, 2022
8e7ecfc
Updated readme to use Python 3.8 and cadquery=master
bullwinkle3000 Aug 8, 2022
3b8eab7
Updated readme to use Python 3.8 and cadquery=master
bullwinkle3000 Aug 8, 2022
316c466
Another carbonfet tweak
bullwinkle3000 Aug 10, 2022
a66e9f1
Merge remote-tracking branch 'origin/master' into wilder
bullwinkle3000 Aug 10, 2022
d19b2ec
Added standard loligaggers
bullwinkle3000 Aug 24, 2022
16ccc9f
Added standard loligaggers
bullwinkle3000 Aug 24, 2022
856c960
Amoeba mount working well
bullwinkle3000 Aug 27, 2022
1944377
Merge branch 'wilder'
bullwinkle3000 Aug 27, 2022
f61e016
Python 3.8 and CQ master
bullwinkle3000 Sep 7, 2022
5b7eb5d
Adjusted paths to allow run from base directory
bullwinkle3000 Sep 7, 2022
a0e9787
Update README.md with adjusted run path.
bullwinkle3000 Sep 7, 2022
1472acc
Test paths output
bullwinkle3000 Sep 7, 2022
7a7b5db
Test paths output 2
bullwinkle3000 Sep 7, 2022
5a9a775
Test paths output 3
bullwinkle3000 Sep 7, 2022
6e42fe4
Direct path changes nothing, rolling back.
bullwinkle3000 Sep 7, 2022
af09675
Handle crazy sizes better
bullwinkle3000 Sep 29, 2022
7916102
sorta
bullwinkle3000 Oct 1, 2022
706618f
magnets attempt 1
bullwinkle3000 Oct 4, 2022
51e29b7
Horizontal_OLED
bullwinkle3000 Oct 17, 2022
563e309
Horizontal_OLED
bullwinkle3000 Oct 17, 2022
f1bf79e
Added convenience JSON files and references for common options.
bullwinkle3000 Oct 23, 2022
cb2b893
Cut OLED section out of run_config.json
bullwinkle3000 Oct 23, 2022
26d0b47
Builds to do
bullwinkle3000 Oct 25, 2022
4cb2325
Rotated socket to keep bearing at the bottom
bullwinkle3000 Oct 28, 2022
73b5228
Added better offsets around top trackball wild key, shifted cluster f…
bullwinkle3000 Nov 2, 2022
e6ef998
Removed post_adj calculations on web_post methods. Added off_w, off_…
bullwinkle3000 Nov 4, 2022
ad8bedf
Higher for Jack
bullwinkle3000 Nov 6, 2022
5c40f04
Empty overrides
bullwinkle3000 Nov 6, 2022
f1ad88f
Merge branch 'wilder' into jsonloader
bullwinkle3000 Nov 10, 2022
2d846cb
Update screws and apply updates from wilder branch
bullwinkle3000 Nov 11, 2022
6ca4862
Merged from jsonloader
bullwinkle3000 Nov 11, 2022
51bf18d
Merged from trackball_three
bullwinkle3000 Nov 13, 2022
0abfafd
tiny extra space
bullwinkle3000 Nov 15, 2022
dcde782
Forgot to remove name
bullwinkle3000 Nov 16, 2022
543cc42
Stronger magnet supports
bullwinkle3000 Nov 27, 2022
67b277b
Added branch detection for specific build needs.
bullwinkle3000 Dec 1, 2022
9bf6b94
Added tweaks.
bullwinkle3000 Dec 2, 2022
f92b225
Deeper magnet slots
bullwinkle3000 Dec 20, 2022
880a409
Tinkered with BTU socket and trackball three.
bullwinkle3000 Jan 6, 2023
c238e27
Rollback BTU
bullwinkle3000 Jan 7, 2023
bfdff46
Tweaked BTU socket
bullwinkle3000 Jan 29, 2023
1f70006
Tinkering in single_plate, MXLEDBIT, line 301
bullwinkle3000 Feb 3, 2023
a34da02
Updated bulk build
bullwinkle3000 Feb 5, 2023
576a576
Overrides unset
bullwinkle3000 Feb 7, 2023
aff6f96
Added a flex_pcb.json to simply handle shorter key distances.
bullwinkle3000 Feb 10, 2023
3978e7a
Fixed the damn magnet depth, dammit and damn.
bullwinkle3000 Feb 11, 2023
00d24dc
Reverted btu trackball model, for now
bullwinkle3000 Feb 15, 2023
cfeead7
Updated BTU socket
bullwinkle3000 Feb 17, 2023
434e6c9
Updated BTU socket
bullwinkle3000 Feb 20, 2023
ddbb9d1
Adjusted magnet offsets for plate and case
bullwinkle3000 Mar 4, 2023
84d7e8b
Merged shift_column config parameter code from development branch. B…
bullwinkle3000 Mar 6, 2023
a6f2a77
Missing param fix
bullwinkle3000 Mar 7, 2023
69e772e
Slight tweak to trackball cluster placement, 1mm further forward, and…
bullwinkle3000 Mar 10, 2023
28623be
Beta btu trackball
bullwinkle3000 Mar 11, 2023
ee088a1
Generated better all-row models
bullwinkle3000 Mar 12, 2023
08952c9
Updated bulk_build
bullwinkle3000 Mar 13, 2023
db3f770
Adding USB-C mount point
bullwinkle3000 Mar 17, 2023
431cf32
Fixed shift on Minithicc cluster
bullwinkle3000 Mar 18, 2023
6aab9ec
Reverted magnet depths
bullwinkle3000 Mar 19, 2023
17d6833
USB-C and TRRS mounts
bullwinkle3000 Mar 19, 2023
96cd584
Merge branch 'feature_connectors' into wilder
bullwinkle3000 Mar 19, 2023
25de4a7
First pass at USB-C and TRRS mount points.
bullwinkle3000 Mar 20, 2023
64415de
Removed need for "flex_pcb.json" and set extra_height to 0.5 all around.
bullwinkle3000 Mar 21, 2023
0cc4eb3
Reverted Trackball-three to bearings trackball.
bullwinkle3000 Mar 23, 2023
b37d0fa
Reverted Trackball-three to bearings trackball.
bullwinkle3000 Mar 23, 2023
2fd9791
Ensure 3-row versions are handled for OLED mounts properly
bullwinkle3000 Mar 23, 2023
5b88540
Doh
bullwinkle3000 Mar 24, 2023
0bef202
Blockerize bottoms option
bullwinkle3000 Mar 27, 2023
ab1956b
Walls generated once only
bullwinkle3000 Mar 27, 2023
df35435
Multiple fixes for weird walls, column shift, and full rows handling.
bullwinkle3000 Mar 29, 2023
e8c5ba5
column_shift adjustments on cluster angles and offsets.
bullwinkle3000 Mar 30, 2023
9316769
Thicker front wall on wide left wall with carbonfet
bullwinkle3000 Apr 1, 2023
c860a1b
Adjustments to default cluster and column shift
bullwinkle3000 Apr 4, 2023
371fb28
Preparing to drop magnets
bullwinkle3000 Apr 9, 2023
604c139
whole matrix still bent
bullwinkle3000 Apr 10, 2023
f946d87
fix comment on USB_C_WALL
Schievel1 Apr 25, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,22 @@
.lein-*
*.gcode
*.scad
*.dxf
/target
.idea/
.idea
.DS_Store
*.FCStd1
debug_*
*/__pycache__/*
*.py[cod]
*~$*
things/
.DS_Store
things/*.scad
things/*.step
things/*.stl
config/
.iml
**/*.iml

/src/.ipynb_checkpoints/
49 changes: 49 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,52 @@
# Wylderbuilds Dactyl Manuform - Python 3 - Cadquery
So, THIS is a fork of a fork of a fork of a... You get the idea.

This one is a direct fork of [joshreve's brilliant adaptation](https://github.com/joshreve/dactyl-keyboard) of the original Clojure-based dactyl manuform generator redone in Python 3.
Without his work, none of this would have been nearly as easy and straightforward as it has been. Vast kudos and thanks to him.

This repo is what I've customized and use to generate the models for the prints I sell online at Wylderbuilds, my Etsy store.

## Main Differences and How to Make it Go
Eventually, joshreve and I hope to merge our changes together, but until then, here's a quick rundown on the current changes.

* Wylderbuilds Trackball cluster -- A new, low-rider Trackball cluster. ("thumb_style": "TRACKBALL_WILD")
* Wylderbuilds BTU Trackball cluster -- An even newer Trackball cluster with ball transfer unit support. ("thumb_style": TRACKBALL_BTU")
* 1.5u pinky column support -- Outside 1.5u pinky columns can be generated ("pinky_1_5U": true, "first_1_5U_row": x, "last_1_5U_row": y)
* Full bottom rows -- Default manuforms drop the bottom row keys on outside columns, this keeps them ("full_last_rows": true)
* Clusters broken out into their own classes -- Making it easier to swap among them and add more.
* Updated Kailh Hot swap holder -- If enabled, the hot swap holder is full size and stronger.
* Cadquery builds generate STLs in addition to STEP files -- The bottom plates are (still) only generated properly when the "ENGINE": "cadquery" is set and this will now generate ready-to-print STLs (some models might need a little repair)
* OTHER MISC BITS: OLED mount wall tweaks, tweaks to screw-sizes and some wall placements, manuform angle and heights tweaked, support for an "overrides" json config file.

The main script has been reworked into a single make_dactyl() function.

The setup and run instructions are still more-or-less the same, but here's some tips:

* The docker file likely won't get far, it hasn't been maintained or updated in some time.

* To run locally, the best route is to install Anaconda or Miniconda, start a conda shell and run the "conda.sh" script. If you're on Windows and don't want to do the WSL Linux thing, you can do the following:

1. Do the Anaconda/Miniconda bit, above.
2. In a conda shell, run the following lines:

conda create --name=dactyl-keyboard python=3.8 -y

conda activate dactyl-keyboard

conda install -c conda-forge -c cadquery cadquery=master -y

pip install dataclasses-json numpy scipy solidpython

conda update --all -y

Then, still in the shell, from the base repo directory, run:

python src/dactyl_manuform.py

This will churn and pump out models into the "things" directory. In run_config.json, "ENGINE": "solid" or "cadquery" will specify OpenSCAD or STEP/STL files, respectively. Note that the cadquery option takes considerably longer. Openscad is best for fast iteration.

I'll update more here as things develop.

# The Dactyl-ManuForm Keyboard - Python 3 - Cadquery
This is a fork of [Dactyl-Manuform](https://github.com/tshort/dactyl-keyboard) by Tom Short, which itself is a fork of [Dactyl](https://github.com/adereth/dactyl-keyboard) by Matthew Adereth, a parameterized, split-hand, concave, columnar, ergonomic keyboard.

Expand Down
4 changes: 2 additions & 2 deletions conda.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,13 @@ fi

inform "Creating conda environment: $envName..."

conda create --name=$envName python=3.7 -y
conda create --name=$envName python=3.8 -y

conda activate $envName

inform "Installing CadQuery..."

conda install -c conda-forge -c cadquery cadquery=2 -y
conda install -c conda-forge -c cadquery cadquery=master -y

inform "Installing dataclasses-json..."

Expand Down
Empty file added src/__init__.py
Empty file.
45 changes: 45 additions & 0 deletions src/builder.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# from dactyl_manuform import *
from clusters.default_cluster import DefaultCluster
import numpy as np
from numpy import pi
import os.path as path
import getopt, sys
import json
import os
import shutil


debug_exports = False
debug_trace = False

def deg2rad(degrees: float) -> float:
return degrees * pi / 180


def rad2deg(rad: float) -> float:
return rad * 180 / pi


def debugprint(info):
if debug_trace:
print(info)


class Builder:
column_style = "asymetric"
centerrow = 3
lastrow = 4
cornerrow = 3
lastcol = 5


def __init__(self, parent_locals):
for item in parent_locals:
globals()[item] = parent_locals[item]
cluster = DefaultCluster(parent_locals)
origin = cluster.thumborigin()
print("Locals imported")
print(thumb_style)


print("It built!")
147 changes: 147 additions & 0 deletions src/bulk_build.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
import os
import json
import sys
import dactyl_manuform

json_template = """
{
"ENGINE": "cadquery",
"overrides": "",
"override_name": "",
"save_dir": "",
"save_name": null,
"show_caps": false,
"centerrow_offset": 3,
"nrows": 5,
"ncols": 6,
"plate_style": "NOTCH",
"full_last_rows": true,
"all_last_rows": false,
"right_side_only": true,
"thumb_style": "DEFAULT",
"other_thumb": "DEFAULT",
"ball_side": "right"
}
"""

clusters = [
"DEFAULT", "CARBONFET", "MINI", "MINITHICC", "MINITHICC3", "MINIDOX",
"TRACKBALL_WILD", "TRACKBALL_THREE", "TRACKBALL_ORBYL"
]

gen_dir = sys.argv[1]

try:
print(gen_dir)
except NameError:
print("Must provide target directory for generating bulk models")
sys.exit(-1)

out_file = os.path.join(gen_dir, "bulk_config")

engine = "cadquery"
default = "DEFAULT"
trackball = "TRACKBALL_WILD"
hotswap = "HS_NOTCH"
normal = "NOTCH"
run_config = os.path.join(r"src", 'run_config.json')


def write_file(file_path, data):
if os.path.exists(file_path):
os.remove(file_path)
f = open(file_path, "a")
f.write(json.dumps(data, indent=2))
f.close()


def set_overrides(override):
with open(run_config, mode='r') as fid:
data = json.load(fid)

previous_overrides = data["overrides"]
data["overrides"] = override
write_file(run_config, data)
return previous_overrides


previous_overrides = set_overrides(out_file)

def finished():
set_overrides(previous_overrides)
sys.exit(0)


override_list = [
{
"name": "sizes",
"iterate": [{"ncols": col, "nrows": row} for col in [6] for row in [4]]
},
{
"name": "clusters",
"iterate": [{"thumb_style": c} for c in clusters]
},
# {
# "name": "switch_holes",
# "iterate": [{"switch_file": f"file:switch_holes\\{style}.json"} for style in ["notch"]]
# },
# {
# "name": "row_options",
# "iterate": [{"ncols": col, "nrows": row, "full_last_rows": full} for col in [6, 7] for row in [5, 6] for full in [False, True]]
# },
]

def write_config(top_dir, overrides):
config = json.loads(json_template)
for key in overrides:
config[key] = overrides[key]
rows = config["nrows"]
cols = config["ncols"]
if rows == 3:
config["centerrow_offset"] = 2
elif rows == 4:
config["centerrow_offset"] = 2.5
plate = config["plate_style"]
thumb = config["thumb_style"]
row_name = "standard"
if config["full_last_rows"]:
row_name = "full"
if config["all_last_rows"]:
row_name = "all"
name = str(rows) + "x" + str(cols) + "_" + plate + "_" + thumb + "_rows_" + row_name
config["save_dir"] = os.path.join(gen_dir, top_dir)
config["overrides"] = out_file
config["save_name"] = name
write_file(out_file + '.json', config)

# def write_config(rows, cols, engine, thumb1, plate, last_rows):
# config = json.loads(json_template)
# name = str(rows) + "_x_" + str(cols) + "_" + plate + "_" + last_rows + "_" + thumb1
# config["save_dir"] = os.path.join(gen_dir, str(rows) + "_x_" + str(cols), plate, last_rows)
# print("Generating: ", name)
# config["overrides"] = out_file
# config["save_name"] = name
# config["override_name"] = thumb1
# config["engine"] = engine
# config["nrows"] = rows
# config["ncols"] = cols
# config["plate_style"] = "NUB" if plate == "normal" else "HS_NUB"
# config["thumb_style"] = thumb1
# config["other_thumb"] = thumb1
# config["full_last_rows"] = True if last_rows == "full" else False
# config["ball_side"] = "both"
#
# write_file(out_file + '.json', config)


for v in override_list:
name = v["name"]
it = v["iterate"]
for config in it:
write_config(name, config)
dactyl_manuform.make_dactyl()


finished()


Empty file added src/clusters/__init__.py
Empty file.
Loading