Skip to content

feat: generate In1_Cu and In2_Cu gerber files for 4-layer boards#84

Closed
fancierbread7-ctrl wants to merge 1 commit into
tscircuit:mainfrom
fancierbread7-ctrl:fix/4-layer-inner-copper-gerbers
Closed

feat: generate In1_Cu and In2_Cu gerber files for 4-layer boards#84
fancierbread7-ctrl wants to merge 1 commit into
tscircuit:mainfrom
fancierbread7-ctrl:fix/4-layer-inner-copper-gerbers

Conversation

@fancierbread7-ctrl

Copy link
Copy Markdown

Closes #78\n\nFixes 4-layer boards silently exporting as 2-layer. Now generates In1_Cu and In2_Cu gerber files for inner copper layers.

4-layer boards with traces on inner1/inner2 layers were silently
dropped from gerber output — only F_Cu and B_Cu were emitted.

Changes:
- GerberLayerName: add string index signature to allow In1_Cu...In4_Cu
- getGerberLayerName: map inner1-inner4 layer refs to In1_-In4_ prefixes
- getCommandHeaders: add inner1-inner4 FileFunction entries (Copper,L2,Inr etc.)
- getAllTraceWidths: collect trace widths for inner layers too
- defineAperturesForLayer: resolve correct layer ref for inner glayer names
- index.ts: detect used inner layers, initialize and render them

Fixes tscircuit#78

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@seveibar

seveibar commented May 3, 2026

Copy link
Copy Markdown
Contributor

Cc @imrishabh18

@seveibar

seveibar commented May 3, 2026

Copy link
Copy Markdown
Contributor

This is a pretty serious bug if we dont support 4 layer-

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.

4-layer boards silently export as 2-layer (no In1_Cu / In2_Cu gerbers)

2 participants