Commit Graph

154 Commits

Author SHA1 Message Date
Seth Hillbrand faba2b06c2 Lock track width after placing segment
We don't want to allow the full track width to change after placing a
segment when we are in follow-segment mode. This would require either
ripping up and re-solving the existing track or allowing potential DRC
errors.

Fixes https://gitlab.com/kicad/code/kicad/issues/9395
2021-10-14 09:21:14 -07:00
Seth Hillbrand 35e90d0cf4 Allow changing router mode while routing
Keeps shove active even when not using to allow switching modes during
routing.

Fixes https://gitlab.com/kicad/code/kicad/issues/9342
2021-10-12 09:55:34 -07:00
Seth Hillbrand 7f1247a23c Update track width when changed
Tracks starting from pads should change in response to the track width
changing despite having the "follow existing track" width selected.
2021-10-12 09:55:34 -07:00
Tomasz Wlostowski a03b6f6fc9 router: use tail start point when saving the FIXED_TAIL
fixes: https://gitlab.com/kicad/code/kicad/-/issues/8771
2021-08-25 00:36:34 +02:00
Wayne Stambaugh 78e5e98ea0 Pass VECTOR2I objects by reference instead of on the stack. 2021-07-27 08:41:27 -04:00
Jon Evans e61b1f03b8 PNS: Discard duplicate tracks in FixRoute
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8737
2021-07-13 21:13:40 -04:00
Jon Evans 00f1b609c4 PNS: Don't run fanout cleanup when manually forced
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8724
2021-07-08 19:56:42 -04:00
Wayne Stambaugh 65c7958293 Coverity issue fixes.
Issues #331869, #331875, #332203, #332159, #332171, #332180, and #332648.
2021-07-08 08:33:08 -04:00
Roberto Fernandez Bautista c3051ba48a Refactor SHAPE_LINE_CHAIN to allow two shapes per point
m_shapes now has two possible indices. The first one is populated if
the point is associated with an arc and the second index is populated
if the point is shared between two arcs.
2021-07-03 19:37:50 +00:00
jean-pierre charras 740b028180 pns_line_placer: do not constraint the 45deg of current segment in free angle mode.
Fixes #8691
https://gitlab.com/kicad/code/kicad/issues/8691
2021-07-01 16:38:31 +02:00
Jon Evans a7eb611744 Fix leftover vias in shove mode
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8597
2021-06-23 22:13:35 -04:00
Jon Evans 75ce97e260 Fix the last cause of duplicate segments when completing a route
Fixes https://gitlab.com/kicad/code/kicad/-/issues/6863
2021-06-07 20:34:09 -04:00
Jon Evans 49c5130123 PNS: Implement final cleanup pass for redundant colinear segs
Fixes https://gitlab.com/kicad/code/kicad/-/issues/6863
2021-06-06 21:52:35 -04:00
Jon Evans 3c6b98a0d5 PNS: preserve auto-detected track width when changing via sizes
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8046
2021-06-06 20:18:09 -04:00
Jon Evans 6cb8154ec0 PNS: Remove code that broke width changes during placement
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8334
2021-06-06 19:21:52 -04:00
Jon Evans 6789dac20b PNS: Keep most recent good placement around for a rainy day
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8562
2021-06-06 18:56:33 -04:00
Jon Evans d32b9c1c25 Use debug group for line placer debug 2021-06-06 15:44:53 -04:00
Tomasz Wlostowski ab04e24f9a router: rhMarkObstacles should return a correct error status
Long story short: a few days ago I fixed error handling in routeStep(), so it actually started to recognize the wrong error status returned
by rhMarkObstacles() and think that the trace is always incorrect.

fixes: https://gitlab.com/kicad/code/kicad/-/issues/8557
2021-06-04 23:58:56 +02: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
Tomasz Wlostowski 614787caae router: clear head line geometry if current head routing failed + small improvement to follow-mouse optimization.
Also added a lot of verbosity for the pns-log-viewer tool.

Fixes: 8511
2021-05-31 00:18:42 +02:00
Tomasz Wlostowski fcb89b99a3 router: walkaround algo should not copy the previous via position when the current iteration via placement fails.
fixes: 7827
2021-05-30 00:35:58 +02:00
Jon Evans bd59da3642 PNS: Local min distance has a minimum points requirement
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8510
2021-05-29 12:40:24 -04:00
Tomasz Wlostowski ebd957b08e router: rework router's debugging infrastructure to be more compatibile with the 'qa/pns/pns-log-viewer' tool.
The log viewer tool lets you inspect all the intermediate stages of the routing algorithms. This patch:
- Adds source location tracking of the debug calls (need to use the PNS_DBG macro, sorry)
- Moves some wxLogTrace calls to DEBUG_DECORATOR::Message() so that messages can be displayed alongside the corresponding geometric shapes
2021-05-29 00:13:24 +02:00
Tomasz Wlostowski 132eb53a40 router: clean some debug clutter 2021-05-29 00:13:24 +02:00
Tomasz Wlostowski e66bbfd1ec router: improve the feel of the walkaround algorithm
Makes walkaround more 'huggy' - the trace being routed sticks to obstacles
instead of jumping around in uncontrollable way.
2021-05-29 00:13:24 +02:00
Tomasz Wlostowski 8c4361bbc6 router: adapt to new SHAPE_LINE_CHAIN::INTERSECTIONS structure 2021-05-29 00:13:24 +02:00
Jon Evans dd828bd964 PNS: Bring back original Highlight Collisions behavior
From discussion with Tom, Jeff, and Wayne, it appears as though
we all agreed that Highlight Collisions should behave like it
did in 5.1, which is to say, always just highlight collisions,
never prevent them.  The Allow DRC Violations checkbox just
controls whether or not you can fix/commit the head line if it
has violations; you are not prevented from moving the head
line to violating positions in any case.

Right now, there does not seem to be much demand for a separate
"Stop at First Obstacle" mode since Walkaround basically does that
but better, but we agreed that if there is demand for it in the
future, it should be implemented as a new router mode rather than
a behavior of Highlight Collisions mode controlled by the Allow
DRC Violations checkbox.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/7828
2021-04-18 21:01:07 -04:00
Jeff Young dc0cf3b802 Clean up a confusing API.
AllowDRCViolations is kept in any mode as a *setting*, but only
controls router behaviour when the mode is mark obstacles.

Fixes https://gitlab.com/kicad/code/kicad/issues/7795
2021-04-10 11:08:02 +01:00
david-beinder df99ee39d9 PNS: new through vias should span all copper layers
Fixes https://gitlab.com/kicad/code/kicad/issues/7576
2021-03-07 17:58:43 +00:00
Wayne Stambaugh 79a9d69ff5 Coverity fixes for issues 314755, 316287, 324536, 324539, and 324539. 2021-03-02 08:10:37 -05:00
Jon Evans d269778cd4 PNS: disable smart pads in walkaround if posture is forced
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7710
2021-02-27 13:48:01 -05:00
Tomasz Wlostowski f84836f51e router: factor out POSTURE_SOLVER to more generic MOUSE_TRAIL_TRACER class 2021-02-25 17:18:23 +01:00
Jon Evans 330d717c69 Fix typo 2021-01-18 21:50:26 -05:00
Jon Evans 111fa99f9f PNS: Use last-segment posture optimization always
Also when auto-posture is enabled, don't flutter
until area threshold has been met.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/6935
2021-01-07 20:12:31 -05:00
Jon Evans 0234b7278a PNS: Make DIRECTION_45 North be up everywhere
Fixes https://gitlab.com/kicad/code/kicad/-/issues/6935
2021-01-06 21:47:06 -05:00
Jon Evans 8619086cf2 PNS: re-enable optimization of colinear segs in lines with arcs 2021-01-05 17:57:21 -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
Jon Evans eba7cb222c PNS: Fix initial posture guess for pads 2021-01-02 10:32:15 -05:00
Jeff Young fc1b0ec11f Improve feedback when routing in highlight collisions mode.
In particular, when Allow DRC violations is NOT turned on and we
bump in to an obstacle.
2021-01-01 17:25:37 +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 73248ab219 PNS: correct initial segment direction for posture solver 2020-12-31 13:05:43 -05:00
Jon Evans 510db66f0e PNS: Fix rollback for arc traces
PNS: Update posture solver after rollback
2020-12-30 18:23:24 -05:00
Jon Evans b5b64a55ad PNS: Only run optimization if lastNode is valid 2020-12-30 18:23:24 -05: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 bf9501e1d4 PNS: Fix auto-posture when placing via 2020-12-29 21:14:36 -05:00
Jon Evans 689da3794d PNS: Merge co-linear segments during placement 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 96d49d1473 PNS: Improved auto-posture when starting from a segment
The previous auto-posture algorithm worked great for pads
but not so great when starting routing from a segment.

Now we can optimize the posture based on the starting
segment if one exists, to maximize the "obtuseness" of the
posture.
2020-12-28 23:51:13 -05:00
Jon Evans c615b7a49b PNS: make initial direction behavior consistent with fix-all enabled 2020-12-27 15:21:55 -05:00