1851 Commits

Author SHA1 Message Date
Jeff Young
4024a15a17 Don't reference stack variables from a long-life lambda.
In particular, a lambda for conditional menus should
never capture more than `[this]`.  Even the tool's
frame pointer could change.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/21615
2025-09-01 12:44:20 +01:00
Seth Hillbrand
8592b2ee70 JP's patch to fix crash in routing empty board 2025-08-26 12:41:54 -07:00
Seth Hillbrand
2db8c6eca0 Maintain group membership when shoving
Keep track of the original group membership and assign this to the newly
created element as well

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20862
2025-08-26 10:34:10 -07:00
Seth Hillbrand
cac334bb45 Enforce board-level hole to hole on diff pairs
Makes the router behave like the DRC

Fixes https://gitlab.com/kicad/code/kicad/-/issues/21240
2025-08-23 07:45:05 -07:00
Seth Hillbrand
8acdcafe90 Find the proper line split
And avoid leaving duplicate tracks when overlapping

Fixes https://gitlab.com/kicad/code/kicad/-/issues/10422
2025-08-23 07:10:05 -07:00
dsa-t
d636eec643 router: Inline drag by track end even if cursor is slightly outside the track shape.
(cherry picked from commit 12cf3f93011e5c7a76d52f17fd10253648049baf)

Co-authored-by: Alex Shvartzkop <dudesuchamazing@gmail.com>
2025-08-21 13:56:49 +03:00
Seth Hillbrand
4c5b44545f Slight modification to followTrivialPath
Now keeps track of branch points, recursing through them to find the
longest path it can in both directions.  This helps to ignore
overlapping segments

Fixes https://gitlab.com/kicad/code/kicad/-/issues/7809
2025-08-17 20:19:40 -07:00
Seth Hillbrand
8bf7975440 Make move tool obey snap settings
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21192
2025-08-15 06:35:12 -07:00
Seth Hillbrand
b207ec8817 Remove negative index access from CPoint
Callers should be responsible for index count and/or use iterators
2025-08-08 10:46:45 -07:00
Seth Hillbrand
1a4eba56a7 ADDED: Skip Via support
Skip vias are vias that are flashed on their start and end layers but
have no annular rings on the interior layers and do not connect to zones
in those layers

You can now select Annular ring type "Start and end layers only".  This
will prevent annular ring flashing on intermediate layers and zones
fills will provide clearance.  You can still connect tracks to
intermediate layers but preventing that will fall to the designer

Fixes https://gitlab.com/kicad/code/kicad/-/issues/21433
2025-08-07 15:48:10 -07:00
Jeff Young
43a1134397 Performance tweak. 2025-08-06 15:27:58 +01:00
Jeff Young
400fd96ee2 Make use of new move assignment operators. 2025-08-06 15:27:58 +01:00
Seth Hillbrand
29eee9f126 Refactor grid_helper to allow testing
Make view and tool manager optional so that we can implement QA on the
actual snapping
2025-08-05 16:10:17 -07:00
Seth Hillbrand
4aa2047f45 Replace alg::delete and alg::delete_if with std c++20 2025-08-04 09:03:16 -07:00
Seth Hillbrand
1066595a2c Add wallclock timeout to PNS walkaround
WALKAROUND::singlestep is used by both shove and walkaround modes and
can bog down when applied to clusters with many objects.  In these
cases, we are unlikely to find a viable solution and it is beter to
allow the user to find a different ending position

(cherry picked from commit d9cfb942812a57238d5ed6bbaa2c1d22a8676071)
2025-07-15 15:24:36 -07:00
Jeff Young
c758a2fbaf Don't sequence layers when order doesn't matter. 2025-07-14 19:12:44 +01:00
jean-pierre charras
5f8547dc7e Minor compil warnings fixes. 2025-07-09 15:38:33 +02:00
Jeff Young
3a8ea50783 More tool loop safety. 2025-07-03 21:49:11 -06:00
Jeff Young
a7319bfcd0 Tool loop safety. 2025-07-03 20:01:35 -06:00
Jeff Young
6f7023116d Static_cast safety. 2025-07-03 19:41:52 -06:00
Alex Shvartzkop
50ce7d93fb Fix some warnings. 2025-06-30 06:52:16 +03:00
Jeff Young
044ac6e8e5 Prefer board's errorMax to a constant. 2025-06-27 22:59:12 -06:00
Jeff Young
4403c9b62f Uninitialized variable. 2025-06-23 10:22:26 -06:00
Tomasz Wlostowski
ed6440b782 router: clean up shoved traces after aborting differential pair routing in shove mode
Note: the single-trace placer (LINE_PLACER) has moved to the FIXED_TAIL for tracking the interim placed routes (and reverting them if user pressed backspace). Unfortunately the DIFF_PAIR_PLACER didn't follow. The result was the dummy CommitPlacement() call at the end of aborted routing would commit the last shove state, even if FixRoute() was never called. For longer-term fix: fix ROUTER_TOOL logic to indicated aborted routing to the router/placer (AbortPlacement() is already there). Also implement FIXED_TAIL in diff pair placement mode.
2025-06-23 00:53:12 +02:00
Tomasz Wlostowski
0256ccb6a6 router: TOPOLOGY::SimplifyLine() should not try to merge segments of differing widths
Note to self: likely a regression after adding aAllowSegmentSizeMismatch parameter (default = true) to AssembleLine(). We need to improve the simplification algorithm to take differing widths into account.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/21078
2025-06-22 00:26:33 +02:00
Tomasz Wlostowski
e274307437 router: possible fix for disappearing split-segments
https://gitlab.com/kicad/code/kicad/issues/21019
2025-06-20 00:18:38 +02:00
Jeff Young
74bf678d99 Warp back from context menu before running command.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19560
2025-06-16 10:58:03 +01:00
Mark Roszko
1922cab5f4 Kill the near-global spread of length_delay_calculation.h 2025-06-14 13:32:18 -04:00
Jeff Young
116bd924c2 Static cast safety.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20958
2025-06-08 23:21:02 +01:00
Jeff Young
31c6c28882 Performance optimizations. 2025-06-06 18:25:20 +01:00
Jeff Young
68f1cd0a08 Fix uninitialized member variable. 2025-06-05 18:01:44 +01:00
Jeff Young
30748006f7 Standardize on American English spelling of "canceled". 2025-06-01 19:38:24 +01:00
Tomasz Wlostowski
c5a4f9e747 router: make sure we are not committing VIAs with non-unique IDs, fixes random disappearing via issue
Note to self:
LINE_PLACER::FixRoute used to silently reclaim the UID of the transient via (as used by the SHOVE's heads tracking logic).
Depending on the particular sequence of user events (the bug is next to impossible to reproduce on a touchpad), this would
result in freshly placed vias disappearing...

Fixes https://gitlab.com/kicad/code/kicad/issues/20999
2025-05-28 13:44:49 +02:00
Jon Evans
04b9fc76d0 PNS: Fix early exit from followTrivialPath
Don't mark a segment as visited until the
start of the next loop.

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


(cherry picked from commit 52e9cdde992e0a888f9a66575594758dbcd2336a)

Co-authored-by: Jon Evans <jon@craftyjon.com>
2025-05-26 22:48:13 -04:00
Jeff Young
327cca9de5 Coverity fixes. 2025-05-25 20:01:18 +01:00
Mike Williams
c09e9da471 router: make layer next/previous actions work consistently
UI was getting out of sync with router and they could be on different
layers. There was also some confusion about whether previous layer was
the opposite of next layer (-1/+1 to current layer), or effectively a
back button for the current layer.
2025-05-20 11:25:07 -04:00
Mike Williams
6ca8078ca4 router: add missing commit change 2025-05-19 15:23:42 -04:00
Mike Williams
2f94b241ab router: intelligently guess next layer when placing vias with ratnest
Chooses the layer of the closest ratsnest item
2025-05-19 14:55:30 -04:00
Tomasz Wlostowski
1907580b82 router: initial fix for 'reshoving' tracks whose clearance has been increased 2025-05-11 23:56:39 +02:00
Seth Hillbrand
c06ddf966d Don't overwrite explicit sizes unless needed
We already did this for single-ended, this extends to dp routes

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20889
2025-05-09 13:31:39 -07:00
Jeff Young
b14472e105 Skip same-net-checking for hole-to-hole collisions.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20547
2025-05-07 13:28:48 +01:00
Seth Hillbrand
4a41f4a525 Prevent overriding existing track width
Avoids resizing existing tracks to match new track.  Adds new parameter
to AssembleLine to allow current behavior while only preventing width
overrides when creating new lines

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20031
2025-04-29 17:51:31 -07:00
jean-pierre charras
0755ab8ea9 Fix a few Coverity warnings (uninitialized vars) 2025-04-27 18:23:41 +02:00
JamesJCode
eb17ebee4e Implement time-domain length tuning
- Adds time and delay units
- Adds time domain tuning parameters entry and storage
- Adds pad-to-die delay property
- Adds time domain parameter interface for length / delay calculations
- Adds unit tracking for numerical constants through LIBEVAL
   - Will need future work to truly propagate through binary expressions
- Adds time domain tuning to meander placers
- Adds time delay display to net inspector panel
- Modifies DRC to handle time domain constraints
2025-04-17 21:46:56 +01:00
Mike Williams
40058ebe80 actions: move all basic selection operations to common actions 2025-04-02 12:02:01 -04:00
JamesJCode
906c24bc6d Unify length calculation between router, board / frame, and DRC 2025-03-30 09:18:41 +01:00
Tomasz Wlostowski
5f620f0fa1 router: don't try to lock the first vertex of a zero-vertex line. Might crash (sometimes).
Fixes https://gitlab.com/kicad/code/kicad/issues/20440
2025-03-26 00:12:43 +01:00
JamesJCode
24a8c2a684 Ensure PNS length tuning calculation uses correct layer ID context
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20372
2025-03-18 12:37:16 +00:00
Jeff Young
b569d919ea No more invisible (non-field) text. 2025-03-10 21:58:30 +00:00
Jeff Young
567da3de91 Tables support for router.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20295
2025-03-10 15:45:42 +00:00