8 Commits

Author SHA1 Message Date
Jeff Young
9856cb2210 An arbitrary layer flip can not be done without the board.
(User-defined layers can be sided or not.)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20169
2025-03-05 17:59:22 +00:00
Seth Hillbrand
6c2a559cbe Set base user layer count
Default colors cycle through repetition for unknown layers.  Allows
importing from complex Altium/CADSTAR boards with more than 10
documentation layers
2025-01-28 12:22:39 -08:00
Seth Hillbrand
0b2d4d4879 Revise Copyright statement to align with TLF
Recommendation is to avoid using the year nomenclature as this
information is already encoded in the git repo.  Avoids needing to
repeatly update.

Also updates AUTHORS.txt from current repo with contributor names
2025-01-01 14:12:04 -08:00
Seth Hillbrand
5e0abadb23 Reorganize layer numbering
F_Cu = 0
B_Cu = 2
Remaining internal copper layers are even and incrementing

Non-copper layers are odd and incrementing.

This means that we can no longer do things like:
for( PCB_LAYER_ID layer = F_Cu; layer <= B_Cu; ++layer)
Instead, we have the class LAYER_RANGE:
for( PCB_LAYER_ID layer : LAYER_RANGE( F_Cu, B_Cu) )

Similarly, gt/lt tests should not refer to the integer value of the
layer.  We have functions such as IsCopperLayer to test whether a layer
is copper or not.

When using the connectivity RTree, the third dimension is layer, so we
provide B_Cu with the special INT_MAX value, ensuring that elements
between F_Cu and B_Cu will be identified.  There is a new, special
function GetBoardLayer() for interfacing with CN_ITEMS

Similarly, PNS layers remain unchanged and sequential.  A set of
interface functions is provided to map PNS layers to Board layers and
back.  This allows the PNS_LAYER_RANGE to function as expected
2024-09-06 23:07:58 +00:00
Alex Shvartzkop
5f5e54f3d8 Fix QA for 60-bit LSET. 2024-07-23 21:50:04 +03:00
Alex Shvartzkop
e2bd76bdce Fix OOB access in LSET when opening a PCB file or updating from schematic.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18422
2024-07-23 01:41:01 +03:00
Seth Hillbrand
7ecde84a94 Move LSET to new BASE_SET class
Next step in large layer refactoring.  Added multiple unit tests as well
to check behavior
2024-07-17 10:32:09 -07:00
Seth Hillbrand
5db4d10c86 Add some LSET QA 2024-07-16 18:11:29 -07:00