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
Jeff Young
c30a557810
ADDED netclass assignment from PCB canvas.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/5975
2022-09-03 19:29:59 +01:00
Roberto Fernandez Bautista
c15a13963b
Fix Build error: AddLine doesn't exist anymore
2022-09-02 11:17:28 +02:00
Roberto Fernandez Bautista
22f96bfd11
Re-route m_last_head after routing fails
...
This should ensure the shove state gets reverted
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9023
2022-09-02 09:41:15 +02:00
Seth Hillbrand
b736460e71
Move optional access from value() to *operator
...
`value()` throws. Where we check for existence, we don't need to use
the throwing version and should just use the unprotected variant
2022-08-30 13:59:39 -07:00
Seth Hillbrand
91fbb5c957
Don't prevent immediate actions while router active
...
Immediate actions that can take place are useful. We should only be
preventing immediate actions while actively routing or dragging
Fixes https://gitlab.com/kicad/code/kicad/issues/12311
2022-08-30 10:31:29 -07:00
Stefan Hamminga
2ff6a6aee1
Implement and enable option to not shove vias during push & shove routing
2022-08-29 17:32:39 +00:00
Jeff Young
7baa56528a
Make sure via-gap-same-as-trace-gap gets turned off for board settings.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/12236
2022-08-26 13:22:57 +01:00
Seth Hillbrand
f1261e71d4
Replace boost::optional with std::optional
2022-08-25 15:50:47 -07:00
Jeff Young
aa2ad3b44c
Move KICAD_T[] to std::initializer_list<KICAD_T>.
2022-08-20 10:28:11 +01:00
Jeff Young
46df421064
ADDED defined pad groups for net-tie footprints
...
Each pad group is allowed to short nets with other pads in its group.
Legacy footprints with the "net tie" keyword hack will get a single
group auto-created with all the footprint's pads in it.
DRC and the router now allow a track to collide with copper graphic items
while entering a net-tie pad as long as the closest point in the collision
is within the pad.
DRC (and the footprint checker) now check for copper items in the
footprint shorting pads which are not in the same pad group.
Fixes https://gitlab.com/kicad/code/kicad/issues/2265
2022-08-19 18:54:20 +01:00
Mike Williams
f06e28b7a7
PCB: Finish Route, Route From End
...
Adds restart routing from other ratsnest' end and automatically finish
routing.
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/5051
2022-08-17 03:15:46 +00:00
Jeff Young
a9536b5de9
CHANGED netclass assignments now done via canvas or via patterns.
2022-08-14 22:56:29 +01:00
Seth Hillbrand
1ce8fc1614
Ensure arcs are handled in topology
...
Use the connection-independent `Anchor()` function to get connection
points for either arcs or segments in topology. This allows the
ratsnest to be correctly drawn between nets with arcs
Fixes https://gitlab.com/kicad/code/kicad/issues/12205
2022-08-12 20:07:28 -07:00
Jeff Young
96f01d33c8
Performance improvements.
...
1) Move a bunch of std::map's to std::unordered_map to get constant-time
look-ups
2) Lengthen progress-reporting intervals to spend more time doing work
and less time talking about it
3) Reverse order of SHAPE_LINE_CHAINs in thermal intersection checks to
make (much) better use of bbox caches
4) Don't re-generate bboxes we already have
5) Fix some autos that weren't by reference (and were therefore copying
large datasets)
6) Rename delta progressDelta so it's easier to search for in future
7) Get rid of a few more autos (because I don't like them)
8) Pass large items to lambdas by reference
Fixes https://gitlab.com/kicad/code/kicad/issues/12130
2022-08-03 11:59:42 +01:00