Commit Graph

420 Commits

Author SHA1 Message Date
Tomasz Włostowski dcf4d7caa7 router: allow placing via without track in shove mode
Fixes: lp:1769782
* https://bugs.launchpad.net/kicad/+bug/1769782
2018-05-08 15:18:10 +02:00
Maciej Suminski 2b46bda2f2 PNS router: apply the last stable state after dragging
Previously, dragging changes were applied only if the last cursor move
finished with a successful drag operation. It made items squeezing
difficult, as it required accurate cursor movement to apply the changes.
2018-05-08 11:50:37 +02:00
Seth Hillbrand dbc2eea3db Optimize itemset
When counting items, many cases exist where we want to count all items
without checking flags.  This short-circuits the loop to provide the
immediate count.
2018-05-07 13:59:12 -07:00
Seth Hillbrand 9648584827 Adjusting the breakout optimizer for custom pads
Rather than using the center of the bounding box, we keep the start
track on the custom pad's connection pad when optimizing the breakout.
2018-05-04 08:23:20 -07:00
Seth Hillbrand b2c4519c2c Setting custom pad shape to be outline for PNS
Changes SHAPE_CONVEX to SHAPE_SIMPLE to better reflect the limitations.
Changes SHAPE_LINE_CHAIN::PointInside calculation to allow points
strictly inside a line chain

Fixes: lp:1768862
* https://bugs.launchpad.net/kicad/+bug/1768862
2018-05-04 08:23:20 -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
Tomasz Włostowski 2eddf1d8db router: prevent a very unlikely infinite loop in PNS::LINE::Walkaround() causing an OOM&segfault
Fixes: lp:1767587
* https://bugs.launchpad.net/kicad/+bug/1767587
2018-05-02 15:06:08 -07:00
Maciej Suminski 73eab29802 Removed 2 unused variables from PNS::LINE::Walkaround() 2018-05-02 17:06:13 +02:00
Seth Hillbrand 12487e14ab Reduce extra loop comparison 2018-04-30 09:14:23 -07:00
Seth Hillbrand 2a87117edc Speed load/unload of complex boards
Corrects an error in polyline estimation

Syncs graphics to world PNS by whole layer set rather than
individual layer at a time.

Prevents reloading of full pns TOOL_BASE during reset of tools unless
the tool is being activated.

Fixes: lp:1766626
* https://bugs.launchpad.net/kicad/+bug/1766626
2018-04-28 16:11:07 +02:00
Jeff Young 7a7da560bc Keep unknown nets at 0 while routing.
Previous algorithm used a static variable which it decremented
for each new unconnected track, but this resulted in the router
marking earlier fixed segments as collisions (because they
would get set to netcode = 0 when "fixed").

Fixes: lp:1762043
* https://bugs.launchpad.net/kicad/+bug/1762043
2018-04-25 10:54:32 +01:00
Seth Hillbrand 45d1c19eb7 Add tooltip text to drag options. 2018-04-17 08:59:52 -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
Tomasz Włostowski ca4e4aead4 router: don't push vias if push force is zero
Fixes: lp:1758540
* https://bugs.launchpad.net/kicad/+bug/1758540
2018-03-26 20:13:32 +02: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
Jeff Young 3b0a758f97 Ensure router layer is visible.
Fixes: lp:1663556
* https://bugs.launchpad.net/kicad/+bug/1663556
2018-03-16 02:43:17 +00:00
Tomasz Włostowski ebd2b78f86 pcbnew/router: respect default net clearance for objects that don't have any net (e.g. board outline)
Fixes: lp:1753904
* https://bugs.launchpad.net/kicad/+bug/1753904
2018-03-07 11:47:37 +01:00
Maciej Suminski 18167f829a Derive KIDIALOG from wxRichMessageDialog
wxRichMessageDialog already offers a dialog with a checkbox, so
the custom dialog setup code is not necessary anymore.
2018-03-02 17:05:35 +01:00
Maciej Suminski 1d5df8e975 Renamed KI_DIALOG to KIDIALOG 2018-03-02 11:57:03 +01:00
Jon Evans 0d794b20bb Add null check in ROUTER_TOOL::breakTrack() 2018-02-27 08:45:06 +01:00
Jon Evans 31e78d670d Ensure ROUTER_PREVIEW_ITEM draws on top of all normal layers
Fixes: lp:1751646
* https://bugs.launchpad.net/kicad/+bug/1751646
2018-02-26 11:31:39 +01:00
Jon Evans be8bb24390 Make all new hotkeys editable; label some GAL-only hotkeys
Fixes: lp:1751183
* https://bugs.launchpad.net/kicad/+bug/1751183
2018-02-25 17:57:36 -05:00
Maciej Suminski 918ac567e5 Fix constant naming conflict in KI_DIALOG 2018-02-22 17:15:22 +01:00
Maciej Suminski fe0e44ba3d PNS: display a message in case of keep-out zone triangulation failure 2018-02-22 16:28:09 +01:00
Maciej Suminski 7129dcef91 Added STATUS_TEXT_POPUP for simple popup text display 2018-02-22 15:18:52 +01:00
Maciej Suminski 9673ac4ecd WX_STATUS_POPUP refactor
- Rename WX_STATUS_POPUP -> STATUS_POPUP
- Added Expire() to show a popup temporarily
- Code formatting
2018-02-22 15:18:52 +01:00
Maciej Suminski ab8e2419c2 PNS: Handle no-tracks setting in keep out zones
Fixes: lp:1748832
* https://bugs.launchpad.net/kicad/+bug/1748832
2018-02-19 10:25:05 +01:00
Jon Evans 0504a6db52 Don't sync zone if polygon triangulation fails 2018-02-19 08:49:34 +01:00
jean-pierre charras cf5d93857f PnS router: add support for circles in board outline 2018-02-18 21:00:28 +01:00
Tomasz Włostowski dfb98ce70b router: use more kicad-ish arc representation 2018-02-17 18:25:20 +01:00
Tomasz Włostowski 50c1ff67eb router: treat negative net indices as always colliding 2018-02-17 18:25:20 +01:00
Maciej Suminski ed9a14f01d PNS: disable autopanning in case of an error 2018-02-16 11:28:37 +01:00
Jeff Young 93999f7af6 Change "Automatic neckdown" to "Optimize pad connections".
Fixes: lp:1485202
* https://bugs.launchpad.net/kicad/+bug/1485202
2018-02-15 17:02:44 +01:00
Maciej Suminski 6afdf1cf87 PNS router: reset forced cursor position
Track dragging forces the cursor position, which is still kept when PNS
router is launched again. It is avoided by resetting the force cursor
position option before running the event loop.
2018-02-14 17:34:32 +01:00
Maciej Suminski 11d8b9ff55 Fix double disambiguation menu when dragging 2018-02-14 15:34:09 +01:00
Jeff Young 1afbfad44a Use "..." uniformly in menus.
See the bug report for some wording changes and a couple of
menu restructurings that were also cleaned up.

Fixes: lp:1597827
* https://bugs.launchpad.net/kicad/+bug/1597827
2018-02-10 17:32:28 -05:00
Tomasz Włostowski bc7ca08f07 router: check type before static_cast-ing 2018-02-09 13:00:57 +01:00
Tomasz Włostowski c0b61c19b7 router: fixed use-after-free error occuring when a newly routed segment covered exactly an older one
Fixes: lp:1747973
* https://bugs.launchpad.net/kicad/+bug/1747973
2018-02-08 11:34:31 +01:00
Tomasz Włostowski 271363f822 router: support for board outline 2018-02-06 09:43:56 +01: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 1858852f57 rename files 2018-02-02 21:57:12 +01:00
Maciej Suminski 95864780e2 Fix cursor freezes in GAL
Launching right click context menu overrides the cursor position, so all
actions executed by the tools will be performed in the right click
position. It created an issue, as the overridden cursor settings were
saved into wrong context if there was another tool activated in the
meantime.

Current implementation saves cursor settings for all tools and restores
them once the right click context menu disappears.

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

Fixes: lp:1746507
* https://bugs.launchpad.net/kicad/+bug/1746507
2018-02-02 19:08:05 +01:00
jean-pierre charras 39b4afecfa fix code after file renaming 2018-01-31 09:24:02 +01:00
jean-pierre charras b43dc7954c fix code after renaming files 2018-01-30 15:34:09 +01:00
jean-pierre charras 8552f3fedf fix code after renaming files 2018-01-29 22:00:44 +01:00
Jeff Young 3f6af59cac Avoid selection disambiguation menu when possible.
Some actions, such as select trivial connection, don't need the
user to choose which trace at a corner to start from -- either
one will do.  Same for moving a simple trace corner.

Likewise, Edit in Footprint Editor shouldn't ask if you mean the
footprint or the pad.  Obviously it's the footprint.

This change adds a CLIENT_SELECTION_FILTER which allows clients
to do tool- or action-specific filtering of the selection before
the disambiguation menu is run.

It also removes some tool- and action-specific code which was
in the selection_tool and shouldn't have been.

Fixes: lp:1708869
* https://bugs.launchpad.net/kicad/+bug/1708869
2018-01-18 09:09:25 +01:00
Camille f5f7ba4746 Fix loop variable copy in for-range loop, use const reference instead 2018-01-09 19:18:44 -05:00
Camille 9ff66a5274 Fix unnecessary value parameter detected by clang-tidy. - Replace value parameter by const reference parameter or move-assignement in some cases 2018-01-09 18:55:51 -05:00
Camille 3168d03fe5 Fix unnecessary copy initialization detected by clang-tidy 2018-01-09 18:22:10 -05:00
Tomasz Włostowski 44d4559f84 pcbnew: avoid segfault reported on certain OSX builds
Fixes: lp:1732274
* https://bugs.launchpad.net/kicad/+bug/1732274
2018-01-02 00:49:59 +01:00