Skip to content

Commit 0ec5fb1

Browse files
committed
[Fixed][KiCad 9] User.N layer numbering
Fixes #808
1 parent 3ad3f80 commit 0ec5fb1

3 files changed

Lines changed: 53 additions & 36 deletions

File tree

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

77

8+
## [1.8.5] - UNRELEASED
9+
### Fixed
10+
- User.N layer numbering. I.e. pcb_print issues with their numbering (#808)
11+
12+
813
## [1.8.4] - 2025-04-03
914
### Added
1015
- Support for the broken API in KiCad 9.0.1

docs/source/Changelog.rst

Lines changed: 46 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,15 @@ Changelog <https://keepachangelog.com/en/1.0.0/>`__, and this project
1313
adheres to `Semantic
1414
Versioning <https://semver.org/spec/v2.0.0.html>`__.
1515

16+
[1.8.5] - UNRELEASED
17+
--------------------
18+
19+
Fixed
20+
~~~~~
21+
22+
- User.N layer numbering. I.e. pcb_print issues with their numbering
23+
(#808)
24+
1625
[1.8.4] - 2025-04-03
1726
--------------------
1827

@@ -35,6 +44,8 @@ Added
3544
- ``Footprint Full`` virtual field for the ``LIB:FOOTPRINT`` name
3645
- ``kicad_dnp_applied`` option to overwrite the global option
3746

47+
.. _fixed-1:
48+
3849
Fixed
3950
~~~~~
4051

@@ -189,7 +200,7 @@ Added
189200

190201
- Default font for KiCad 9 (#691)
191202

192-
.. _fixed-1:
203+
.. _fixed-2:
193204

194205
Fixed
195206
~~~~~
@@ -289,7 +300,7 @@ Added
289300
- ``copy_vias_on_mask`` option to workaround KiCad’s bug 18991 (See
290301
#703 and #704)
291302

292-
.. _fixed-2:
303+
.. _fixed-3:
293304

294305
Fixed
295306
~~~~~
@@ -338,7 +349,7 @@ Changed
338349
[1.8.1] - 2024-09-25
339350
--------------------
340351

341-
.. _fixed-3:
352+
.. _fixed-4:
342353

343354
Fixed
344355
~~~~~
@@ -419,7 +430,7 @@ Added
419430

420431
- Support for panels repeating the same component (See #656)
421432

422-
.. _fixed-4:
433+
.. _fixed-5:
423434

424435
Fixed:
425436
~~~~~~
@@ -573,7 +584,7 @@ Added
573584
- Added options to control Eco1/Eco2/Drawings individually on KiCad
574585
8 (#614)
575586

576-
.. _fixed-5:
587+
.. _fixed-6:
577588

578589
Fixed
579590
~~~~~
@@ -643,7 +654,7 @@ Changed
643654
- BoardView: Skip footprints with no pads (not just REF**)
644655
(whitequark/kicad-boardview#14)
645656

646-
.. _fixed-6:
657+
.. _fixed-7:
647658

648659
Fixed
649660
~~~~~
@@ -863,7 +874,7 @@ Changed
863874
- When *check_zone_fills* is enabled now we do a refill for the
864875
boards
865876

866-
.. _fixed-7:
877+
.. _fixed-8:
867878

868879
Fixed
869880
~~~~~
@@ -1081,7 +1092,7 @@ Changed
10811092
- JLCPCB_stencil: Is now just like JLCPCB. The only difference is the
10821093
added layers.
10831094

1084-
.. _fixed-8:
1095+
.. _fixed-9:
10851096

10861097
Fixed
10871098
~~~~~
@@ -1191,7 +1202,7 @@ Added
11911202

11921203
- Option to use the auxiliary origin as reference. (#420)
11931204

1194-
.. _fixed-9:
1205+
.. _fixed-10:
11951206

11961207
Fixed
11971208
~~~~~
@@ -1278,7 +1289,7 @@ Added
12781289
- ``cross_using_kicad`` global option to use KiCad to cross DNP
12791290
components in the schematic. Enabled by default.
12801291

1281-
.. _fixed-10:
1292+
.. _fixed-11:
12821293

12831294
Fixed
12841295
~~~~~
@@ -1412,7 +1423,7 @@ Added
14121423
[1.5.1] - 2022-12-16
14131424
--------------------
14141425

1415-
.. _fixed-11:
1426+
.. _fixed-12:
14161427

14171428
Fixed
14181429
~~~~~
@@ -1499,7 +1510,7 @@ Changed
14991510

15001511
- loss tangent decimals, added one more.
15011512

1502-
.. _fixed-12:
1513+
.. _fixed-13:
15031514

15041515
Fixed
15051516
~~~~~
@@ -1609,7 +1620,7 @@ Added
16091620

16101621
- Position: option to set the resolution for floating values (#314)
16111622

1612-
.. _fixed-13:
1623+
.. _fixed-14:
16131624

16141625
Fixed
16151626
~~~~~
@@ -1699,7 +1710,7 @@ Added
16991710

17001711
- Installation checker: option to show the tool paths.
17011712

1702-
.. _fixed-14:
1713+
.. _fixed-15:
17031714

17041715
Fixed
17051716
~~~~~
@@ -1783,7 +1794,7 @@ Added
17831794
- GitHub discussions are now enabled. Comment about your KiBot
17841795
experience `here <https://github.com/INTI-CMNB/KiBot/discussions>`__
17851796

1786-
.. _fixed-15:
1797+
.. _fixed-16:
17871798

17881799
Fixed
17891800
~~~~~
@@ -1831,7 +1842,7 @@ Added
18311842
- Pattern and text variables expansion in the title (#198)
18321843
- Customizable extra info after the title (#199)
18331844

1834-
.. _fixed-16:
1845+
.. _fixed-17:
18351846

18361847
Fixed
18371848
~~~~~
@@ -1979,7 +1990,7 @@ Changed
19791990
- The default output pattern now includes the ``output_id`` (%I)
19801991
- The ``source`` path for ``compress`` now has pattern expansion (#152)
19811992

1982-
.. _fixed-17:
1993+
.. _fixed-18:
19831994

19841995
Fixed
19851996
~~~~~
@@ -2061,7 +2072,7 @@ Changed
20612072
- Reference ranges of two elements no longer represented as ranges.
20622073
Examples: “R1-R2” is now “R1 R2”, “R1-R3” remains unchanged.
20632074

2064-
.. _fixed-18:
2075+
.. _fixed-19:
20652076

20662077
Fixed
20672078
~~~~~
@@ -2093,7 +2104,7 @@ Added
20932104
[0.10.0-4] - 2021-02-16
20942105
-----------------------
20952106

2096-
.. _fixed-19:
2107+
.. _fixed-20:
20972108

20982109
Fixed
20992110
~~~~~
@@ -2105,7 +2116,7 @@ Fixed
21052116
[0.10.0-3] - 2021-02-16
21062117
-----------------------
21072118

2108-
.. _fixed-20:
2119+
.. _fixed-21:
21092120

21102121
Fixed
21112122
~~~~~
@@ -2117,7 +2128,7 @@ Fixed
21172128
[0.10.0-2] - 2021-02-12
21182129
-----------------------
21192130

2120-
.. _fixed-21:
2131+
.. _fixed-22:
21212132

21222133
Fixed
21232134
~~~~~
@@ -2175,7 +2186,7 @@ Changed
21752186
and error messages still use stderr.
21762187
- Now InteractiveHtmlBom can be installed just as a plugin.
21772188

2178-
.. _fixed-22:
2189+
.. _fixed-23:
21792190

21802191
Fixed
21812192
~~~~~
@@ -2216,7 +2227,7 @@ Changed
22162227
- Position files in CSV format quotes only the columns that could
22172228
contain an space. Just like KiCad does.
22182229

2219-
.. _fixed-23:
2230+
.. _fixed-24:
22202231

22212232
Fixed
22222233
~~~~~
@@ -2238,7 +2249,7 @@ Added
22382249
- Internal BoM HTML: highlight cell when hover.
22392250
- Internal BoM HTML: allow to jump to REF of row number using anchors.
22402251

2241-
.. _fixed-24:
2252+
.. _fixed-25:
22422253

22432254
Fixed
22442255
~~~~~
@@ -2264,7 +2275,7 @@ Added
22642275
- Columns in position files can be selected, renamed and sorted as you
22652276
like.
22662277

2267-
.. _fixed-25:
2278+
.. _fixed-26:
22682279

22692280
Fixed
22702281
~~~~~
@@ -2307,7 +2318,7 @@ Added
23072318
- Default output file name format and default variant can be specified
23082319
from the command line.
23092320

2310-
.. _fixed-26:
2321+
.. _fixed-27:
23112322

23122323
Fixed
23132324
~~~~~
@@ -2329,7 +2340,7 @@ Changed
23292340
creating the internal BoM. They are usually mistakes that prevents
23302341
grouping components.
23312342

2332-
.. _fixed-27:
2343+
.. _fixed-28:
23332344

23342345
Fixed
23352346
~~~~~
@@ -2360,7 +2371,7 @@ Changed
23602371

23612372
- Incorporated mcpy, no longer a dependency.
23622373

2363-
.. _fixed-28:
2374+
.. _fixed-29:
23642375

23652376
Fixed
23662377
~~~~~
@@ -2496,7 +2507,7 @@ Added
24962507
- variants_blacklist
24972508
- dnp_field
24982509

2499-
.. _fixed-29:
2510+
.. _fixed-30:
25002511

25012512
Fixed
25022513
~~~~~
@@ -2540,7 +2551,7 @@ Changed
25402551
missing or corrupted.
25412552
- The ‘check_zone_fills’ option is now independent of ‘run_drc’
25422553

2543-
.. _fixed-30:
2554+
.. _fixed-31:
25442555

25452556
Fixed
25462557
~~~~~
@@ -2560,7 +2571,7 @@ Added
25602571
- Tolerate config files without outputs
25612572
- Mechanism to filter ERC/DRC errors
25622573

2563-
.. _fixed-31:
2574+
.. _fixed-32:
25642575

25652576
Fixed
25662577
~~~~~
@@ -2580,7 +2591,7 @@ Changed
25802591

25812592
- Now kicad-automation-scripts 1.3.1 or newer is needed.
25822593

2583-
.. _fixed-32:
2594+
.. _fixed-33:
25842595

25852596
Fixed
25862597
~~~~~
@@ -2605,7 +2616,7 @@ Added
26052616
[0.2.2] - 2020-04-20
26062617
--------------------
26072618

2608-
.. _fixed-33:
2619+
.. _fixed-34:
26092620

26102621
Fixed
26112622
~~~~~
@@ -2618,7 +2629,7 @@ Fixed
26182629
[0.2.1] - 2020-04-18
26192630
--------------------
26202631

2621-
.. _fixed-34:
2632+
.. _fixed-35:
26222633

26232634
Fixed
26242635
~~~~~
@@ -2649,7 +2660,7 @@ Added
26492660
- Progress information
26502661
- –version option
26512662

2652-
.. _fixed-35:
2663+
.. _fixed-36:
26532664

26542665
Fixed
26552666
~~~~~

kibot/layer.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,9 +398,10 @@ def id2def_name(id):
398398
Layer.DEFAULT_LAYER_DESC[name] = 'Inner layer '+str(i)
399399
if GS.ki6:
400400
# Add all the User.N layers
401+
step = 2 if GS.ki9 else 1
401402
for i in range(1, 10):
402403
name = 'User.'+str(i)
403-
Layer.DEFAULT_LAYER_NAMES[name] = pcbnew.User_1+i-1
404+
Layer.DEFAULT_LAYER_NAMES[name] = pcbnew.User_1+(i-1)*step
404405
Layer.DEFAULT_LAYER_DESC[name] = 'User layer '+str(i)
405406
Layer.ID_2_DEFAULT_NAME = {v: k for k, v in Layer.DEFAULT_LAYER_NAMES.items()}
406407
for k, v in Layer.KICAD6_RENAME.items():

0 commit comments

Comments
 (0)