UI was getting out of sync with router and they could be on different
layers. There was also some confusion about whether previous layer was
the opposite of next layer (-1/+1 to current layer), or effectively a
back button for the current layer.
Using PnS router, when trying to create a blind/buried or micro via with layer
selection with no track in progress, the router crashed because the starting
layer was not defined.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19750
There are two netclass name methods, which previously were not
obvious in their uses. These have been renamed to now have:
GetName() : Used for internal or tooling (e.g. netlist export) usage
GetHumanReadableName() : Used for display to users (e.g. in infobars)
Fixing the previous unclear naming will result in fewer bugs
when users start using the multiple netclass functionality, as
the incorrect usage had started creeping in to new code. Also this
will help authors of new code select the correct name method.
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
Edge cuts, margin, and copper shapes need to be included
in the dragged item set
Shapes on the edge cut layer need to be painted with
their original width, but this has to be done by setting
the width on the router shape, not by re-cloning the
parent shape, because the router may now be moving that
shape.
Footprint drag position calculation needs to act only
on pad SOLIDs, not on any SOLID
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19280
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.
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
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().
- Changes BOX2 size to extended coordinates.
- Adds BOX2ISafe to construct a BOX2I that will fit in int32.
- Adds more checks.
- Safer computations.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17670
This was originally added to facilitate
https://bugs.launchpad.net/kicad/+bug/1777688 but the concern there was
that the layer kept changing when stopping on a via. We currently have
double-click as the force-finish option and the layer reverts to the
original layer on which you were routing. This should handle the
operation concern while still preserving shift as the modifier for grid
options
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15828