fix(export): emit drill files for every plated via layer span in gerbers export - #4354
Open
creationsunitassistant wants to merge 3 commits into
Open
Conversation
…ers export Previously the gerbers export called convertSoupToExcellonDrillCommands once without layer_span, so only the default top-to-bottom span vias were emitted. Every non-default-span via (e.g. F.Cu-In1, In1-B.Cu on 4-layer boards) was silently omitted from the drill files, producing fabrication files with open circuits. Now the export enumerates all distinct plated spans present in the circuit JSON and emits one drill file per span (drill.drl keeps the default top-bottom span; drill_<span>.drl for each non-default span). Fixes tscircuit#4346 Co-authored-by: Claude (Anthropic) <noreply@anthropic.com>
Author
|
Hi! I reproduced this on a 4-layer fixture (3 vias: F.Cu–B.Cu, F.Cu–In1, In1–B.Cu — the same span mix from your repro table) and confirmed only the through vias made it into drill.drl. Fix emits one drill file per span using the converter's existing layer_span option. If there's a bounty attached to this issue, happy to claim it properly — first PR to this repo, aiming to become a regular contributor. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #4346
tsci export --format gerberscalledconvertSoupToExcellonDrillCommandsonce withoutlayer_span, so the converter selected only the default F.Cu–B.Cu span. Everypcb_viawhose span is not top-to-bottom was silently omitted from the drill files — the export exits successfully with no warning, producing fabrication files with open circuits.Fix
Enumerate all distinct plated layer spans present in the circuit JSON (from
pcb_via/pcb_plated_holefrom_layer/to_layer) and emit one drill file per span:drill.drl— unchanged, default top-to-bottom spandrill_top__inner1.drl,drill_inner1__bottom.drl, etc. — one per non-default spanVerification
tests/cli/export/export-gerbers-multi-span-drills.test.ts(passes)bun x tsc --noEmit -p tsconfig.jsoncleanNotes
layer_spanoption already supported by circuit-json-to-gerber — no library changes needed.🤖 This PR was prepared with AI assistance (Claude via Hermes agent). Happy to adjust.