First, fix the error limit check in drc_test_provider_edge_clearance.
Then, we rotate the final point incorrectly in SHAPE_ARC::Collide (need
negative angle). We were not checking this result in the QA, so add the
proper tests
(cherry picked from commit 9bedb6eedb8295ea309ff447c48cb53ac028ada5)
Prevent the file formatter from writing and the file parser from loading
symbol pin alternates that have an empty name or when the alternate name
is the same as the default pin name. Apparently at some point they were
able to be created and saved.
Do not allow SCH_PIN::SetAlt() to set an alternate name when the name
does not exist in the library symbol pin alternate list. This required
fixing the associated QA test.
When updating or changing schematic symbols from library, reset the pin
alternate to the default when the alternate no longer exists in the
symbol.
Do not populate pin alternates context menu with duplicate default pin.
Clear orphaned pin alternates to the default when saving symbols from
symbol editor.
(cherry picked from commit d16d2f5a5b1897b0fa3f4e797ff9b9a3a246c09a)
Each knockout can be approximated, and each knockout
will have m_ExtraClearance added. If a neck is
between two knockouts, it will be 2X the above
values narrower than expected.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20361
(cherry picked from commit 96522c4113a8c799393fe057daa01fa86375793a)
The arc center is a pseudo coordinate which is calculated for drawing
purposes. This mid point is fixed unless the arc is modified which
should result in more reliable arc parity footprint library DRC testing.
Also change EDA_SHAPE::Compare() to use the arc mid point.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15917
(cherry picked from commit 11edaa6e4a256d69bc2f65240b9a7bc54daa481e)
Need to test nearest point from the circle center to the arc. Add QA to
prevent regression
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20336
(cherry picked from commit de09403b10244d368fbe9a8f52f6b4c73abedc4e)
We use IN for INCH as units, but IN is defined in a Windows header
(cherry picked from commit b0fe4df3c565027801cbbac56c6ee0da254bd74a)
(cherry picked from commit 0acdabd1eb1a2d5ab9b6aa9f71df31c8cf088de8)
(cherry picked from commit eaa1e6d59464e8356d24afd1d29148335010f67a)
Import/read previously-hidden symbol/footprint
text items as hidden fields.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19875
(cherry picked from commit 5edae8250d0bebb08ea4fd71a392f889895d6f7d)
When building a net tie, all elements in the footprint that belong to
the net tie can be arbitrarily close to one another. outside of the
footprint, connected items can be arbitrarily close to the tie element
but must respect the clearance values for elements that have nets
assigned to them
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19933
(cherry picked from commit bff819edb08e3d303c695b79f990374d259e4d0a)
Not sure what it is that caused it to break (reported by
Seth on Linux, but works for me and on the CI).
Rather than trying to be clever at this point, just do the dumb
thing (and remove the boost_test_print_type for wxSize to prevent
someone using it for the time being).
The m_imageData buffer in the BITMAP_BASE is an
internal implementation - the public API to persist the
data to a stream appears to be SaveImageData - so use that,
which hides the implementation (and generates the image data
"live" when needed).
Remove the public access to the m_imageData buffer as it isn't
needed for public use, and also is misleading.
Also break out the formatting of the data into KICAD_FORMAT,
as it's currently replicated in eeschema/pcb/pagelayout
formatting code.
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/19772
This means that you can run just a single case from the command line,
for example:
`qa_pcbnew -t DRCCopperSliver/_0`
The case is also automatically printed as context.
This means that when isolating a specific defect in one case,
you can run only that one case, which is useful under debuggers
and also when using slow tools like valgrind.
Not all possibe tests are doing this, but they're easy to do
when needed (i.e. when you want to run just one case)
This is not only a useful place to hang regression tests,
but also allows to catch defects specific to loading or
saving footprints.
For example, it would catch:
Relates-To: https://gitlab.com/kicad/code/kicad/-/issues/19713
We still conflate the fieldID, the position in the
array of fields, and whether or not that means the
field is mandatory. But this attempts to clean up
*some* of that, without introducing too much risk.
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.
Handle arcs properly even when not exactly concentric. Properly check
for interfering elements that would prevent coupling. Avoiding those
that are directly connected
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17967