Emit file-format silkscreen layer names from the generator - #37
Closed
Cimos wants to merge 1 commit into
Closed
Conversation
The generator hard-coded ?.Silkscreen and F./B.Silkscreen, so all eight generated files carried the bug from #33. Those are Board Setup display names. A .kicad_dru layer name resolves against the file-format name (F.SilkS, always present) plus the board's current layer name, which equals F.Silkscreen only while the board keeps KiCad's default. Board importers overwrite it, and boards written before KiCad 6 load with the file-format name showing. On those the name does not resolve, and KiCad rejects the whole rule file. Generated files regenerated to match. generate_dru.py --check and lint_dru.py both pass. Refs #33
Owner
Author
|
Superseded by the move. The generator work from #32 is being re-opened against kicad-druid, and this fix goes with it rather than landing on a branch of a retiring repo. Closing. |
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.
Applies the #33 fix to the generator, so this branch stops carrying the bug into the files it emits.
What was wrong
tools/generate_dru.pyhard-coded?.Silkscreenin the two Legend layer clauses andF./B.Silkscreenin the Pad to Silkscreen condition, so all eight generated.kicad_drufiles shipped both faults.Those are Board Setup display names. A
.kicad_drulayer name resolves against the file-format name (F.SilkS, always present) plus the board's current layer name, which equalsF.Silkscreenonly while the board keeps KiCad's default. Board importers — Altium, Eagle, EasyEDA, CADSTAR, Fabmaster — write the source tool's naming in, and any.kicad_pcbolder than file version 20200922 (KiCad 5.1 and earlier) loads with the file-format name showing. On those boards the name does not resolve.In a
(layer ...)clause that makes KiCad reject the entire rule file, so every generated rule silently reverts to KiCad defaults. In the Pad to Silkscreen condition it fails with no message anywhere (#34).What changed
Three strings in
tools/generate_dru.py, plus the eight generated files regenerated to match. No values changed — this is the layer name only.generate_dru.py --checkpasses (generated output in sync with the TOML) andlint_dru.pypasses. Grepped the branch afterwards: noSilkscreenspelling survives outside the two rule titles, which are prose.Why this branch and not main
Branched off this branch's head so it lands with the generator work rather than conflicting with it. The same fix for the hand-maintained files on
mainis in a separate PR.Not a version regression — the layer names are identical in KiCad 7, 8, 9, 10 and master. Verified by running DRC on KiCad 9.0.6 and 10.0.5.
Refs #33
Refs #34