Skip to content

fix(core): skip EasyEDA layer 0 graphics in footprint conversion - #6

Open
hhhpark wants to merge 1 commit into
l3wi:mainfrom
hhhpark:fix/skip-easyeda-layer-0
Open

hhhpark wants to merge 1 commit into
l3wi:mainfrom
hhhpark:fix/skip-easyeda-layer-0

Conversation

@hhhpark

@hhhpark hhhpark commented Sep 25, 2026

Copy link
Copy Markdown

Problem

jlc-cli install C114407 (STM32H743XIH6, TFBGA-265) fails with:

Installation failed: Cannot convert graphics on unsupported layer 0

Root cause

JLC library tooling draws the package body outline (the 14 mm RECT of the TFBGA-265 footprint) on the unassigned EasyEDA layer 0. The footprint converter's KI_LAYERS map has no entry for it, so getLayer(0) throws and aborts the whole installation.

Fix

Treat layer 0 like the other internal EasyEDA documentation layers (99/100/101):

  • new INTERNAL_LAYER_IDS = [0, 99, 100, 101] used by all six graphic generators (TRACK/CIRCLE/ARC/RECT/TEXT/SOLIDREGION) — layer 0 graphics are omitted from the output but still bound the courtyard, consistent with existing doc-layer behavior
  • layer 0 added to the benign-layer list in canSubstituteStandard, so a 2-pad passive with a layer 0 doc graphic can still map to a KiCad built-in footprint

Truly unknown layers keep failing loudly as before.

Testing

  • New regression test: layer 0 graphics are skipped, courtyard still covers them, built-in substitution still works
  • packages/core converter tests: 101 pass; cli + mcp tests: 37 pass; typecheck clean across all packages
  • End-to-end: jlc-cli install C114407 now succeeds and writes the 265-pad TFBGA-265_L14.0-W14.0-P0.80-TL_STM32H743XIH6 footprint to the KiCad library

Includes a changeset (@jlcpcb/core: patch).

JLC library tooling draws package body outlines on the unassigned
EasyEDA layer 0 (e.g. the 14mm outline of TFBGA-265 on C114407),
which aborted installation with "Cannot convert graphics on
unsupported layer 0".

Layer 0 is now treated like the other internal documentation layers
(99/100/101): its graphics are omitted from the footprint output but
still bound the courtyard, and they no longer block substitution with
a KiCad built-in footprint.
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.

1 participant