mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2024-11-22 05:55:03 +00:00
5e0abadb23
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
22 lines
1.0 KiB
Plaintext
22 lines
1.0 KiB
Plaintext
MIT License
|
|
|
|
Copyright (c) 2019 Maxime Pinard
|
|
|
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
of this software and associated documentation files (the "Software"), to deal
|
|
in the Software without restriction, including without limitation the rights
|
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
copies of the Software, and to permit persons to whom the Software is
|
|
furnished to do so, subject to the following conditions:
|
|
|
|
The above copyright notice and this permission notice shall be included in all
|
|
copies or substantial portions of the Software.
|
|
|
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
SOFTWARE.
|