The old algo worked fine only if the arc "middle point" was on the middle
of the arc. This algo just needs a "middle point" on the arc, not necessary
exactly near the middle of the arc.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21035
If the value is negative, we have likely overflowed the available size
of the integer container. In which case, rather than slowly counting
down, we return the largest logical square root size to allow processing
to continue
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20947
(cherry picked from commit b47bf99632c8faae8855a86a0a30ef233fd594db)
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
In modern Windows code WIN32_LEAN_AND_MEAN should be defined.
Without this define windows.h pulls in some legacy headers, notably
winsocks.h. Modern code that cares about winsocks includes winsocks2.h
which conflicts with winsocks.h. Other code that does not care about
winsocks (OpenGL, fontconfig, ...) includes windows.h pulling in legacy
winsocks.h, causing definition conflicts and build errors.
At worst defining WIN32_LEAN_AND_MEAN requires explicitly including some
additional headers on Windows.
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
This implements the wxWidgets fix for KiCad. We can't wait for distros
to update their wx libs so until then, we'll roll our own.
Nicely, this also implements the MacOS setting that was an ifdef
previously
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19506