Commit Graph

71 Commits

Author SHA1 Message Date
Jon Evans 49a91414d7 PNS: Apply co-linear seg merging to drag operations 2021-04-11 22:32:11 -04:00
Jon Evans a26fc6d65d PNS: Fix several issues with arc dragging
Do not merge vertices that belong to different arcs
Fix start segment identification after arcs
Fix free-angle drag after arc

Fixes https://gitlab.com/kicad/code/kicad/-/issues/8173
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8150
2021-04-11 17:56:40 -04:00
Jon Evans c9040a5c53 PNS: fix some weirdness identified by PVS 2021-04-07 23:16:56 -04:00
Jeff Young 8be213e36f Trim includes (and use consistent terminology in error messages). 2021-03-21 20:15:47 +00:00
Wayne Stambaugh 79a9d69ff5 Coverity fixes for issues 314755, 316287, 324536, 324539, and 324539. 2021-03-02 08:10:37 -05:00
Tomasz Wlostowski 87ea540953 Fix whitespace errors 2021-02-25 17:18:23 +01:00
Tomasz Wlostowski c79610e132 router: post-rebase fixes 2021-02-25 17:18:23 +01:00
Marek Roszko 6948cdd8ef router: Fix return type within pointInside2 2021-02-25 17:18:23 +01:00
Tomasz Wlostowski 045d02f818 router: add strict/loose area restriction constraint. WIP 2021-02-25 17:18:23 +01:00
Tomasz Wlostowski 0306d16748 router: make post-drag optimization less intrusive
Fixes: #5918
2021-02-25 17:18:23 +01:00
Tomasz Wlostowski 14ce7a0ad7 router: implement area constraint in optimizer 2021-02-25 17:18:23 +01:00
Marek Roszko 6fce39607e Fix return type within pointInside2 2021-02-20 11:58:55 -05:00
Jon Evans 8901e71fc8 PNS: Fix loop removal, make walkaround less broken for arcs 2021-01-05 17:57:21 -05:00
Jeff Young d24b034cbc Cleanup (and a minor performance improvement). 2021-01-04 22:32:29 +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
Jon Evans 79502a0d88 PNS: A new approach to arc placement
Fixes https://gitlab.com/kicad/code/kicad/-/issues/6334
2020-12-30 18:23:24 -05:00
Jon Evans 689da3794d PNS: Merge co-linear segments during placement 2020-12-29 21:14:36 -05:00
Jon Evans 4c0aa6db1a PNS: Disable smart pads optimization for vias
There is not much point with the current algorithm and it
breaks auto-posture.
2020-12-29 21:14:36 -05:00
Jon Evans 81d4e06f00 PNS: Consider pad orientation when routing
PNS: Skip smart pads when posture was manually forced

This allows a more-correct pad breakout to be chosen when
smart pads is off.
2020-12-29 01:06:46 -05:00
Jon Evans 3adff647a7 PNS: Preserve nearest vertex when dragging in shove mode 2020-12-28 19:44:39 -05:00
Jon Evans 912657dd23 Component dragger: make relaxed segment pickup work for PTH pads 2020-12-22 22:43:44 -05:00
Werni 0e44f5128c Add const specifiers 2020-11-18 19:50:36 +00:00
Tomasz Wlostowski 9bef95418e router: wip on less intrusive dragged trace optimization 2020-10-09 00:01:26 +02:00
Mark Roszko a28a0e14ba Fix conversion warnings 2020-10-05 10:41:14 +00:00
Wayne Stambaugh ede39780e2 Remove all debugging output that cannot be disabled.
The use of printf, wxLogDebug, and std::err/std::out causes excessive
debugging output which makes finding specific debugging messages more
difficult than it needs to be.

There is still some debugging output in test code that really needs to
be moved into a unit test.

Add debugging output section to the coding policy regarding debugging
output.
2020-08-18 10:17:36 -04:00
Tomasz Wlostowski fd07e94760 router: abstract segment links into a LINK_HOLDER interface. DIFF_PAIRS are now also linkable 2020-07-22 17:04:42 +02:00
Ian McInerney 450107e453 Remove if statement with duplicated branches in router 2020-07-22 00:18:30 +01:00
jean-pierre charras ffe0b4aba1 Fix a few Coverity warnings. 2020-04-02 14:21:09 +02:00
jean-pierre charras e811101567 fix a few Coverity warnings. 2020-04-01 09:34:44 +02:00
Tomasz Wlostowski 77478014d8 router: kill some warnings in OPTIMIZER 2020-02-28 23:17:15 +01:00
Tomasz Wlostowski 4525a17076 router: backspace key to undo last fixed segment(s) 2020-02-27 22:02:56 +01:00
Tomasz Wlostowski cf4945afaa router: optimizer should now handle 'keep vertex' constraint correctly... 2020-02-27 22:02:56 +01:00
Tomasz Wlostowski 53c3f95ac4 router: initial attempt at walkaround mode for dragger 2020-02-27 22:02:56 +01:00
Tomasz Wlostowski c0314dbb29 router: dragger can now optimize also the segment being dragged 2020-02-27 22:02:56 +01:00
Tomasz Wlostowski 6b767d50c3 router: initial support for user-provided constraints for the optimizer 2020-02-27 22:02:56 +01:00
Seth Hillbrand 8c19b4b6ae pcbnew: Adding arcs to PNS
This is allows ARCs in tracks to be synchronized with
the PNS router.  Note this does not yet include the UI components
to route curved traces
2020-02-21 16:11:41 -08:00
Seth Hillbrand 52bfdb9703 PNS: Assume the current line is a base before optimizing
We use the cost of the current line before trying to improve the pad
breakout cost when optimizing the smart pads

Fixes #3759 | https://gitlab.com/kicad/code/kicad/issues/3759
2020-01-12 11:08:46 -08: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 eb3d32f967 SHAPE_LINE_CHAIN: Unify constructors
Keeps the multi element SHAPE_LINE_CHAIN constructors in a single
routine using std::vector and implicit construction.
2019-12-12 13:54:48 +00:00
Seth Hillbrand 133772e964 pcbnew: Correct optimizer breakout calculation
The previous fix for optimizer breakout length calculation was providing
better scores to longer traces rather than longer breakouts as intended.

This limits the length scoring to breakout only.
2019-10-25 11:18:16 -07:00
Seth Hillbrand 03d5bf0df5 PNS: Check that we are optimizing a pad
Vias are also sent to breakout optimizer, so we need to check for the
solid cast before dereference.

Fixes: lp:1841057
* https://bugs.launchpad.net/kicad/+bug/1841057
2019-08-22 08:57:19 -07:00
Seth Hillbrand 06cb21cc47 pcbnew: Optimize pad connection revision
This modifies that logic for optimizing pad connections.

1) Custom pads now prefer the connections to their longer side.  This is
particularly important to match the behavior in a rectangular pad
2) Costs for straight lines are non-zero.  This favors fewer connections
3) Custom pad breakouts are at the polygon boundary rather than offset
by 0.1mm.  This also matches the circular and rectangular paradigm.
4) Line Heads contained in the pad itself are not optimized.  This
prevents escaping the pad unnecessarily

Fixes: lp:1824182
* https://bugs.launchpad.net/kicad/+bug/1824182
2019-08-20 19:35:26 -07:00
Jeff Young 79934a327e Implement shoving of free vias.
Also contains a little bit of cleanup and a lot of commenting.

Fixes: lp:1833216
* https://bugs.launchpad.net/kicad/+bug/1833216

Fixes: lp:1833214
* https://bugs.launchpad.net/kicad/+bug/1833214
2019-07-24 09:33:47 -06:00
Seth Hillbrand 9648584827 Adjusting the breakout optimizer for custom pads
Rather than using the center of the bounding box, we keep the start
track on the custom pad's connection pad when optimizing the breakout.
2018-05-04 08:23:20 -07: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
Jeff Young 93999f7af6 Change "Automatic neckdown" to "Optimize pad connections".
Fixes: lp:1485202
* https://bugs.launchpad.net/kicad/+bug/1485202
2018-02-15 17:02:44 +01:00
decimad 4770be0920 Make the segment-ref container a true member of PNS::LINE
improve const correctness
return segment container by ref
change client code accordingly
2016-09-06 16:06:06 +02:00
decimad 6c749e0ba8 Remove PNS_ prefix from most types inside namespace PNS 2016-09-06 16:06:06 +02:00
decimad 4cf44d9725 Rename pns item kind constants in preparation for renaming pns classes 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