Commit Graph

81 Commits

Author SHA1 Message Date
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
Ian McInerney 6692935808 Consolidate common viewer actions across cvpcb and pcbnew frames
* Consolidate the measure tool into one tool (this gives cvpcb
  unit changing and snapping capabilities in its measure tool)
* Transition cvpcb to use actions for the sketch modes
* Replumb how magnetic items settings are stored and used
2020-05-24 11:58:33 +01:00
Jon Evans 51eac3e3e6 Split pcbnew and footprint editor settings getters for clarity 2020-05-05 21:46:00 -04:00
Jon Evans 9cc5b4b3f9 Fix management of nested settings for PNS 2020-02-27 22:53:00 -05:00
Seth Hillbrand 8c19b4b6ae pcbnew: Adding arcs to PNS
This is allows ARCs in tracks to be synchronized with
the PNS router.  Note this does not yet include the UI components
to route curved traces
2020-02-21 16:11:41 -08:00
Jon Evans e59a3d981e Implement a new settings framework across all of KiCad
CHANGED: Settings are now stored in versioned sub-directories
ADDED: First-run dialog for migrating settings from a previous version
CHANGED: Settings are now stored as JSON files instead of wxConfig-style INI files
CHANGED: Color settings are now all stored in a separate settings file
CHANGED: The symbol editor and footprint editor now have their own settings files
CHANGED: Color settings are no longer exposed through BOARD object
CHANGED: Page layout editor now uses Eeschema's color scheme

Settings are now managed through a central SETTINGS_MANAGER held by PGM_BASE.
Existing settings will be migrated from the wxConfig format on first run of each application.
Per-application settings are now stored in one class for each application.
2020-02-19 23:44:56 -05:00
Jeff Young 88eab8134e Fix a couple of uninitialized variables (from Coverity scan). 2020-01-11 00:11:31 +00:00
Ian McInerney 5d46e721e5 pcbnew: Cleanup includes of pcbnew_id.h
* Remove unused IDs from the enum
* Remove the include statements from files that no longer need it
2020-01-03 15:39:05 +00:00
Seth Hillbrand c6f5df134c Minor speed cleanup
This adjusts iterators to use const reference when only used for
copy.  It also ensures pre-allocation of vectors when size is known
ahead of time.
2019-12-05 14:20:59 -08:00
Seth Hillbrand 6625d0721e Implement Get/Set display options
The pointer passing for display options is deprecated.  This removes the
excess casting as the EDA_FRAME didn't need the base call with no value.
All requests for display options are now returned const and are updated
with a Set() routine after modification.

In Gerbview, this resolves an issue where the display options were not
stored because it was receiving the NULL from EDA_FRAME.
2019-11-07 08:26:44 -08:00
Seth Hillbrand cecfeea947 pcbnew: Remove snapping to hidden items
Items and layers that are hidden in the view should not be used as snap
points.  This happens in multiple locations:
1) Grid Helper for normal tools
2) TOOL_BASE::snapToItem for router

Resolves KiPro Issue #116

Fixes: lp:1833128
* https://bugs.launchpad.net/kicad/+bug/1833128
2019-10-10 09:37:25 -07:00
Seth Hillbrand aa875e5830 PNS: Don't allow routing on hidden layers
If the layer is not shown, we should not be allowing it's items to be
selected and chosen as the start/end items in the router.

(cherry picked from commit fc1fb7a590)
2019-08-15 12:40:05 -07:00
Jeff Young e785c140b9 Eradicate globals for PCB_GENERAL_SETTINGS.
Fixes: lp:1832896
* https://bugs.launchpad.net/kicad/+bug/1832896
2019-06-26 21:54:03 +01:00
Jeff Young 5e49517781 Move hotkeys to ACTION architecture. 2019-06-10 23:46:00 +01:00
Jeff Young c1298570cb Remove legacy routing options. 2019-06-01 16:29:12 +01:00
Jeff Young f9e4ee1fc9 CONTEXT_MENU -> ACTION_MENU. (Now used for menu-bar menus too.) 2019-05-15 17:50:52 +01:00
Jeff Young f602ccd814 Insert EE_TOOL_BASE under SchEdit and LibEdit tools, and fix errant rename scope which clobbered PCBNew's PICKER_TOOL. 2019-05-12 13:47:08 +01:00
Seth Hillbrand 0de25e557b pcbnew: Adjust drag snapping to avoid start
When dragging, you will seldom want to snap to the original item.  This
commit prevents the "size of track" snap to the original item and
replaces it with an auxilary grid origin for the snap.  This means
effectively that the snap will happen to grid for the original item
unless the cursor is closer to the original item line than it is to the
grid crossing.

Fixes: lp:1820248
* https://bugs.launchpad.net/kicad/+bug/1820248
2019-03-16 20:37:14 -07:00
Seth Hillbrand f1fed08fa7 pcbnew: Finalize previous snapping preferences
Snap/Grid modifier follow preferences from 05483a06c6.  Brings Shift/Alt
modifiers into alignment with drawing tools.  Shift modifier still
conflicts when choosing end item with the complete track click-modifier.
This will be addressed in v6 with a larger preference setting.
2019-01-29 17:10:58 -08:00
Seth Hillbrand 05483a06c6 pcbnew: Re-attach snap options
Snapping to item options were partially disconnected when unifying
framework.  This re-attaches the options and adds the additional option
for graphical items.

Fixes: lp:1801377
* https://bugs.launchpad.net/kicad/+bug/1801377
2019-01-29 13:36:17 -08:00
Seth Hillbrand 2a865ef4b6 pcbnew: Remember highlighted net while routing
If the user has specifically requested a net to be highlighted before
routing, we keep the net highlighted after the route is completed.
2018-12-03 08:42:45 -08:00
Seth Hillbrand 3cc87b4597 PNS: Ensure we don't miss items
Higher candidate levels could override better matches if the layers did
not overlap.
2018-10-21 14:28:33 -07:00
Jeff Young 95d3336f63 We need the other end of the stick when not yet routing.
Fixes: lp:1781424
* https://bugs.launchpad.net/kicad/+bug/1781424
2018-07-27 14:58:19 +01:00
Maciej Suminski 583a9c08c0 Remove duplicated PNS TOOL_ACTIONs to display routing settings 2018-06-15 17:12:15 +02:00
John Beard 0555bbc656 Pass PCB display settings to PNS router tool
This allows the tool to set display options like the clearance.

Fixes: lp:1766836
* https://bugs.launchpad.net/kicad/+bug/1766836
2018-06-11 10:48:05 -07:00
Seth Hillbrand 1ac905d3ee Allow PNS to select nearest pad when two overlap
Usually pads do not overlap.  However custom pads are represented as
their convex hull, so they may enclose other pads.  This change allows the
router to select the closest pad to the cursor position.
2018-05-03 09:48:15 -07:00
Jeff Young 900bf0c7a6 Allow connections to no-net items in Highlight Collisions mode.
If the track being routed is unconnected, or the end-point
clicked on is unconnected, allow the connection by changing
the unconnected item to the net of the connected one.

Fixes: lp:1548129
* https://bugs.launchpad.net/kicad/+bug/1548129
2018-04-09 11:05:14 +01:00
Jeff Young d3e7efcd66 Ignore pads when selecting drag candidates in router tool.
Fixes: lp:1747156
* https://bugs.launchpad.net/kicad/+bug/1747156
2018-03-16 18:01:40 +00:00
Tomasz Włostowski 2faf1a1ed3 Initial support for keepout zones in the P&S router. 2018-02-06 09:43:56 +01:00
jean-pierre charras 8552f3fedf fix code after renaming files 2018-01-29 22:00:44 +01:00
Tomasz Włostowski 26f862a9d0 refactoring: remove PNS router dependency on PCB_EDIT_FRAME 2017-11-03 20:02:06 +01:00
Tomasz Włostowski 81d1e17f02 refactoring: renamed pcbstruct.h to pcb_display_options.h, DISPLAY_OPTIONS->PCB_DISPLAY_OPTIONS 2017-11-03 20:02:06 +01:00
Tomasz Włostowski 667d32c4ab router: fixed snapping to end items 2017-08-17 22:54:55 +02:00
Tomasz Włostowski d5bdcd3032 router: fixed no-snapping issue 2017-08-16 14:11:07 +02:00
Tomasz Włostowski 2d9ab80b4e Few improvements to the GAL router:
- missing 'break track' functionality
- 'drag 45 degree' and 'drag free angle' context menu shorcuts, both in the router tool and in the default context menu
- bugfix: length tuner tool can now be used again

Fixes: lp:1708386
* https://bugs.launchpad.net/kicad/+bug/1708386

Fixes: lp:1708402
* https://bugs.launchpad.net/kicad/+bug/1708402
2017-08-07 14:28:46 +02:00
Maciej Suminski 805bfb048b pcbnew: Configurable hotkeys for PNS
- routing options
- custom track/via size
- differential pair dimensions
- increase/decrease via size
2017-06-30 15:46:27 +02:00