The distance from any point in the negative quadrant to
std::numeric_limits::max will be larger than std::numeric_limits::max,
meaning that if we take the square of this value, we will overflow the
extended_type. Overflows are undefined behavior when dealing with
signed integers (c.f. C99 §3.4.3/1) so while most compilers retain a
positive value, Apple, in release mode, overflows into the sign bit,
resulting in a negative number for the squared distance.
This prevented us from displaying certain shapes in the negative
quadrant on MacOS, only in release mode builds
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19424
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
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
When an arc has a very small curvature, we should not waste time with
the arc collision mode and instead just use the segment collision as it
is effectively the same result
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19422
By adding points to holes as we go, we leave ourselves open
to adding invalid (<3 point) holes to the polygons. This causes
crashes if it happens, so we should never allow it to happen.
Instead of building holes in-place, construct them externally
and only add them if they are valid.
This probably wouldn't actually happen for a valid Fabmaster
file, but if it did, it would be bad new, and we shouldn't leave
crashable pathways facing user input.
Remove option "use Clipper1" (now outdated) on all platforms.
Use of advanced config created the issue, so it is just disabled on msys2.
Should not change anything on other platforms.
If we are checking a point that is inline with multiple segments, we
were counting both the entry and exit as crossings, leading to points
inside a polygon being registered as outside. Changing the conditional
to only catch one crossing as required.
Adds a QA check to ensure that this remains fixed
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18377
It looks like the new variant (with aMaxError) behaves in a subtly different way, resulting in router hiccups.
This needs more in-depth investigation, but for the moment, the older function does the job.
Change number of segments of circles to be multiples of 8 and start rotated by delta/2. This ensures that segments will be aligned to a 45°/90° grid
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18654
Edge cases can happen where point + clearance is larger than the bbox.
This can cause the zOrder min and max to get switched as max get a high
bit and is negative. Clamping to limit the input values and using
uint32 for the output solves the corner case
When zone kisses happen from different polygons, we need to be careful
not to use the different polygons for ear comparisons or prev/next
pointers
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18654
Come up with a plausible default chamfer size, rather
than prompting every time with a modal (and then you have
to handle when the chanfer doesn't fit). This could be
changed if it's more annoying this way. But if we had
proper edge-dragging in zones, probably would be better
than setting a chanfer manually.
Also fix the GetNeighbourIndexes which seems to have
always been broken (but is not actually used by anything at
present).
Relates-To: https://gitlab.com/kicad/code/kicad/-/issues/16771
This tells you the arguments when it fails.
BOOST_TEST is available in all our Boost.Test version.
Even if you didn't use it, these calls should have been
BOOST_TEST_EQUAL(A, B) which also tells you the
arguments on a test failure.
This makes it easier to see which pins have alt modes
available. There is an option to turn them off.
The icon positions are chosen so they they shouldn't
interfere as far as possible:
* If the text is inside, the icon goes more inside
the body
* If the text is above/below the pin, it goes away from
the body
This means it won't collide with a symbol wall in
most cases, but some symbols with alt pins on opposing
sides may need to be widened if the icons are show.
Includes a rather fiddly refactor of the SCH_PIN painter
function, which needs quite a lot of massaging to allow
it to figure out where an icon would go. Quite a bit
of logic is broken out into smaller encapsulations with
less visible state to each chunk.
Icon modes for base-name-selected and alt-selected are
included, but only the former works due to information
being thrown away during the SCH_PAINTER tempPin
process.
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/11069
Break the non-PCB-specfic parts of PCB_REFERENCE_IMAGE out
to a common REFERENCE_IMAGE class, which is then composed into
the PCB_REFERENCE_IMAGE. This will make it easier to bring the
transform origin logic to eeschema without repetition.
This has always been possible (especially through the properties
panel with large scales), but it's even easier if the transform
origin is near a manipulated corner.
Check and reject scales that result in an overflowed image box.
There was a gentle mish-mash of booleans, some with
true being left/right and some up/down, and some functions that
can flip in both axes (which is never actually done, and doesn't
really make geometric sense).
Replace all this with the FLIP_DIRECTION enum class, which makes
the intention completely unambiguous.
This also then allows a small scattering of simplifications,
because everything takes the same type and you don't have to
fiddle booleans to fit.