Commit Graph

667 Commits

Author SHA1 Message Date
Jon Evans 0148c1db84 Support layer switch hotkeys while routing
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4699
2020-07-03 19:49:19 -04:00
Jon Evans 3d7610d6b9 Hide PNS debug graphics behind an AC key
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4061
2020-07-03 19:33:36 -04:00
Jon Evans c0aa6965de Migrate PcbNew project settings to new framework
Various architecture upgrades to support this.
Creating a BOARD now requires a valid PROJECT, which caused
some (mostly transparent) changes to the Python API internals.

ADDED: Project local settings file
CHANGED: Board design settings are no longer stored in PCB file
CHANGED: Net classes are no longer stored in PCB file
CHANGED: Importing board settings now reads boards, not just projects

Fixes https://gitlab.com/kicad/code/kicad/-/issues/2578
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4070
2020-07-02 22:08:54 -04:00
Jeff Young 2cfd6ba978 Fix a couple of integer overflows. 2020-07-02 22:52:37 +01:00
Jeff Young eb1ff80d57 SHAPE collision fixes.
1) An actual distance of 0 is still a collision, even if the allowed
distance is 0.
2) Be consitent about edges and interiors.  Everyone expect the edge
of a RECT to be part of the RECT; same with a CIRCLE.  SHAPE_POLY_SET
shouldn't be any different.  (And SHAPE_LINE_CHAIN was a split-
personality with the edge considered part of it for Collide() but not
for PointInside()).
2020-07-02 21:38:37 +01:00
Jeff Young 441dfa30f0 Return individual custom pad shapes instead of a SHAPE_POLY_SET.
Also implements an optional pointer to return the actual distance
from all the SHAPE collision routines.

Fixes https://gitlab.com/kicad/code/kicad/issues/4774
2020-07-02 17:09:15 +01:00
Ian McInerney 17adb6c3c6 Add context menu to route and zone toolbar items
ADDED: Context menu for route and zone toolbar items
2020-06-26 21:29:03 +00:00
Jeff Young d01b29ab37 Cleanup pad geometry handling.
There were a lot of plotters, exporters, etc. that were rolling their
own implementations.

This also introduces a lazily-built set of SHAPE objects for doing
collision detection and some forms of rendering (and later DRC).
2020-06-22 22:28:37 +01:00
Jeff Young aeed8e6e2c Finish implementation of DRAWSEGMENT::C_RECT.
It's currently only supported in the Footprint Editor.  It could be
easily added to the board editor (all the code is there), but the board
editor is a little short on room in the drawing tools toolbar.
2020-06-15 20:51:31 +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
Seth Hillbrand a8ab668122 Move SHAPE_ARC to start->mid->end format
The arc shapes need to connect with their adjacent points.  By storing
the relevant points, we allow exact point matching on both ends of the
arc as well as localize point storage.
2020-06-13 11:23:14 -07:00
Seth Hillbrand 1c46bf1955 PNS: Use segment shape for all oval pads
Instead of calculating a simple polygon for the oval pads that are
rotated, we use a rotated segment.

Fixes https://gitlab.com/kicad/code/kicad/issues/4604

(cherry picked from commit 25b8da8e3b)
2020-06-04 20:29:25 -07:00
Seth Hillbrand 674226f99f pcbnew: Set flag when cancelling during routing
Fixes https://gitlab.com/kicad/code/kicad/issues/4475
2020-06-04 15:48:01 -07: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
Jeff Young 05855a5a1c Performance enhancements for DRC. 2020-05-18 13:38:17 +01:00
Jeff Young 3c3984a6fc Generalize default footprint fields.
Fixes https://gitlab.com/kicad/code/kicad/issues/2289
2020-05-08 23:30:33 +01:00
Jon Evans 51eac3e3e6 Split pcbnew and footprint editor settings getters for clarity 2020-05-05 21:46:00 -04:00
jean-pierre charras 83cb9c0d14 Fix a few Coverity and compil minor warnings. Remove dead code 2020-04-21 12:47:48 +02:00
Michael Kavanagh 7db355e34a ADDED: TOOL_ACTION for switching PNS router mode.
Fixes https://gitlab.com/kicad/code/kicad/issues/2249
2020-04-19 22:44:05 +00:00
Jeff Young 9c8941e040 Remove a bunch of globals. 2020-04-16 17:34:46 +01:00
Tomasz Wlostowski 4a3cd77416 router: smarter way to check the shove direction without using silly heuristics 2020-04-15 13:00:48 +02:00
Jeff Young 6e800bddae Rationalize penWidth processing as first step in removing some globals. 2020-04-13 20:58:13 +01:00
jean-pierre charras bdada70ee7 Cosmetic enhancements: add bitmaps to a few context menus.
Fix also a minor compil warning.
2020-04-12 10:29:28 +02:00
jean-pierre charras ffe0b4aba1 Fix a few Coverity warnings. 2020-04-02 14:21:09 +02:00
jean-pierre charras ddb7b2b2b7 pns router: fix possible hang when using "end" key to finish the current track.
Add also left double click (same as "end" key) to finish the track.

Fixes #4116
https://gitlab.com/kicad/code/kicad/issues/4116
2020-04-02 14:21:09 +02:00
jean-pierre charras e811101567 fix a few Coverity warnings. 2020-04-01 09:34:44 +02:00
jean-pierre charras 6e47f147aa A few Coverity fixes. 2020-03-30 09:50:26 +02:00
jean-pierre charras 9d2712a824 Fix a few Coverity warnings.
It also fix:

Fixes #4082
https://gitlab.com/kicad/code/kicad/issues/4082
2020-03-29 18:42:24 +02:00
Seth Hillbrand 4dfe630b28 PNS: Moving the rest of the placer to Fix/Commit
Springback introduced a new PNS structure to check for valid placement
as well as separating the Fix/Commit routines.  This updates the
remaining placers to utilize the new structure.

Fixes https://gitlab.com/kicad/code/kicad/issues/4008
2020-03-06 09:56:44 -08:00
Seth Hillbrand f6317fba82 PNS: Protect drag from null deref
Items that do not have nets will not be in the index, so we need to
avoid the null pointer when adding drag tagets

Fixes https://gitlab.com/kicad/code/kicad/issues/4009
2020-03-06 09:32:04 -08:00
Seth Hillbrand 0417a6b409 PNS: Fix missing via on zero-length
The current node needs to be kept for zero-length lines when placing a
via.

Fixes https://gitlab.com/kicad/code/kicad/issues/4005
2020-03-05 15:02:40 -08:00
Seth Hillbrand b0d9838fb4 PNS: Correct assertion when dragging
Dragging using highlight caused an assertion as the duplicated lines
were being re-added with their old links still inplace.  While this was
probably fine as the link references shouldn't be stale, we clear them
to allow for the possibibility that the dragger will adjust the links in
the future.
2020-03-05 08:47:06 -08:00
Seth Hillbrand 4c2626f6b0 PNS: Don't use PNS margin to calc bump direction
The bump direction should only be concerned with physical points to
calculate the heuristic for loop-back otherwise we get too many false
positives.

Fixes https://gitlab.com/kicad/code/kicad/issues/3971
2020-03-04 19:22:57 -06:00
Seth Hillbrand fe8524b9bb Update DIFF_PAIR_PLACER to new callbacks
Needs to handle changes to PNS_ROUTER.  This does not implement
springback or backspace in DIFF_PAIR_PLACER, only allows committing
lines as before

Fixes https://gitlab.com/kicad/code/kicad/issues/3988
2020-03-04 17:23:04 -06:00
Seth Hillbrand d4cbc348de PNS: avoid committing route with nothing
The node is not neccesarily populated when committing, so we need to
check for validity first.

Fixes #3984 | https://gitlab.com/kicad/code/kicad/issues/3984
2020-03-03 14:02:32 -08:00
Seth Hillbrand 9769e1020b PNS: Don't link unroutable items
The joint map only works for items that are routable, so don't bother
adding unroutable items as this only takes additional time to process

Fixes #3976 | https://gitlab.com/kicad/code/kicad/issues/3976
2020-03-03 12:42:56 -08:00
Seth Hillbrand d6706c257c PNS: clear via when fixing route
When fixing the route, we need to clear the via to avoid re-placing it
on each future click.

Fixes #3966 | https://gitlab.com/kicad/code/kicad/issues/3966
2020-03-02 16:22:34 -08:00
Seth Hillbrand 386147628e PNS: Initialize placement test 2020-03-02 16:22:34 -08:00
Seth Hillbrand 3c19704349 PNS: Don't add null items to drag
Not all footprint pad items are connected to elements in the PNS, so if
we don't find the parent element, we avoid later crashes/assertions by
skipping their addition

Fixes #3972 | https://gitlab.com/kicad/code/kicad/issues/3972
2020-03-02 11:28:14 -08:00
Seth Hillbrand 18db471967 PNS: Line placer returns false when nothing committed
The true/false return should be triggered on whether any elements have
been commited to the line

Fixes #3969 | https://gitlab.com/kicad/code/kicad/issues/3969
2020-03-02 11:11:13 -08:00
Tomasz Wlostowski a28f58d14d router: fix regression in PNS_KICAD_IFACE treating newly created items as invisible (side effect = non-45 degree angles due to incorrect snapping) 2020-02-29 20:41:31 +01:00
Tomasz Wlostowski 6850067182 router: commit traces made in single stroke/click (fixes regression introduced with Backspace support) 2020-02-29 20:40:19 +01:00
Tomasz Wlostowski e5fff302a3 router: fix arc drawing in ROUTER_PREVIEW_ITEM 2020-02-28 23:52:33 +01:00
Tomasz Wlostowski e0bad936bf router: enable inline dragging of components 2020-02-28 23:17:15 +01:00
Tomasz Wlostowski 44905e1b0a router: initial support for dragging components with traces attached 2020-02-28 23:17:15 +01:00
Tomasz Wlostowski b2b1edbcd1 router: KICAD_IFACE can now commit changes to module positions 2020-02-28 23:17:15 +01:00
Tomasz Wlostowski b6e059f018 router: use a common base class for all dragging algorithms 2020-02-28 23:17:15 +01:00
Tomasz Wlostowski 1d0ee66187 router: kill debug printf() 2020-02-28 23:17:15 +01:00
Tomasz Wlostowski 77478014d8 router: kill some warnings in OPTIMIZER 2020-02-28 23:17:15 +01:00