12 Commits

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