Commit Graph

1362 Commits

Author SHA1 Message Date
Alex 82874daf08 router: Limit the amount of move attempts in ROUTER::Finish
Otherwise auto-finish hangs in some cases.
2022-12-07 19:24:13 +03:00
Alex 008704fc6f router: Allow highlighting both DP nets when routing. 2022-12-06 05:24:23 +03:00
Alex 90ad4dcc05 router: Various bugfixes in length tuning meandering
- When fine-tuning, keep adjust to the original baseline length
- Enforce a minimum amplitude based on settings, DP gap and track width
- Use binary search to fine-tune amplitude if the length is not trivial
- Account for inequalities in balancing
- Don't add the meander if adding it with min. amplitude will make the
  tuning worse
- Keep a distance after meandering end to prevent overlaps in DP

Fixes https://gitlab.com/kicad/code/kicad/issues/9267
Fixes https://gitlab.com/kicad/code/kicad/issues/1776
2022-12-04 16:30:00 +00:00
Alex e56064696b router: Refactor m_padToDieLength out of meander placer base. 2022-12-02 01:03:34 +03:00
Alex 1aa05c0e10 router: Fix up single meander side switching. 2022-12-01 18:39:19 +03:00
Alex 7dbdb68730 router: ADDED option to create single-sided meanders. 2022-11-30 20:39:02 +00:00
Jon Evans 7a9467b0d5 Get rid of some gcc warnings 2022-11-24 17:05:58 -05:00
Jeff Young 226529235c Mostly const safety, but also performance opt. by avoiding shared_ptr overhead. 2022-11-22 12:21:30 +00:00
Tomasz Wlostowski 24c271d508 router: GetUpdatedItems() now returns an unique_ptr to the temporary NODE so that the items it owns do not get deleted upon return from the method 2022-11-18 15:14:33 +01:00
Tomasz Wlostowski 644c76b9c6 router: follow up via force propagation interface changes in the via DRAGGER 2022-11-18 15:14:09 +01:00
Tomasz Wlostowski dcfb35f002 router: more resilient via force propagation 2022-11-18 15:14:09 +01:00
Alex 3dea146488 router: Clear rule resolver caches on routing/dragging start.
Fixes https://gitlab.com/kicad/code/kicad/issues/12907
2022-11-17 02:10:21 +05:00
Alex 3f790d9dae Revert "router: Disable writing clearance cache for items in local variables."
This reverts commit 6d71f27500.

Caused a performance drop in walkaround mode.
2022-11-17 02:10:20 +05:00
Alex 6d71f27500 router: Disable writing clearance cache for items in local variables.
Fixes https://gitlab.com/kicad/code/kicad/issues/12907
2022-11-16 21:19:56 +05:00
Tomasz Wlostowski 26a38797c7 router: log and replay the 'unfix' events too 2022-11-15 23:05:53 +01:00
Tomasz Wlostowski b507c44d74 router: fix regression in Backspace (unfix/undo last segment) caused by redesign of the line placement algo
Fixes https://gitlab.com/kicad/code/kicad/-/issues/12835
2022-11-15 23:05:53 +01:00
Jeff Young 9724f6e736 Don't allow zone filling during other editing operations.
It's a very heavy op, and is likely to violate all manner of
assumptions the other ops make.

Fixes https://gitlab.com/kicad/code/kicad/issues/12736
2022-11-14 23:39:49 +00:00
Alex 126914859a Use correct pad to die lengths in DP length tuner.
Fixes https://gitlab.com/kicad/code/kicad/issues/12859
2022-11-13 21:07:09 +00:00
Alex 348c3d4216 Fix an incorrect calculation in length tuning tools.
MEANDER_PLACER_BASE::lineLength wasn't calculating the length correctly
when starting and ending pads were on different layers.

Naturally, now jointA corresponds to the start of the path, jointB to the end.

Fixes https://gitlab.com/kicad/code/kicad/issues/12881
2022-11-12 13:11:27 +00:00
Jeff Young 63f937db85 Don't use drag origin for real drag events.
Fixes https://gitlab.com/kicad/code/kicad/issues/12763
2022-11-09 13:09:31 +00:00
Jeff Young a03799c61e Don't mark collisions on dragged items, only things they collide with.
Fixes https://gitlab.com/kicad/code/kicad/issues/8965
2022-11-05 21:54:33 +00:00
Tomasz Wlostowski a0105efc0c router: major rewrite of shove/walkaround single line placement. An attempt to fix most router blockages/non-45 stray segments and simplar stuff. Also adds a ton of debug geometry cruft.
fixes: 12258
fixes: 12067
fixes: 10807
fixes: 10632
2022-10-31 11:38:31 +01:00
Tomasz Wlostowski 70bca1b2d5 router: allow caller to override the 'safety' length limit in WALKAROUND 2022-10-31 11:17:32 +01:00
Tomasz Wlostowski 363d606503 router: improved heuristics in via force propagation algorithm 2022-10-31 11:17:32 +01:00
Tomasz Wlostowski 1ddabd4eaf router: some extra debug geometry dumps in SHOVE 2022-10-31 11:17:32 +01:00
Tomasz Wlostowski 165b5257e8 router: temporaily disable upper corner count limit constraint in the OPTIMIZER which prevents almost any optimization of shoved lines 2022-10-31 11:17:32 +01:00
Tomasz Wlostowski e80bdf934a router: add via force propagation iteration limit as a user-controllable parameter in ROUTING_SETTINGS 2022-10-31 11:17:32 +01:00
Tomasz Wlostowski 247922ca2d router: LINE::SetShape() should update the attached via position with the last point of the new line shape 2022-10-31 11:17:32 +01:00
Tomasz Wlostowski 3e67b42efd router: fix another corner case in LINE::Walkaround 2022-10-31 11:17:31 +01:00
Tomasz Wlostowski 65507e7186 router: extend dump format to support automatic regressions tests of interactive routing scenarios 2022-10-31 11:17:31 +01:00
Jeff Young 01b4c20c94 Router only owns message panel when routing.
Also fixes a pair of copy/paste error not caught earlier.

Fixes https://gitlab.com/kicad/code/kicad/issues/12780
2022-10-28 22:51:43 +01:00
Jeff Young c026c3af7b Fix typo.
Fixes https://gitlab.com/kicad/code/kicad/issues/12753
2022-10-25 18:28:31 +01:00
Jeff Young 5fe5534822 Clean up layer handling and normalize to remove magic numbers.
Fixes https://gitlab.com/kicad/code/kicad/issues/12747
2022-10-25 12:31:47 +01:00
Jeff Young 2dec37f806 We must check clearance on all layers of multi-layer items.
(One layer may have a custom rule.)

Fixes https://gitlab.com/kicad/code/kicad/issues/12733
2022-10-24 00:14:12 +01:00
Jeff Young d16b23d16e Name shortening and line-break reduction. 2022-10-21 18:41:39 +01:00
Jeff Young 6fd195c389 Use comma to separate diff pair nets/netclassse rather than /.
("/" is problematic because it's more likely to appear in netnames.)

Fixes https://gitlab.com/kicad/code/kicad/issues/12592
2022-10-21 00:05:11 +01:00
Jeff Young e3842514e7 Move courtyard collision setting to preferences.
Also cleans up PCBNew/FPEditor edit options panel to be more in sync
with each other.
2022-10-19 11:33:11 +01:00
Jeff Young 413fd82813 Re-entrancy guard for router tool.
Fixes https://gitlab.com/kicad/code/kicad/issues/12604
2022-10-17 13:21:07 +01:00
Jeff Young 3e53426b6c Use same ratsnest colours in the router as the rest of KiCad. 2022-10-16 22:21:14 +01:00
Jeff Young 6357c83a8c Debug code to try and catch Undo/SyncWorld mismatch.
Fixes https://gitlab.com/kicad/code/kicad/issues/12640
2022-10-14 13:25:25 +01:00
Jeff Young 07d9671126 Repair unbalanced UndoRedoBlock call. 2022-10-14 11:44:04 +01:00
Jeff Young b01bf081d8 Cleanup. 2022-10-14 11:12:25 +01:00
Jeff Young de5980b92e Share more of the courtyard collision highlighting code. 2022-10-14 10:42:07 +01:00
Jeff Young 11dc5424cb Pull interactive courtyard checker out of move tool to share with router.
Fixes https://gitlab.com/kicad/code/kicad/issues/12594
2022-10-14 00:48:37 +01:00
Jeff Young 3090363cd5 Copy via flags down to the level the router consumes.
Fixes https://gitlab.com/kicad/code/kicad/issues/12591
2022-10-13 17:41:42 +01:00
Jeff Young 08260661b8 Force flashing when generating SOLIDs.
We only have a single SOLID per pad, so the solid's shape must always
be the flashed shape and then we can do layer-specific flashing tests
internally.

Fixes https://gitlab.com/kicad/code/kicad/issues/12458
2022-10-13 13:05:51 +01:00
Jeff Young b2f05c758b We don't always have a line when dragging.
Fixes https://gitlab.com/kicad/code/kicad/issues/12612
2022-10-10 11:44:17 +01:00
Jeff Young ea6fb84351 Formatting. 2022-10-10 11:44:17 +01:00
Jeff Young d6f1d5da76 Start-routing list needs to be a white list, not a black list.
We check the collisions later in the same routine, which is where all
the black-listed objects come in.

Fixes https://gitlab.com/kicad/code/kicad/issues/12595
2022-10-07 18:18:02 +01:00
Jeff Young bc58480e24 Missed some other uses of m_startItem in previous commit.
Fixes https://gitlab.com/kicad/code/kicad/issues/12592
2022-10-07 14:01:46 +01:00