Commit Graph

458 Commits

Author SHA1 Message Date
Ian McInerney 171458a27b Introduce action friendly names
Friendly names can be used to display action information that is clearer
in non-hierarchical contexts (e.g. not in menus).

Fixes https://gitlab.com/kicad/code/kicad/-/issues/8075
2023-10-27 23:58:29 +01:00
Mike Williams 70917a14e7 Route from end: fix crash and snapping bug
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/13992
2023-10-18 12:32:32 -04:00
Jeff Young d51e058e24 Move diff-pair netname resolution to BOARD.
Also adds reporting of dp gap constaints and max uncoupled to track
selections, and max uncoupled during routing.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/13748
2023-10-15 22:46:23 +01:00
Jeff Young 0a111e9fbb Hook up layer-toggle command to router.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15812
2023-10-13 21:33:27 +01:00
Ian McInerney 0876fb0985 Re-implement direct layer switching in the router tool
Also add a new framework to allow grouping actions that are similar into
a single context that can then be used for mass comparisons.
2023-10-05 13:34:25 +01:00
Mike Williams c2d7b26ebd PCBNew: don't grab the wrong parameter type when placing vias 2023-10-04 12:17:15 -04:00
Jeff Young 9214e47367 Only allow switching to enabled layers.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15779
2023-10-01 15:27:55 +01:00
Jon Evans d781d70a09 PNS fix dragging a single footprint
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15693
2023-09-20 11:53:43 -04:00
Jon Evans 5a9c028e85 PNS: Allow dragging more than one footprint
Fixes https://gitlab.com/kicad/code/kicad/-/issues/11312
2023-09-18 22:37:11 -04:00
Marek Roszko 22b733209d Fail GAL on its header leaking audit
Maybe we should rethink directly accessing GAL so much, but at least 600 files didn't need GAL leaked into them due to view_overlay.h
2023-09-18 19:52:27 -04:00
Marek Roszko 67b031adab Painter base class should just live in gal instead of being in denial 2023-09-06 20:23:19 -04:00
Jeff Young 891583f616 Fix nullptr error. 2023-09-02 12:08:37 +01:00
Mike Williams 9079df85fd PCB: check ratsnest for nullptr (segfaults) 2023-08-24 10:51:34 -04:00
Jeff Young 76cd637895 Make the net identifier opaque to PNS router.
This also improves performance as we don't have to look up the
netcodes in a map.
2023-08-22 15:17:02 +00:00
Jeff Young fa060c7c58 Make sure dummy tracks have ROUTER_TRANSIENT flags.
Also give them more info that might be queried by custom DRC rules.
This currently just includes positioning info (it already included
nets and principal layer).  We *could* also try to figure out all
layers for dummy vias, and/or widths for dummy tracks / arcs....
2023-08-19 20:51:04 +00:00
Alex Shvartzkop a0d96cea9f Rename Save -> SaveBoard, Load -> LoadBoard in PLUGIN. 2023-08-15 05:26:12 +03:00
jean-pierre charras cff2583f15 Minor fixes to help translations:
- do not translate a debug message.
- remove useless spaces at end of lines (always annoying for translators).
2023-08-10 10:16:24 +02:00
Roberto Fernandez Bautista 6ba250a4e6 PNS Log Viewer: Refactor loading/saving functions 2023-08-09 22:21:14 +00:00
Roberto Fernandez Bautista feb887fe8f PNS: Prevent re-entry events when saving log to file 2023-08-07 23:48:58 +02:00
Roberto Fernandez Bautista 3bf9797620 PNS: add new "EnableRouterDump" kicad_advanced setting 2023-08-07 23:43:54 +02:00
Jon Evans 103eb556f7 PNS: Make sure log viewer uses the actual design settings 2023-08-06 16:05:37 -04:00
Jon Evans 5cbe3c5d42 PNS: Fix a few issues with debug logging
Hide non-copper layers for clarity

Fix saving of router settings
2023-08-06 15:30:58 -04:00
Jon Evans cc7d470f8b PNS: Improve behavior of dragging vias
- Fall back to walkaround when drag fails
- Properly check collisions with holes

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15117
2023-08-01 19:03:04 -04:00
Seth Hillbrand 812c56bdc7 Clarify NeighboringSegmentFilter
This doesn't affect behavior but makes the code more readable
2023-07-25 11:05:56 -07:00
Ian McInerney 533d7531a1 Via routing actions need to use int flags
The actions the router uses for via placement can be a combination of
enum values, so the actions must use an int parameter instead of the
enum type.

Fixes KICAD-2DS
2023-06-29 23:21:15 +01:00
Ian McInerney 2fb6f19a84 Separate immediate and delayed action dispatch
Using a boolean argument just leads to a lot of trailing booleans in the
function calls and is not user friendly. Instead, introduce PostAction()
to send an action that runs after the coroutine (equivalent to passing
false or the default argument), and leave RunAction as the immediate
execution function.
2023-06-27 00:57:59 +01:00
Ian McInerney 3c24ddd8cc Fix passing CLIENT_SELECTION_FILTER through the tool framework 2023-06-20 21:52:50 +01:00
Ian McInerney 07cc85e76c Fix more places where casts into RunAction were happening 2023-06-20 21:52:50 +01:00
Ian McInerney b04e54dbea Switch TOOL_EVENT and TOOL_ACTION to have a std::any parameter
Using std::any from C++17 allows for proper type handling in the
parameter field, removing the need for casting to void* and then casting
the void* to the desired type.
2023-06-20 21:52:50 +01:00
Jeff Young 30336b2fe3 Unify go-back-one-step processing for drawing tools (and router).
Also warps mouse on all go-back-one-step operations for better feedback.

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

Fixes https://gitlab.com/kicad/code/kicad/-/issues/9985
2023-06-19 17:14:32 +01:00
Yang Hongbo fe1b1becef Check visibility when switching layer in router tool
When routing and using layerNext (hotkey '+') to switch to next layer,
it will skip invisible layer, when click BUT_LEFT, the new line should
be in the same layer (visible layer)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14480
2023-06-13 09:46:12 -07:00
Jeff Young 4874537c40 Push/pop router tool for inline drag.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14832
2023-05-30 18:02:12 +01:00
Lucas Dumont a22e6db982 Add Zone when dragging component
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14629
2023-05-06 09:32:38 +00:00
Jeff Young bbd6c80507 Collapse FP_* down into their PCB_* equivalents. 2023-03-31 22:57:46 +01:00
Mike Williams 74a9d79a8d Router: fix Continue From End/ Attempt Finish work for diff pairs
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/13772
2023-03-08 12:23:04 -05:00
Marek Roszko aacc9746e3 Yeet the last of wxSize/wxPoint to stop leaking gdicmn everywhere 2023-02-18 22:57:18 -05: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
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
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
Tomasz Wlostowski 65def26b4d router: follow up ROUTER::GetUpdatedItems() API changes in the ROUTER_TOOL 2023-01-12 23:37:07 +01:00
Jeff Young 4c63b4e061 Class name <-> file name sync. 2022-12-29 18:05:57 +00: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
Alex 008704fc6f router: Allow highlighting both DP nets when routing. 2022-12-06 05:24:23 +03: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
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
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 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