Introduce the concept of a DRC_PROVIDER which allows
to separate the various DRC functions to their own
areas. This allows, amongst other things, a slimmer core
DRC class, and allows DRC functions to be separately testable.
The courtyard DRCs (overlap, missing and malformed)
are the first victims, so instrumentation can be added to this function.
Add some unit tests on this DRC function, as well a few re-usable PCB-based
utility functions in a library (qa_pcbnew_utils) that could be shared between
unit tests and other utilities.
This separates the "newMarker" functions from the DRC class. These
are moved to a new class, DRC_MARKER_FACTORY, which is now responsible for
constructing suitable markers from BOARD_ITEMS.
The reasons for this are:
1) Allow DRC related functions to access theese functions without having
to bake these functions into the main DRC class.
2) Thereby simplify the DRC class interface
3) As DRC_MARKER is now a small class with public interfaces, it's
possible to put unit tests on these functions.
The motivation here is to allow to start to split out pieces of DRC
into separate classes.
This adds a check for contiguous board outlines to the DRC. It also
uses the calculated outline to ensure that traces are not crossing the
outlines.
Fixes: lp:1648055
* https://bugs.launchpad.net/kicad/+bug/1648055
Also move courtyard testing flags to BoardSettings API. Both are
still stored in the config until we decide where they go in order
to prevent prematurely disturbing the board file format.
Fixes: lp:684067
* https://bugs.launchpad.net/kicad/+bug/684067
(cherry picked from commit 5399f60)
The old item pointers (which aren't safe to keep around) were
removed in favour of opaque references (void*) which are then
compared against existing items when needed.
Also improves brightening by brightening the whole footprint
(ie: its pads, drawings, reference and value) rather than just
its target cross.
(cherry picked from commit 30e90b0)
It was broken by commit c78171d01f.
During creation, the Drc must only display a error message, and do not create markers.
Markers are created only during a full board DRC test.
commit c78171d01f replaced this behavior by a incorrect one (create markers and do not show error messages)
It looks like D_GLIBCXX_ASSERTIONS=ON activated on some Linux versions creates too zealous tests at run time.
This patch just calculate the same pointer value using a slightly different formula.
Fix also a hard-to-understand comment
Fixes: lp:1770414
https://bugs.launchpad.net/kicad/+bug/1770414
Make refilling zones during DRC optional to prevent the board from being
changed by changes in the polygon filling. Default to off to prevent
changes by default.
Fixes lp:1721547
https://bugs.launchpad.net/kicad/+bug/1721547