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

Use combineSubtraction to cutout overlapping sections #12

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jridgewell
Copy link

@jridgewell jridgewell commented Jan 9, 2025

This uses a makerjs's combineSubtraction API to combine the overlapping cutouts into a single path. Eg, [[{x:-1,w:2},""]] (a 2u stabilizer key) with Cherry MX Spec cutouts goes from:

cutouts before PR

to:

cutouts after PR

This allows the generated DXF file to be imported back into Kicad to generate PCB cutouts.


I also fixed #10. There was a type confusion when trying to parse the JSON, a keyboard with a single row looks like a JSON file and we tried to iterate each key as if it were a row.

@jridgewell jridgewell changed the title Use combineIntersection to cutout overlapping sections Use combineSubtraction to cutout overlapping sections Jan 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fails when only one line switch plate
1 participant