Commit Graph

1437 Commits

Author SHA1 Message Date
Alex 6543d23d9f router: Re-add electrical path lines drawing for length tuning. 2023-02-01 20:36:52 +03:00
Jon Evans 48e4005111 Fix diff pair router checking of min clearance
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13720
2023-01-31 19:53:35 -05:00
Jon Evans 971abcfc1a Fix DP meander placer when tuning from an uncoupled section
Fixes https://gitlab.com/kicad/code/kicad/-/issues/12212
2023-01-28 22:25:46 -05:00
Jeff Young 8268234aa1 Reverse shown-source logic so we report if it's the netclass width.
(whether or not it's *also* the previous track width).
2023-01-27 15:31:02 +00:00
Alex e3fa447f0c router: Remove extra qualification. 2023-01-27 11:56:23 +03:00
Alex 0ff6cb49d6 router: When dragging tracks, don't snap to parts of the original line.
Fixes https://gitlab.com/kicad/code/kicad/issues/10113
2023-01-27 11:06:36 +03:00
Mike Williams a76a4f9788 Router: don't unnecessarily change track widths on layer change
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/13546
2023-01-25 09:34:17 -05:00
Jeff Young 89d434255c Run clearance rules for router status bar.
Fixes https://gitlab.com/kicad/code/kicad/issues/13605
2023-01-20 14:19:58 +00:00
Tomasz Wlostowski 761e754294 router: trying to improve the 'guess posture' algorithm to work well with both fix-all and fix-last-segment on click 2023-01-12 23:37:07 +01:00
Tomasz Wlostowski 65def26b4d router: follow up ROUTER::GetUpdatedItems() API changes in the ROUTER_TOOL 2023-01-12 23:37:07 +01:00
Tomasz Wlostowski d07d6c9a30 router: fix 'Bowen knot'-looking hulls for 0-length segments 2023-01-12 23:37:07 +01:00
Tomasz Wlostowski 0595440d79 router: minor improvements in shove algorithm handling of vias 2023-01-12 23:37:07 +01:00
Tomasz Wlostowski 213d30cad6 router: workaround for assertion fail on NODE::Add(unique_ptr<LINE>) 2023-01-12 23:37:07 +01:00
Tomasz Wlostowski aa7271e55a router: expose the 'head' traces in a separate list for debug logs 2023-01-12 23:37:07 +01:00
Jon Evans c530bdb5a1 Rename GetSelectMenuText to GetItemDescription
This descriptive text is used for many more things than
just the select menu these days.
2023-01-11 22:27:44 -05:00
Alex 95f5d92fc6 Fix length overestimation when first/last line segment enters a pad.
Fixes https://gitlab.com/kicad/code/kicad/issues/13322
2022-12-30 16:27:59 +05:00
Alex 867a2e833d router: Hotglue the debug graphics back to pcbnew. 2022-12-30 14:44:48 +05:00
Jeff Young 4c63b4e061 Class name <-> file name sync. 2022-12-29 18:05:57 +00:00
Tomasz Wlostowski 7d40bbdf38 router: mark the head trace (as opposed to the 'fixed tail') with fully saturated color
Fixes https://gitlab.com/kicad/code/kicad/-/issues/11386
2022-12-29 17:54:59 +01:00
Tomasz Wlostowski dfb1068358 router: improve heuristic to avoid segment drag 'flickery snapping'
Fixes https://gitlab.com/kicad/code/kicad/-/issues/10113
2022-12-29 17:54:31 +01:00
Jon Evans ee0a41e3bc Remove excess calls to SelectedItemsModified
We really don't want to post these events unless the *selected* items
were actually modified, since it results in a redraw of the properties
panel (which disturbs edit state and causes flicker on MSW).

Now the COMMIT system is responsible for sending this event iff the
commit touches items that are selected.

Side note: UpdateMsgPanel is useless on every app except pl_editor, so
it can probably be refactored/removed at some point.
2022-12-26 20:57:58 -05:00
Jeff Young 34e134c5e5 Don't allow clearanceEpsilon to force clearance < 0.
Also, a plated hole has the max clearance of hole_clearance and
copper_clearance.

Fixes https://gitlab.com/kicad/code/kicad/issues/13237
2022-12-24 12:56:41 +00:00
jean-pierre charras 59f0e428fa Fix a PnS router issue doesn't respect knockout texts.
Fixes #13251
https://gitlab.com/kicad/code/kicad/issues/13251
2022-12-23 18:17:44 +01:00
Alex e8f755c665 router: Match segment endpoint calculation between dragger and the tool.
Prevents always picking point A when dragging short segments.
2022-12-21 20:55:49 +03:00
jean-pierre charras 161a1e21f5 PnS router: NPTH can be on copper layers, depending of the pad size and the hole size.
Now: round NPTH with a round hole bigger than the pad are not on a copper layer.
Other pas shapes are seen on copper layers (far from ideal, but reasonable)
Fixes #13214
https://gitlab.com/kicad/code/kicad/issues/13214
2022-12-20 12:50:22 +01:00
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
Jeff Young cbb997a3b5 Use GetCurrentNets(), not m_startItem for message panel updates.
Fixes https://gitlab.com/kicad/code/kicad/issues/12592
2022-10-07 10:34:11 +01:00
Jeff Young 40ad5b6de3 Broaden reset-sizes-after-layer-switch algorithm.
Fixes https://gitlab.com/kicad/code/kicad/issues/12576
2022-10-06 15:50:22 +01:00
Jeff Young d8a3ba7917 Update router sizes when switching layers.
We may have layer-specific rules involved.  Note that at some point
we also need to do something similar on every "fix route" step to
handle area-specific rules.

Fixes https://gitlab.com/kicad/code/kicad/issues/12576
2022-10-05 16:45:42 +01:00
Seth Hillbrand b4f3390626 Drill size is absolute
Use hole plating size for visibility only, not zone filling, routing or
DRC
2022-10-04 09:52:40 -07:00
Jeff Young 7be05e9eb1 Make sure we have nets before grabbing the first.
Fixes https://gitlab.com/kicad/code/kicad/issues/12554
2022-10-01 13:50:26 +01:00
Mike Williams ba6afafc86 Router Tool: get rid of getNearestRatnestAnchor
Unused now that the PNS Router handles the actions that needed it.
2022-09-28 13:29:52 +00:00
Mike Williams 6252840abd PNS/Router Tool: Refactor Continue From End 2022-09-28 13:29:52 +00:00
Mike Williams 1be0deb58f PNS/Router Tool: Refactor Finish Route 2022-09-28 13:29:52 +00:00
Mike Williams b1f2273bc6 PNS: Add CurrentStart() to placers. 2022-09-28 13:29:52 +00:00
Ian McInerney 1683e552f7 Add/fix some variable initializations 2022-09-25 00:48:38 +01:00
Ian McInerney fdb97a46c1 Don't copy items in for loops when not needed 2022-09-24 03:46:06 +01:00
Jeff Young 64a6fc0fd4 Push UNITS_PROVIDER down into a low-level mixin.
This allows us to also construct cheap UNIT_PROVIDERs for specific
tasks when necessary.
2022-09-19 17:10:59 +01:00
Mike Williams 9304607624 TOOL_EVENT: make command string non-optional
We're getting segfaults in places where this isn't checked. Also, add
some asserts so we can catch bad tool push/pop.

Removes all uses of GetCommandStr() and makes it private.
2022-09-19 10:23:09 -04:00
Jeff Young 45d6b4a9fc Readability improvements. 2022-09-19 11:18:20 +01:00
Mark Roszko b00178adb3 Nuke base_units from orbit 2022-09-16 04:38:10 +00:00
Mike Williams 1a023f5dd0 PCB Editor: (Auto)Route Selected (From Other End)
3x Selection-Based Routing Tools. Takes a selection of routable objects
and routes them one at a time individually, with an attempted finish, or
from the other end, depending on the action given.
2022-09-13 15:06:36 +00:00
Mike Williams dc20e24c4a Route Other End: Perform Steps in one Undo Commit 2022-09-13 15:06:36 +00:00
Mike Williams 82f8cd72a3 PNS Router IFACE: Add board commit mode control 2022-09-13 15:06:36 +00:00
Alex cc4e34ef49 Don't sync the world twice in inline router tools.
Activate() already clears and syncs the world via PNS::TOOL_BASE::Reset,
so there's no need to sync in InlineDrag and InlineBreakTrack.
2022-09-10 20:49:30 +00:00
Mike Williams fa3e9efdce PCB Router: return to original active layer after routing
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/12313
2022-09-06 10:51:46 -04:00
Mike Williams 68f71e4a62 PCB Router: Pressing V again can untoggle Via
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/12315
2022-09-06 10:51:46 -04:00
Jeff Young 7c83c78afe Allow free pad usage in router.
Fixes https://gitlab.com/kicad/code/kicad/issues/11730
2022-09-06 13:59:52 +01:00
Jeff Young 156755e9db Allow processing of non-handled events in length tuner tool.
Fixes https://gitlab.com/kicad/code/kicad/issues/11425
2022-09-05 10:57:07 +01:00
Jeff Young 895a8a8dbc Work around focus issues for status popups.
Autoscroll wasn't working on Mac because the status popup's panel
has the focus.  This *may* also fix a problem on MSW of the auto-scroll
not being cancel-able.

Fixes https://gitlab.com/kicad/code/kicad/issues/11425
2022-09-04 21:08:01 +01:00
Jeff Young 9405817a4d Improve contrast of status popup text on Mac.
Also works around an issue where GetBackgroundColor() returns black
(with a 40% alpha) on Mac.
2022-09-04 21:08:01 +01:00