- Implements component classes for placement rule areas and multichannel tool
- Implements property inspector properties for rule areas
- Fixes some zone member default initialisation issues
- Gates all multichannel-related imlpementation with existing adv config flag
- Removes rule area type enum, replaces with inference from keepout and
placement settings
When (key + and - ) switching to next/previous layer before any usage of
the PNS router, Pcbnew crashed, likely due to incorrect value (perhaps
missing init) of the PNS_KICAD_IFACE (m_iface) m_board member.
So ensure this member is up to date before using it in ROUTER TOOL events.
CHANGED: PCB file format now supports saving/loading complex padstacks
CHANGED: PTH pads are now rendered per copper layer in the copper color;
the PTH pad color is no longer used.
ADDED: support for importing complex pad stacks from Altium PCBs
Enforce padstack-aware access to pad properties across KiCad
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8182
IsCopperLayer( int aLayer ) can be ::IsCopperLayer( int aLayer ) or
PNS_KICAD_IFACE_BASE::IsCopperLayer( int aLayer ) in pns_kicad_iface.cpp
This is error prone.
So, to avoid mistakes, PNS_KICAD_IFACE_BASE uses now 2 functions:
- IsPNSCopperLayer( int aPNSLayer )
- IsKicadCopperLayer( PCB_LAYER_ID aPcbnewLayer )
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18800
Need to be very careful when translating between PNS layers and board
layers. PNS layers are linear while board layers are not, so reaching
into the view will return a board layer (maybe we should proxy this
through the iface?)
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18708
PNS<->Board layer interface needs clear boundaries about where we are
using board layers (with the alternating numbers) and PNS layers which
are sequential and all copper
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
TOOL_MENU::m_menu was unconditionally created by the TOOL_INTERACTIVE constructor, resulting in crashes if
we wanted to run the TOOLs in headless mode, e.g. in unit tests. This commits makes
the creation of the menu object dependent on Pgm::IsGui().
Snapping happens to elements on copper layers but edge cuts is only
_virtually_ on copper layers. We need to set its routable flag off to
ensure we don't force-snap to the snap points
(cherry picked from commit c248993a843da28d4bfe367f8e74eb40637297c2)