Also fixes a bug in GetFirstLayer() where we were checking
m_layerSet.size() (which is always 60) rather than
m_layerSet.count() (which is the number of set layers).
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15233
Also adds the layer name to the "thermal connection incomplete" DRC
error message.
Also improves zone layer description to not say "X and 1 more" (which
takes as much room as saying "X and Y").
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15279
When working in high contrast mode, we want to be able to select a
footprint with only elements in, e.g. silk and fab layers.
The previous design for footprint IsOnLayer had one behavior of every
other element and a different behavior for footprints. This leads to
multiple bugs as new features use the overloaded IsOnLayer expecting it
to report if the element exists on a layer or not.
For footprints, we need a different routine to determine whether or not
to select the footprint when clicking on it. IsOnLayer will report if
the footprint has any elements on a specific layer but we don't want to
use the bbox for a hittest because large footprints with through hole
pads will exist on every layer and have an enormous bbox. Instead, we
filter footprints based on the hittest of each element. This behaves in
a more logical fashion, allowing you to select a footprint by clicking
on a visible element of that footprint.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15284
1) Also reorders parameters to make sure the compiler helps out.
2) This also makes it harder to mess up the discrepency between
BOX2I/wxRECT/etc::Inflate() and SHAPE_POLY_SET::Inflate.
3) Also fixes a couple of bugs where the corner strategy was passed
in as a segCount.
4) Also fixes a couple of bugs where the error wasn't forced to the
outside to match the ERROR_LOCATION.
5) Also fixes a couple of bugs where the seg count was specified
without regard to an already passed-in max deviation
Change teardrop generation to rely more heavily on BOARD_CONNECTIVITY
for improved performance.
Add updating of teardrops on BOARD_COMMIT::Push().
Also converts m_CopperItemRTreeCache to std::shared_ptr.
We don't copy it around anyway, and having to create a new set
of std::unique_ptr's for each operation is likely to be more
expensive than std::shared_ptr's overhead.
Also removes a bunch of "wxEmptyString" where it was degrading readability.
Also fixes a bug where footprint zones were getting sorted incorrectly
due to rotation of coordinates.
Fixes https://gitlab.com/kicad/code/kicad/issues/14322
The logic to handle divots needs to account for fully nested, same net
zones. The process of subtracting led to us considering the inner zone
to be a zone knock-out (negative polygon). To avoid this, we need to
check if the inner, higher priority zone has any connection to the outer
zone. If it does not, then we can treat it as an isolated zone without
worrying about divots to the outer zone.
We can't fill lower-priority zones until the higher-priority ones
have been tesselated, and as the tesselation step always gets pushed
to the back of the queue after the fill finishes having them sorted
by priority accomplishes little. (We're also going to push all other
layers of the high-priority zone to the back as the first layer will
have the lock, further degrading the usefulness of sorting.)
Also adds some debugging to try to catch dangling pointers.
Also adds a cache for group bounding boxes (which will be expensive
to calculate for large groups).
Fixes https://gitlab.com/kicad/code/kicad/issues/12875