Seth Hillbrand
b73481dd49
Update SHAPE_ARC::IntersectionPoints()
...
Force it to handle a number of edge cases from Arc-Arc collision test.
Unify and simplify the Collide Arc-Arc. Add additional arc collision
QA test
2025-01-14 13:08:45 -08:00
Seth Hillbrand
0b2d4d4879
Revise Copyright statement to align with TLF
...
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
2025-01-01 14:12:04 -08:00
Seth Hillbrand
8724a7da09
Treat straight arcs as segments
...
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
2024-12-30 12:57:21 -08:00
Jon Evans
81efc7778a
Fix bad clearance logic in cecc1a2f
...
(cherry picked from commit a1cd73e73041a7463da175038eccb4619d2edd1d)
Co-authored-by: Jon Evans <jon@craftyjon.com>
2024-05-23 15:21:40 +00:00
Jon Evans
5b3b0ff836
Use true arc collision for segment<>arc
...
Using an approximation here results in different collision
results for segment<>arc than point<>arc, which
can cause odd behavior in the router.
2024-05-23 08:56:10 -04:00
Seth Hillbrand
6b915049d1
Check singular arcs connection
...
Even if there are no other segments in the line chain, we still should
check for arc connections in cases of individual arcs on a line chain
2024-03-22 10:41:42 -07:00
Seth Hillbrand
4e6cd0d293
Forward and reverse test for point in poly collisions
2024-03-18 15:51:14 -07:00
Seth Hillbrand
347c50b26d
Handle issue with alternate SHAPE_LINE_CHAIN
...
SHAPE_LINE_CHAIN_BASE can include things that are not SHAPE_LINE_CHAIN
like the triangle SHAPE_LINE primitive. To check arcs, we need to avoid
these elements as they do not have the full SHAPE_LINE_CHAIN class
available.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17327
2024-03-11 17:21:09 -07:00
Seth Hillbrand
3cc1617f5a
Fix slow selection time when calculating clearance
...
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
2024-03-11 16:32:24 -07:00
Jeff Young
840e4b6f72
Push fix for #14890 down a level.
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15005
2023-06-19 18:05:37 +01:00
Jeff Young
0f8c5a96b2
Support shape collisions between SHAPE_POLY_SET and other shapes.
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14890
2023-06-06 13:40:44 +01:00
Jeff Young
43fa5e957f
Fix shadowed variable warning.
2023-03-10 17:42:36 +00:00
Ian McInerney
5671a123b9
kimath: Fix some warnings
2023-03-10 16:38:35 +00:00
Ian McInerney
9292158c76
kimath: Switch from INT_MAX to std::numeric_limits
2023-03-10 16:38:35 +00:00
Seth Hillbrand
f6d2164cb0
Fix crash in PNS walkaround
...
Placing via in walkaround mode and colliding with an arc triggered an
unneeded assertion.
Also fixes the bad assertion format that did not receive strings
(cherry picked from commit df9cf0a0c39ed99527b0c04e3892e8dd7ed603e7)
2022-07-28 09:40:41 -07:00
Jeff Young
82ebc247b8
More performance enhancements for DRC.
2022-06-18 19:47:11 +01:00
Mike Williams
9d90699358
Shape Assertions: print the correct type names
...
It still asserts, but at least for the right reason.
2022-05-26 15:32:45 -04:00
Wayne Stambaugh
e93b7b05ec
Wide characterize libs and bitmap2component source.
...
(cherry picked from commit 54f91a022120a01861853714d3fd530c7f50de88)
2022-02-09 11:49:58 -05:00
Roberto Fernandez Bautista
0c3da0f072
Implement true arc collisions for arcs inside a SHAPE_LINE_CHAIN
2021-11-15 14:04:37 +00:00
Roberto Fernandez Bautista
eaf8eb284a
Add true arc-to-polyline collisions
2021-08-05 17:45:12 +01:00
Roberto Fernandez Bautista
dd65ce9523
Simplify & move new arc collision code into Kimath library
...
Don't need to check intersections with the circle, just fix the
calculated "projected" point from the end points.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8234
2021-08-05 17:45:12 +01:00
Jeff Young
53a75a4961
Fix actual-clearance handling in arc collision routines.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/8407
2021-06-03 18:33:59 +01:00
Tomasz Wlostowski
87ea540953
Fix whitespace errors
2021-02-25 17:18:23 +01:00
Tomasz Wlostowski
baacb9c85a
geometry: fix MTV calculation for simple polygons
2021-02-25 17:18:23 +01:00
Jon Evans
af4c6393bb
Fix arc collisions to account for width
...
This was causing arcs to be really hard to start routing from
2021-01-02 22:01:05 -05:00
Jeff Young
f08b7f098f
Cleanup.
2020-12-12 15:27:46 +00:00
Jeff Young
807eef1208
Better error reporting to try and catch 6635.
2020-12-12 12:22:52 +00:00
Ian McInerney
be4b6ec06a
Cleanup compiler warnings
2020-12-09 23:13:33 +00:00
Jeff Young
54dc91a623
Account for segment width in aActual calculation.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/5990
2020-10-14 15:56:32 +01:00
Jeff Young
18a3c4c1db
Fix some fairly catastrophic bugs in shape collision optimization.
...
I did a little too much copy & paste last time around....
2020-10-05 22:32:07 +01:00
Jeff Young
8dd7777108
Handle closed shape-line-chain with circle collisions.
2020-10-04 19:40:18 +01:00
Jeff Young
f9cfd31351
0 is always a collision (whether clearance is 0 or not).
2020-10-04 13:21:01 +01:00
Jeff Young
f4f578b755
Add closed-shape handling to SHAPE_LINE_CHAIN collision routines.
2020-10-04 13:21:01 +01:00
Jeff Young
bf67648562
Support optional location reporting in SHAPE collisions.
...
Also fixes a few bugs in the collision routines.
2020-09-28 23:28:33 +01:00
Jeff Young
d402d93487
Implement shape routines for DIMENSION_Ts.
...
This allows them to participate in DRC and PNS.
Fixes https://gitlab.com/kicad/code/kicad/issues/5712
2020-09-19 14:16:00 +01:00
Tomasz Wlostowski
74623b8c98
geometry: derive SHAPE_LINE_CHAIN, SHAPE_SIMPLE and SHAPE_POLY_SET::TRIANGULATED_POLYGON::TRI from a common base class allowing to simplify collision detection
2020-09-08 01:31:42 +02:00
Tomasz Wlostowski
eb6e1c4f90
geometry: handle collisions of null shapes
2020-09-08 01:31:42 +02:00
Tomasz Wlostowski
747f2eb948
kimath: fix MTV and actual clearance calculation for SHAPE_COMPOUNDs
2020-07-29 23:14:03 +02:00
Tomasz Wlostowski
48f87dedc9
Implement collisions for SHAPE_COMPOUND
2020-07-29 23:14:03 +02:00
Tomasz Wlostowski
b03044d3d1
kimath/geometry: starting with SHAPE_COMPOUND
2020-07-29 23:14:03 +02:00
Jeff Young
5bc6389477
Comments.
2020-07-05 19:53:04 +01:00
Jeff Young
2cfd6ba978
Fix a couple of integer overflows.
2020-07-02 22:52:37 +01:00
Jeff Young
9940931b0f
Fix null dereference in DRC checking.
2020-07-02 22:23:28 +01:00
Jeff Young
eb1ff80d57
SHAPE collision fixes.
...
1) An actual distance of 0 is still a collision, even if the allowed
distance is 0.
2) Be consitent about edges and interiors. Everyone expect the edge
of a RECT to be part of the RECT; same with a CIRCLE. SHAPE_POLY_SET
shouldn't be any different. (And SHAPE_LINE_CHAIN was a split-
personality with the edge considered part of it for Collide() but not
for PointInside()).
2020-07-02 21:38:37 +01:00
Jeff Young
441dfa30f0
Return individual custom pad shapes instead of a SHAPE_POLY_SET.
...
Also implements an optional pointer to return the actual distance
from all the SHAPE collision routines.
Fixes https://gitlab.com/kicad/code/kicad/issues/4774
2020-07-02 17:09:15 +01:00
Jeff Young
a56191b658
Add distances to a bunch of DRC violation reports.
2020-05-01 18:49:42 +01:00
Ian McInerney
13b6028e1b
Refactor all math into a new kimath library
...
* Split up the thirdparty code into the thirdparty folder (#3637 )
* Create a new kimath static library containing all the math functions
This is part of cleaning the build system for #1906 .
2020-01-07 17:12:59 +00:00