Commit Graph

116 Commits

Author SHA1 Message Date
Jeff Young ee0fff97f9 Cleanup formatting and remove dead code. 2023-12-21 22:06:59 +00:00
Jeff Young d155870275 Sometimes use grid (instead of clearance) for slop radius.
This is particularly important both when very large grids
are in use, and when the router hasn't been initialized
with a net yet (ie: in hover mode) and the board clearance
is set to 0.

https://forum.kicad.info/t/new-track-start-position-problem-on-kicad-7-0-10-rc1/47006
2023-12-21 12:58:58 +00:00
Alex Shvartzkop 61bdee027b Fix a crash when using length tuning tools.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15874
2023-10-14 16:53:28 +03:00
Jeff Young d10b0b053e Move meander placer picker tool from item highlighting to net highlighting. 2023-10-09 22:32:32 +01:00
Alex Shvartzkop 546c7ed218 Introduce GENERATOR_TOOL. 2023-10-08 02:41:17 +00: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
Mike Williams 2b78c20a62 PCB: add grid overrides to graphics/router/etc. 2023-08-24 13:58:22 -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
Jon Evans a77e630901 ADDED: Connectivity for graphic shapes on copper layers
Graphic shapes (excluding text) can now have nets when on
copper layers. Shapes behave like tracks in that they will
pick up nets from connected pads, and follow track opacity
settings.
2023-08-10 21:47:43 -04:00
Jeff Young d040690f60 Ease acquisition of a target item.
pickSingleItem() had a two-attempt algorithm, but the second attempt
was never made because we'd check for no hits before throwing out the
aAvoidItems.

The second attempt would fail anyway because QueryHoverItems() ignored
the aUseClearance flag when not idle, and didn't factor in the actual
clearance.
2023-04-09 22:05:17 +00: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
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
Alex 008704fc6f router: Allow highlighting both DP nets when routing. 2022-12-06 05:24:23 +03: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 7c83c78afe Allow free pad usage in router.
Fixes https://gitlab.com/kicad/code/kicad/issues/11730
2022-09-06 13:59:52 +01:00
Seth Hillbrand 0cb5abd7f7 Fix highlight on route again
Added a clarifying comment that will hopefully keep the required code
block in place
2022-07-08 20:14:46 -07:00
Tomasz Wlostowski 0bd7f603a3 router: consider mouse drag event a valid route start/end event
L-clicks during routing operation while the mouse is moving (even slightly) were ignored, which was annoying to some users (myself included). Now the router
always fixes the track upon mouse click.
2022-06-03 23:28:41 +02:00
Jeff Young a54bbfe12b Honour prime-event-location when starting router.
Fixes https://gitlab.com/kicad/code/kicad/issues/11239
2022-03-29 13:44:40 +01:00
Jeff Young 4225f92573 Slight improvements to via drawing.
Fixes https://gitlab.com/kicad/code/kicad/issues/8717
2022-03-16 14:56:32 +00:00
Jeff Young b2e3f03222 More wide-string declarations. 2022-02-05 22:03:04 +00:00
Jeff Young 5e4a704155 Remove some more duplicated preferences.
Fixes https://gitlab.com/kicad/code/kicad/issues/10112
2021-12-26 13:37:28 +00:00
Tomasz Wlostowski 965ab42938 router: when dragging segments, don't snap to other segments on the same layer. Fixes drag flickering for short segments.
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/9720
2021-12-15 01:48:04 +01:00
jean-pierre charras 302c5ab537 Fix an issue created by commit 9e3362d1.
the issue was the graphic cursor was locked on the first snap point
in route mode, once a snap point is found.
2021-11-21 15:37:03 +01:00
Jeff Young 9e3362d14c Snap mouse point before picking startItem.
Fixes https://gitlab.com/kicad/code/kicad/issues/9700
2021-11-20 13:44:16 +00:00
Wayne Stambaugh 78e5e98ea0 Pass VECTOR2I objects by reference instead of on the stack. 2021-07-27 08:41:27 -04:00
Wayne Stambaugh cf00319c85 More NULL expunging. 2021-07-20 07:27:18 -04:00
Jon Evans 3475d0cebd PNS: Grab start item based on clearance if no direct hits found
Fixes annoying "routing start point violates DRC" messages when
entering the router from the hotkey and not directly over a track.
2021-06-06 14:57:52 -04:00
Marek Roszko 4df3cb912d Remove another leaky wx/log.h header 2021-06-03 08:11:15 -04:00
Jeff Young 5c9a73aa5e Correct position for grid even when we're not snapping to a point.
Fixes https://gitlab.com/kicad/code/kicad/issues/8125
2021-05-25 21:57:19 +01:00
Jeff Young 7356f9568d Move grid disable modifier from ALT to CTRL.
Also had to move the H/V/45 disable modifier from CTRL to SHIFT.

Fixes https://gitlab.com/kicad/code/kicad/issues/8124
2021-05-09 20:17:40 +01:00
Jon Evans 6b24abac8f PNS: Don't snap to end items if snapping is disabled by modifier key
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8033
2021-04-04 10:22:23 -04:00
Jeff Young 8be213e36f Trim includes (and use consistent terminology in error messages). 2021-03-21 20:15:47 +00:00
Jon Evans 720147d272 Remove transitive inclusion of bitmaps.h 2021-03-07 16:08:57 -05:00
Jon Evans b96bcc86b1 Don't restrict start item to same layer if snapping is enabled
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7276
2021-01-25 21:19:26 -05:00
Jeff Young 68efdb2fff Push shared parts of GRID_HELPERs into common. 2021-01-16 23:18:10 +00:00
Jeff Young 7cb2d19814 Honour alt-means-disable-grid-snapping in router.
Fixes https://gitlab.com/kicad/code/kicad/issues/6679
2020-12-11 13:11:47 +00:00
Jeff Young 7b347d793b Change gears on no-connect net generation. See bug rpt.
Fixes https://gitlab.com/kicad/code/kicad/issues/6534

Fixes https://gitlab.com/kicad/code/kicad/issues/6615
2020-12-04 18:25:48 +00:00
Jeff Young f2ac6fcd44 Treat net 0 items as each being in their own net.
Fixes https://gitlab.com/kicad/code/kicad/issues/6534
2020-12-02 20:05:47 +00:00
Jeff Young d06d35a74d Formatting. 2020-12-02 20:05:47 +00:00
Jeff Young ce3b2921bd Sort potential start candidates by distance from cursor.
Fixes https://gitlab.com/kicad/code/kicad/issues/1926
2020-11-10 23:50:57 +00:00
Jeff Young 843974b0bf Cleanup and formtting. 2020-10-31 15:50:06 +00:00
Marek Roszko 9656bd310b Remove eda_item and gr_basic from eda_text.h 2020-10-13 22:46:39 -04:00
Jeff Young f8875bc5a6 Move std::contains to alg::contains. 2020-09-26 14:42:40 +01:00
Jeff Young d7e80f8008 Add std::contains() to simplify a lot of code. 2020-09-26 12:40:32 +01:00
Seth Hillbrand f493e270ea ADDED: Menu option to enable/disable snap to grid
You can now enable and disable snap to grid when drawing/editing across
all apps.  You can also tie snap to grid to the visibility of the grid
to allow rapid enable/disable via grid display.
2020-09-10 20:09:30 -07:00
Jeff Young 7cd8f710b6 Clean up unused includes. 2020-08-08 16:25:30 +01:00
Jon Evans 5d118b0700 More visibility settings infrastructure
ADDED: Three-state high contrast mode action
ADDED: Save contrast mode in local settings

Also some initial infrastructure for layer presets
2020-07-11 21:59:07 -04:00
Jeff Young 2cfd6ba978 Fix a couple of integer overflows. 2020-07-02 22:52:37 +01:00
Jeff Young 47ab7c78a6 Divorce GRID_HELPER from the parent frame.
This moves GRID_HELPER fully into the tool framework.
2020-06-13 22:44:16 +01:00
Jon Evans c7daf8a8f3 ADDED: Cross-probe highlighting of bus members
Note: this is a basic implementation but it could be
improved once we include bus information in the netlist
and pcbnew can natively keep track of buses and nets
instead of just nets.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/4158
2020-05-24 13:30:23 -04:00