19 Commits

Author SHA1 Message Date
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