This appears to have always been [-360 .. 360], as some tests in
test_shape_arc.cpp have had negative values for a very long time.
Add tests on the start, end and central angle accessors to enforce
the documented normalizations.
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
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
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
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.
Added Distance(VECTOR2) function that returns a double. Removed
superfluous EuclideanNorm, GetLineLength, integer constructor for
EDA_ANGLE (this promotes to double in the CTOR), DistanceLinePoint and
HitTestPoints
Also extended the size for arc calculations that get distances to center
points to avoid overflow
The clearance between two zones could be rather slow. This was in part
to trying to do triangle-triangle collisions between zones when we only
need outline collision and in part to the shape_line_chain collision
routine. The shape_line_chain collisions don't need to recreate
segments on each iteration and should instead create them once and using
this to check all collisions
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17327
SHAPE_ARC::IntersectLine() fails when one of the arcs start points
is on the center point of the other -- in this case we can't extend
the line to the arc intersection because one point does not define
a line....
Fixes https://gitlab.com/kicad/code/kicad/issues/12609
This also fixes a failure to use the correct effective width for
shapes (which might, for instance, inherit their widths from schematic
defaults, netclasses, etc.).
Fixes https://gitlab.com/kicad/code/kicad/issues/11358
The edge case is when the segment is completely contained inside the arc
(This partially reverts b4835c82085a074c0ee00247504055ee063da963 and
adds the missing test cases)
The arc2segment collision should at also include the arc endpoint projections on the segment being tested. Not sure it covers all possible cases, though.
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/9023