Commit Graph

31 Commits

Author SHA1 Message Date
Jon Evans 3747369aaa PNS: Remove offsets from hull generation
This is likely an old workaround to numerical precision issues
in the DRC system that no longer exist.  Removing this is necessary
for "exact" hull generation to produce walkaround results that
look nice (paths falling exactly on the grid lines)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/10710

(cherry picked from commit 5d4e2aa595)
2022-06-04 00:04:03 -04:00
Jeff Young b2e3f03222 More wide-string declarations. 2022-02-05 22:03:04 +00:00
Jeff Young 3c0b10b022 Don't use approximated shapes for router hulls.
We only do 45-degree routing anyway so we might as well build an
octagonal-based hull from the get-go.

Fixes https://gitlab.com/kicad/code/kicad/issues/7672

Fixes https://gitlab.com/kicad/code/kicad/issues/9544

Fixes https://gitlab.com/kicad/code/kicad/issues/9833
2021-12-01 19:44:30 +00:00
Jon Evans 63718323bc PNS: Holes need to be moved with solids
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9773
2021-11-25 15:31:18 -05:00
Jeff Young 0dfb5fcaf9 Error message cleanup.
wxString::Format is redundant in a wxLogXXX call.
Error messages should generally be translatable.
Error messages should use generally consistent sentence forms.
2021-06-26 22:53:24 +01:00
Seth Hillbrand d4edc70f65 Remove magic numbers where possible
Constant scales will be pre-calculated during compilation, so we can
leave the actual formula in place without penalty
2021-06-07 13:56:31 -07:00
Jon Evans be61bf29dd Use more accurate hull shapes for round solids
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8561
2021-06-06 09:53:51 -04:00
Marek Roszko cf2bb5692a Remove the wxLog calls from math/util.h for now
This was leaking windows headers and partial wx headers to 1084 compilation units......
This also means math/util.h is leaking to 1084 compilation units which seems a bit high too.
2021-06-01 18:44:22 -04:00
Jon Evans 132ec37b56 Handle arc in buildHullForPrimitiveShape
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8008
2021-03-25 21:25:30 -04:00
Jeff Young d24b034cbc Cleanup (and a minor performance improvement). 2021-01-04 22:32:29 +00:00
Jeff Young 2ea6bc5529 Formatting. 2021-01-04 19:19:55 +00:00
Jeff Young ecc0e861d3 Implement hole clearance and hole-to-hole clearance in router.
Fixes https://gitlab.com/kicad/code/kicad/issues/6882
2021-01-01 00:31:36 +00:00
Tomasz Wlostowski eb8287ded8 router: bring back legacy GetEffectivePolygon() for complex pad shapes (more info in comments) 2020-10-07 16:36:37 +02:00
Seth Hillbrand adff7f749b PNS: Addition layer smarts
Edge.Cuts have no parent but cross all layers, so we need to handle the
"all layers" case.  Also renames "IsPadOnLayer" to "IsOnLayer".

Fixes https://gitlab.com/kicad/code/kicad/issues/5351
2020-08-25 09:42:50 -07:00
Seth Hillbrand 4cc820f550 PNS: skip hulls for layers where the solid isn't
If we don't have an object on the required layer and there isn't a
through-hole (m_alternateShape), then we shouldn't return a hull

Fixes https://gitlab.com/kicad/code/kicad/issues/5233
2020-08-18 06:53:03 -07:00
Seth Hillbrand afc94fdec3 PNS: Be better about handling multiple layers
Rather than adding pads/vias multiple times for each layer, we introduce
the "alternate shape" idiom to PNS that allows us to optionally place
the collision constraint on the hole instead of the pad for those
vias/pads that have inner layers removed.

Fixes https://gitlab.com/kicad/code/kicad/issues/5158

Fixes https://gitlab.com/kicad/code/kicad/issues/5198

Fixes https://gitlab.com/kicad/code/kicad/issues/5195
2020-08-16 12:39:15 -07:00
Tomasz Wlostowski 796aec6e6e router: SOLID::SetPos() should update the shape position too 2020-02-28 23:17:15 +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
Seth Hillbrand b2c4519c2c Setting custom pad shape to be outline for PNS
Changes SHAPE_CONVEX to SHAPE_SIMPLE to better reflect the limitations.
Changes SHAPE_LINE_CHAIN::PointInside calculation to allow points
strictly inside a line chain

Fixes: lp:1768862
* https://bugs.launchpad.net/kicad/+bug/1768862
2018-05-04 08:23:20 -07:00
decimad 6c749e0ba8 Remove PNS_ prefix from most types inside namespace PNS 2016-09-06 16:06:06 +02:00
decimad de6281e977 Move PNS router code into namespace PNS
update copyright messages
2016-09-06 16:06:06 +02:00
Maciej Suminski 766da1e494 Code formatting. 2015-07-02 16:11:15 +02:00
Mathias Grimmberger 7724c581fd router: support for non-90 degree pad orientations 2015-07-02 16:09:43 +02:00
Tomasz Wlostowski e6dd016cb2 router: improve rounding error handling in hull calculation 2015-07-02 16:09:29 +02:00
Maciej Suminski 4fb9bce354 Code formatting. 2015-02-18 17:53:46 +01:00
Maciej Suminski ad1b138f28 Reformatted PNS code to conform the coding policy. 2014-05-16 13:37:31 +02:00
Tomasz Włostowski 061660e9e4 Long-awaited new version of the P&S router 2014-05-14 15:53:54 +02:00
Dick Hollenbeck 53e04ce7a6 cvpcb was not filtering on the current library when USE_FP_LIB_TABLE.
<%s> being replaced with '%s' because the former in invisible in html panels.
Cure some compiler warnings.
2013-10-31 16:30:57 -05:00
Maciej Suminski 0ac3e1fbf2 Namespace KiGfx->KIGFX.
template<> -> template <>
Some more reformatting according to uncrustify results.
2013-10-14 16:13:35 +02:00
Maciej Sumiński 5598acb617 Uncrustifying push&shove router 2013-09-26 23:53:54 +02:00
tomasz.wlostowski@cern.ch db62d672d2 Initial version of the P&S router. Buggy and crappy. 2013-09-18 19:55:16 +02:00