Commit Graph

1263 Commits

Author SHA1 Message Date
Jon Evans b4342d813b Fix SHAPE_LINE_CHAIN::Slice when end is an arc followed by a point
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9770
2021-11-25 10:05:33 -05:00
Jeff Young ade8fe4333 When dragging footprints pads with holes also need to be taken along.
Otherwise (aside from not colliding with their dragged location) we
won't update their locations and then if they happen to be the first
pad in the footprint we'll try to update the footprint's location post-
drag with the pad offset (which will be {0,0}.

This is easily reproducible with the test document in the bug in the
"fixes" statement.

Fixes https://gitlab.com/kicad/code/kicad/issues/9391
2021-11-25 14:54:12 +00:00
Jeff Young f9e1429c60 Naming conventions. 2021-11-25 14:54:12 +00:00
Jeff Young 5985a21b74 Offset internal items by drag amount.
Some tools move only preview items while keeping the real items
hidden.  Those tools must use this new offset parameter.

Other tools move the real items.  Those tools can ignore this
parameter (which will default to {0,0}).

Fixes https://gitlab.com/kicad/code/kicad/issues/9391
2021-11-25 14:54:12 +00:00
Jeff Young ba6ae4fa9b Kicad has many plugins. This one is for the pcb. 2021-11-25 12:56:46 +00:00
Jeff Young 1c3e1df3ca Not all holes are round.
We currently only need this to work for vias as we're a long way
from being able to support it for pads, so just check the hole
shape.

Fixes https://gitlab.com/kicad/code/kicad/issues/9735
2021-11-23 14:36:05 +00:00
Tomasz Wlostowski e56e61ffb5 router: fix typo in the DP tuning fix patch 2021-11-23 00:21:38 +01:00
Tomasz Wlostowski 89228e1ebe router: increase parallelity detection threshold for AssembleDiffPair()
Partially fixes the misrecognized diff pairs issue.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/8567
2021-11-22 01:35:12 +01:00
Tomasz Wlostowski e60386f028 router: disable 'limit corner count' optimization for via dragging
It seems to be completely preventing optimization instead of preventing over-optimization in case the head is a dragged via.
To be investigated in more details in V7.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/8665
2021-11-22 00:05:17 +01:00
Tomasz Wlostowski ccf9a72078 router: fix ghost dots issue in router preview items
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/8665
2021-11-22 00:05:17 +01:00
Roberto Fernandez Bautista bbafce6ab3 PNS: Don't clip the line in the middle of an arc - just start again
In shove mode, returning an empty line results in keeping the current
head, which should be okay for now.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/9023
2021-11-21 19:53:03 +00:00
Roberto Fernandez Bautista 4e0ad07eb0 PNS::Shove Add margin when generating hulls for arc segments
Partially fixes https://gitlab.com/kicad/code/kicad/-/issues/9023

There is still a case where if the shover does not find a solution,
we try clipping the arc and it still collides.
2021-11-21 17:13:21 +00:00
Jon Evans b1878fcc54 ClipVertexRange: fix fallout of NextShape API change
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9711
2021-11-21 11:03:22 -05: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
Tomasz Wlostowski c40e921cb3 router: remeber to make a shove lockpoint when placing a lone via
Note to self: works around a possible bug in CommitPlacement()/RewindToLastLockedNode()

fixes: https://gitlab.com/kicad/code/kicad/-/issues/9695
2021-11-21 00:18:20 +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
Jeff Young 1f4858c314 Show holes in router preview items for vias.
Fixes https://gitlab.com/kicad/code/kicad/issues/9658
2021-11-20 12:21:24 +00:00
Jon Evans ed478f5ec0 Revert to ERROR_INSIDE for complex pad shape hulls in PNS
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9544
2021-11-15 19:15:05 -05:00
Jon Evans 8ec3ce99ae PNS: Update shover when autocompleting on item
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9598
2021-11-10 18:17:56 -05:00
Jon Evans 59807d8d26 A better solution to discarding pending shove operations
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9553
2021-11-09 00:00:54 -05:00
Johannes Pfister 64f77b3596 PNS: Add support for 90-degree corner modes
Fixes https://gitlab.com/kicad/code/kicad/-/issues/6902
2021-11-03 02:14:23 +00:00
Jon Evans 153594b9ea PNS: Actually implement the AbortRouting API
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9425
2021-10-31 16:06:57 -04:00
Jon Evans 08700e3522 Router: show corner style in message panel 2021-10-30 09:08:52 -04:00
Jon Evans e6c3027531 Action string typo fixes 2021-10-30 08:47:36 -04:00
jean-pierre charras 63d4d84aaa pcbnew, router: fix a crash and some other issues related to microvias and blind/buried vias
- fix crash when trying to create a microvia from a internal layer (boards with > 4 layers)
- fix a bug that allowed to create a non through hole via on only one layer
- fix a bug that allowed to create a microvia on non adjacent layer pair
- when placing a via and selecting the target layer from dialog, show only allowed layers.
Fixes #9477
https://gitlab.com/kicad/code/kicad/issues/9477
2021-10-29 17:54:04 +02:00
Electro707 4afb59fda0 Added feature to switch between router modes
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9414
2021-10-28 22:46:05 +00:00
Jon Evans 4a9b3d9673 PNS: clear leftover vias from previous trace in DP placer
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9283
2021-10-27 21:58:42 -04:00
Jeff Young 36d11f745e Update ratsnest while dragging footprints.
Fixes https://gitlab.com/kicad/code/kicad/issues/9391
2021-10-25 21:45:30 +01:00
Jon Evans 328d3d0d77 PNS: Fix rule resolution when starting from PTH
Have to use the routing start layer, not the first
layer of the PTH, to get the appropriate sizes
2021-10-23 22:46:31 -04:00
Jon Evans 3b18dce911 Remove vestigal setting
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9444
2021-10-23 22:12:25 -04:00
Seth Hillbrand 2a6c73b8df Check for hole before highlighting
Fixes https://gitlab.com/kicad/code/kicad/issues/9423
2021-10-19 11:25:00 -07:00
Seth Hillbrand e9205a0740 Fix mistaken comparison in highlighting
Need to compare between elements colliding

Fixes https://gitlab.com/kicad/code/kicad/issues/9413
2021-10-18 13:38:27 -07:00
Seth Hillbrand faba2b06c2 Lock track width after placing segment
We don't want to allow the full track width to change after placing a
segment when we are in follow-segment mode. This would require either
ripping up and re-solving the existing track or allowing potential DRC
errors.

Fixes https://gitlab.com/kicad/code/kicad/issues/9395
2021-10-14 09:21:14 -07:00
Seth Hillbrand 35e90d0cf4 Allow changing router mode while routing
Keeps shove active even when not using to allow switching modes during
routing.

Fixes https://gitlab.com/kicad/code/kicad/issues/9342
2021-10-12 09:55:34 -07:00
Seth Hillbrand 7f1247a23c Update track width when changed
Tracks starting from pads should change in response to the track width
changing despite having the "follow existing track" width selected.
2021-10-12 09:55:34 -07:00
jean-pierre charras 4d6b1a4e36 pns_diff_pair_placer: fix empty message when a signal of a pair is not found.
Fixes #9334
https://gitlab.com/kicad/code/kicad/issues/9334
2021-10-08 14:57:01 +02:00
Seth Hillbrand a8ec3b58ed Use via's real drill value for hole size
If the via drill is "Default" be sure to get the default value rather
than the placeholder

Fixes https://gitlab.com/kicad/code/kicad/issues/9313
2021-10-06 11:00:58 -07:00
Roberto Fernandez Bautista 2e120528c8 Length Tuner: Allow single meander when it fits on its own 2021-09-28 18:50:31 +01:00
Roberto Fernandez Bautista 71156368c9 Length Tuner: Allow controlling the side of the meander using the cursor
Also fixes an issue that did not allow single meanders to be placed
2021-09-28 18:50:31 +01:00
Mike Williams 726f9ebe3d Pcbnew: Router tool should not block drag selection when idle
The other drawing tools allow drag selection while idle. Also, it makes
it more obvious to the user when accidentally drag selecting while
routing than just doing nothing on a drag with the routing tool selected
and idle.
2021-09-27 16:05:13 +00:00
Jeff Young 5f3c67bd2b Fill in some missing GetMsgPanelItems and make some others consistent.
Also expunges a std::vector<MSG_PANEL_ITEM> cover type.
2021-09-27 00:23:40 +01:00
Jon Evans a2ad204f4b Fix off-by-one in AssembleTuningPath
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9003
2021-09-22 20:25:22 -04:00
Seth Hillbrand be799b49a8 Fix equality in dp matching
A single count is found when dp ends with matching char.  .Right(0) will
return an empty wxString() which is still valid

Fixes https://gitlab.com/kicad/code/kicad/issues/9206
2021-09-21 19:47:15 -07:00
Jon Evans cf53b053a1 Improve handling of dragging around locked segments
Locked segments now are not modified if they weren't the start item.
If a locked segment is the start item, it is automatically unlocked.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/9145
2021-09-21 22:38:53 -04:00
Seth Hillbrand 22a29a42cf Generalize net DP matching
The requirement of 1-2 numbers following P/N or +/- was arbitrary and
not needed.  We also add the _ to allowable suffixes to permit DP
matching of auto-renamed nets
2021-09-20 15:30:47 -07:00
Roberto Fernandez Bautista dc1fd3d9ba PNS test app: Add logging information for curved track routing 2021-09-20 20:35:24 +01:00
Jon Evans 4d478d6f17 Fix ordering of initialization in length tuner
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9161
2021-09-14 07:48:02 -04:00
Jeff Young fdfecf5932 Don't push view control settings to the previous active tool.
See further comments in bug report.

Fixes https://gitlab.com/kicad/code/kicad/issues/9147
2021-09-13 13:28:05 +01:00
Seth Hillbrand 092cdc0bb5 Move 45° limit to hotkey
This assigns the "Tab" key to a general pcbnew 45° limitation.  Limit
can be enabled/disabled using context menu as well.

Removed the user preference for 45° limitation on graphic lines as that
is overlapping with the general limitation, which is not an editing
preference so much as a temporary adjustment to tool action.

Related to https://gitlab.com/kicad/code/kicad/-/issues/8490
2021-09-05 13:42:51 -07:00
Tomasz Wlostowski a03b6f6fc9 router: use tail start point when saving the FIXED_TAIL
fixes: https://gitlab.com/kicad/code/kicad/-/issues/8771
2021-08-25 00:36:34 +02:00
Roberto Fernandez Bautista 4c17b7ab46 WALKAROUND::Route Check if path is empty before stepping
singleStep expects a path with at least one point.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9020
2021-08-24 20:17:19 +01:00
Jon Evans 09ea630d8e Don't log a potentially invalidated item
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9006
2021-08-21 12:24:41 -04:00
Roberto Fernandez Bautista aa67abb681 PNS::NODE Use PointCount instead of calculating segment index manually
There is no need to manually calculate the segment index - we know
that the last point that was added is the start point of the segment.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/8945
2021-08-13 19:09:33 +01:00
Roberto Fernandez Bautista 0120c5fa4b PNS Length Tuning: Recover original arc tracks after tuning 2021-08-09 21:10:33 +01:00
Jon Evans e91218b876 PNS: don't mark holes only if there's also a solid violation
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8874
2021-08-08 15:41:39 -04:00
jean-pierre charras fa82fcb809 Router tool: ensure a internal layer exists when placing a microvia.
Fix also a minor compil warning.
Fixes #8931
https://gitlab.com/kicad/code/kicad/issues/8931
2021-08-07 20:29:49 +02:00
Jeff Young c51b1dad72 Generalize infobar MESSAGE_TYPE handling and use for DRC errors.
Fixes https://gitlab.com/kicad/code/kicad/issues/8782
2021-08-01 21:51:39 +01:00
Jeff Young f221220fe2 Rename layer ids file.
It hasn't had anything to do with colors or visibility for some time
now.
2021-07-29 16:03:25 +01:00
Wayne Stambaugh 78e5e98ea0 Pass VECTOR2I objects by reference instead of on the stack. 2021-07-27 08:41:27 -04:00
Jeff Young 0fb864d596 Pull some name changes back from 7.0 to ease merging. 2021-07-21 20:58:59 +01:00
Wayne Stambaugh cf00319c85 More NULL expunging. 2021-07-20 07:27:18 -04:00
Jon Evans e61b1f03b8 PNS: Discard duplicate tracks in FixRoute
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8737
2021-07-13 21:13:40 -04:00
Seth Hillbrand ff2e470a6e Remove virtual items from clearance calculations
Extends 3ea970f8c9 to ensure that virtual items do not interfere with
DRC calculations while routing

Fixes https://gitlab.com/kicad/code/kicad/issues/8788
2021-07-13 16:10:36 -07:00
Seth Hillbrand 3ea970f8c9 Don't add virtual items to the display
By definition virtual vias should only exist in the backend, not
affecting users

Fixes https://gitlab.com/kicad/code/kicad/issues/8788
2021-07-13 15:52:41 -07:00
luz paz 0446d35f0d Fix source comment/doc typos (follow-up)
Found via `codespell -q 3 -S *.po,./thirdparty -L aactual,acount,aline,alocation,alog,anormal,anumber,aother,apoints,aparent,aray,dout,einstance,modul,ot,overide,serie,te,,tesselate,tesselator,tht`
2021-07-13 10:48:17 +00:00
Jeff Young 2bd735b631 A little more safety in setting the router idle mode.
Fixes https://gitlab.com/kicad/code/kicad/issues/8765
2021-07-09 10:26:12 +01:00
Jon Evans 00f1b609c4 PNS: Don't run fanout cleanup when manually forced
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8724
2021-07-08 19:56:42 -04:00
Wayne Stambaugh 65c7958293 Coverity issue fixes.
Issues #331869, #331875, #332203, #332159, #332171, #332180, and #332648.
2021-07-08 08:33:08 -04:00
Jon Evans edc2be9018 Update width status when user choice changes
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8265
2021-07-07 21:26:21 -04:00
Roberto Fernandez Bautista 4207165c26 Fix PNS deleting too many segments
Don't exit the loop pre-emptively. Need to update lastLink.
2021-07-07 19:54:19 +01:00
Roberto Fernandez Bautista cda26bd57b SHAPE_LINE_CHAIN::NextShape instead of explicitly calculating indices
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8738
2021-07-07 19:46:47 +01:00
Roberto Fernandez Bautista 81fa40d659 Code style: Fix missing space 2021-07-05 20:39:42 +01:00
Roberto Fernandez Bautista 04ff8cde5e Drag & Fillet Tracks: Ignore mouse up / click events until move / drag
Ensures that any click/mouse up events generated after clicking "OK"
in the "Override locks" dialog are ignored.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/8123
2021-07-05 20:29:25 +01:00
Jon Evans e0146f73b9 PNS: Pick up complete lines between pads when dragging components
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7614
2021-07-03 20:00:54 -04:00
Jon Evans 91ea4a0569 PNS: Pick up segments directly between pads when dragging components
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7601
2021-07-03 19:50:04 -04:00
Roberto Fernandez Bautista 3f73d8c2b5 SHAPE_LINE_CHAIN::Area() should always be positive
The algorithm relied on the assumption that the points were
ordered anti-clockwise. When ordered in a clockwise fashion, the
result was correct but negative.

Refer to https://www.mathopenref.com/coordpolygonarea2.html
for more information.
2021-07-03 19:37:50 +00:00
Roberto Fernandez Bautista c3051ba48a Refactor SHAPE_LINE_CHAIN to allow two shapes per point
m_shapes now has two possible indices. The first one is populated if
the point is associated with an arc and the second index is populated
if the point is shared between two arcs.
2021-07-03 19:37:50 +00:00
Jon Evans 252bf76452 Fix off-by-one in AssembleTuningPath 2021-07-03 14:37:52 -04:00
Jon Evans 3c59e452d6 PNS: Set tuned path correctly in skew tuner
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8708
2021-07-03 14:06:30 -04:00
Jon Evans 277bf2b719 Add feedback showing current router state to the message panel
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8265
2021-07-03 13:21:51 -04:00
Jeff Young 400f4ae506 Code cleanup. 2021-07-02 15:54:26 +01:00
Jeff Young 780a8a5154 Fix another place disallowing internal microvias.
Fixes https://gitlab.com/kicad/code/kicad/issues/8716
2021-07-02 15:54:26 +01:00
jean-pierre charras 740b028180 pns_line_placer: do not constraint the 45deg of current segment in free angle mode.
Fixes #8691
https://gitlab.com/kicad/code/kicad/issues/8691
2021-07-01 16:38:31 +02:00
Roberto Fernandez Bautista 04b71f5167 Meander minimum spacing can be equal to track width + minimum clearance
2x track width was too constraining in some scenarios

Also better wording "Min Spacing" to indicate to the user that
the actual spacing could be larger if there are any constraints.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/8172
2021-06-29 19:30:01 +01:00
Roberto Fernandez Bautista e402563087 Don't recalculate meander spacing. Use constrained value instead.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/1776
2021-06-29 19:30:01 +01:00
Jeff Young c159500101 Remove nags and make Sel Layer and add via commands uniform.
Fixes https://gitlab.com/kicad/code/kicad/issues/8686
2021-06-28 19:17:01 +01:00
Jeff Young 0dfb5fcaf9 Error message cleanup.
wxString::Format is redundant in a wxLogXXX call.
Error messages should generally be translatable.
Error messages should use generally consistent sentence forms.
2021-06-26 22:53:24 +01:00
Jon Evans a7eb611744 Fix leftover vias in shove mode
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8597
2021-06-23 22:13:35 -04:00
Jeff Young c6606a0582 Hook up delete to undo last segment when routing.
Fixes https://gitlab.com/kicad/code/kicad/issues/8362
2021-06-19 11:37:20 +01:00
Jeff Young 096e342386 Prefix TRACK, ARC and VIA. 2021-06-11 22:07:02 +01:00
luz paz f968fc8719 Fix source comment / documentation typos 2021-06-09 19:32:58 +00:00
Marek Roszko d946d6e68f Cleanup some pgm_base.h includes 2021-06-08 21:56:00 -04:00
Marek Roszko 6e01ce84b9 Break out eda_item_flags.h, fix the typedef to std::uint32_t, fix some signed vars 2021-06-08 19:12:30 -04:00
Jon Evans 75ce97e260 Fix the last cause of duplicate segments when completing a route
Fixes https://gitlab.com/kicad/code/kicad/-/issues/6863
2021-06-07 20:34:09 -04:00
Seth Hillbrand d4edc70f65 Remove magic numbers where possible
Constant scales will be pre-calculated during compilation, so we can
leave the actual formula in place without penalty
2021-06-07 13:56:31 -07:00
Jon Evans 49c5130123 PNS: Implement final cleanup pass for redundant colinear segs
Fixes https://gitlab.com/kicad/code/kicad/-/issues/6863
2021-06-06 21:52:35 -04:00
Jon Evans 3c6b98a0d5 PNS: preserve auto-detected track width when changing via sizes
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8046
2021-06-06 20:18:09 -04:00
Jon Evans 99710aba48 PNS: use slightly less greedy algo to reset the mouse trail 2021-06-06 19:47:52 -04:00
Jon Evans 6cb8154ec0 PNS: Remove code that broke width changes during placement
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8334
2021-06-06 19:21:52 -04:00
Jon Evans 6789dac20b PNS: Keep most recent good placement around for a rainy day
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8562
2021-06-06 18:56:33 -04:00
Jon Evans c9bc45f7ed PNS: Limit the maximum walkaround distance factor
The constant chosen is somewhat arbitrary and may need
further tuning or a more complex algorithm, but in general
this will prevent churning when solutions can't be found or
a solution can be found but it is unrealistic (going around
the entire board)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/8558
2021-06-06 16:03:03 -04:00
Jon Evans d32b9c1c25 Use debug group for line placer debug 2021-06-06 15:44:53 -04:00
Jon Evans f5185f6927 Revert part of the anti-churn change, it causes bad side-effects
Further performance tuning could be useful but the part that
remains helps the most when hugging in large designs
2021-06-06 15:44:53 -04:00
Marek Roszko 8377ebb0e1 Fix msvc warnings 2021-06-06 15:30:31 -04:00
Marek Roszko 10e60acf34 Clean up including of board_design_settings.h 2021-06-06 15:03:42 -04:00
Jon Evans 5349f47f95 PNS: Prevent walkaround churn in unsolvable situations
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8558
2021-06-06 14:57:52 -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
Jon Evans 17da050e69 Improve walkaround results when last point is inside the hull
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8563
2021-06-06 12:55:32 -04:00
Jon Evans be61bf29dd Use more accurate hull shapes for round solids
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8561
2021-06-06 09:53:51 -04:00
Marek Roszko b610b905fc Cleanup track.h includes 2021-06-06 09:06:55 -04:00
Jon Evans 3b7480c1c1 PNS: Invalidate start/end items after finishing a route
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8555
2021-06-06 08:52:39 -04:00
Tomasz Wlostowski ab04e24f9a router: rhMarkObstacles should return a correct error status
Long story short: a few days ago I fixed error handling in routeStep(), so it actually started to recognize the wrong error status returned
by rhMarkObstacles() and think that the trace is always incorrect.

fixes: https://gitlab.com/kicad/code/kicad/-/issues/8557
2021-06-04 23:58:56 +02:00
Jeff Young 00791e1e37 Fix compile issues on clangd. 2021-06-03 23:41:06 +01:00
Marek Roszko 1c1ba25ffd Use char_str instead of c_str in previous commit 2021-06-03 18:13:35 -04:00
Marek Roszko daf510344f Fix build error due to pns changes 2021-06-03 18:05:48 -04:00
Tomasz Wlostowski 63fc7a1908 router: support for drag/walkaround/shove for joints between lines of different widths.
fixes: https://gitlab.com/kicad/code/kicad/-/issues/1773
2021-06-03 22:44:53 +02:00
Tomasz Wlostowski af26eab5fb router: even more debug in SHOVE 2021-06-03 22:44:53 +02:00
Tomasz Wlostowski a744857267 router: fix array out-of-bound error in HullIntersection()
fixes: https://gitlab.com/kicad/code/kicad/-/issues/8538
2021-06-03 22:44:53 +02:00
Tomasz Wlostowski 3e98c44636 router: LOGGER now stores UUIDs, not pointers to BOARD_ITEMs.
Caused occasional crashes when saving the debug event log, as some of the BOARD_ITEMS could have been deleted before SaveLog call.
2021-06-03 22:44:53 +02:00
Tomasz Wlostowski e5e588ebba router: temporarily export LINE::Walkaround() debug global variables 2021-06-03 22:44:53 +02:00
Tomasz Wlostowski 70ed5c1ae8 router: introduce concept of 'virtual' vias as a base for shoving/dragging joints of lines of different widths. 2021-06-03 22:44:53 +02:00
Ian McInerney 4f05262705 Cleanup includes in board.h and footprint.h 2021-06-03 20:19:52 +01:00
Marek Roszko 4df3cb912d Remove another leaky wx/log.h header 2021-06-03 08:11:15 -04:00
Marek Roszko cf2bb5692a Remove the wxLog calls from math/util.h for now
This was leaking windows headers and partial wx headers to 1084 compilation units......
This also means math/util.h is leaking to 1084 compilation units which seems a bit high too.
2021-06-01 18:44:22 -04:00
Jon Evans 247da631f9 Revert "Fix typo and clean up leftover tracks"
This reverts commit ed66c0f14d.

Revert "Clean up co-linear tracks after finishing routing"

This reverts commit 1a102f03c0.

More complex solution needed

Fixes https://gitlab.com/kicad/code/kicad/-/issues/8526
2021-06-01 11:18:00 -04:00
Jon Evans 1a102f03c0 Clean up co-linear tracks after finishing routing
This involved adding some extra infrastructure to be able
to handle the case where a track that is sitting in the
router's commit waiting to be added to the board actually
needs to be deleted instead.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/8419
2021-05-31 17:36:38 -04:00
Marek Roszko 382dca4e6f Fix uninitialized member warnings
Based on PVS Studio report
2021-05-30 20:01:01 -04:00
Tomasz Wlostowski 67f0bbc6d7 router: fixed crash in HullIntersection() when the path has 0 or 1 points.
fixes: 8515
2021-05-31 00:20:32 +02:00
Tomasz Wlostowski 614787caae router: clear head line geometry if current head routing failed + small improvement to follow-mouse optimization.
Also added a lot of verbosity for the pns-log-viewer tool.

Fixes: 8511
2021-05-31 00:18:42 +02:00
Tomasz Wlostowski dfd80e077c router: fix another corner case in LINE::Walkaround() (duplicated vertex triggered by feeding a closed loop as the input path)
fixes: 1775
2021-05-31 00:17:12 +02:00
Jon Evans 0da85ded2f PNS: Fix diff pair handling of microvias as start items
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8514
2021-05-30 15:51:28 -04:00
Tomasz Wlostowski fcb89b99a3 router: walkaround algo should not copy the previous via position when the current iteration via placement fails.
fixes: 7827
2021-05-30 00:35:58 +02:00
Tomasz Wlostowski af2e163890 router: annotate source locations of WALKAROUND debug items 2021-05-30 00:35:54 +02:00
Jon Evans 3eb5a484e1 PNS: Don't clip tuning paths to pads on other layers
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8504
2021-05-29 15:52:44 -04:00
Jon Evans 28f17c3ae6 PNS: Prevent wrong clearance being cached for new diff pairs
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8377
2021-05-29 13:31:17 -04:00
Jon Evans 85ca85652d Do not add debug items to view if debug flag isn't enabled
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8510
2021-05-29 12:40:24 -04:00
Jon Evans bd59da3642 PNS: Local min distance has a minimum points requirement
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8510
2021-05-29 12:40:24 -04:00
Tomasz Wlostowski ebd957b08e router: rework router's debugging infrastructure to be more compatibile with the 'qa/pns/pns-log-viewer' tool.
The log viewer tool lets you inspect all the intermediate stages of the routing algorithms. This patch:
- Adds source location tracking of the debug calls (need to use the PNS_DBG macro, sorry)
- Moves some wxLogTrace calls to DEBUG_DECORATOR::Message() so that messages can be displayed alongside the corresponding geometric shapes
2021-05-29 00:13:24 +02:00
Tomasz Wlostowski 132eb53a40 router: clean some debug clutter 2021-05-29 00:13:24 +02:00
Tomasz Wlostowski b3caa3c4d4 router: fix ordering of colliding hulls in NODE::NearestObstacle()
Replaced the generic SHAPE_LINE_CHAIN::Intersect() with PNS::HullIntersection() which correctly rejects
'non-penetrating' intersections.
2021-05-29 00:13:24 +02:00
Tomasz Wlostowski e66bbfd1ec router: improve the feel of the walkaround algorithm
Makes walkaround more 'huggy' - the trace being routed sticks to obstacles
instead of jumping around in uncontrollable way.
2021-05-29 00:13:24 +02:00
Tomasz Wlostowski 8148b5d81f router: improvements in LINE::Walkaround()
- Fix walk failure if the input path starts on the hull boundary
  (happens very often during tight walkaround)
- Input line can have a loop at the end now. Such condition happens when the routing
  destination point lies inside the hull of a colliding primitive.
2021-05-29 00:13:24 +02:00
Tomasz Wlostowski d2ec3fc4ed router: P&S-specific hull/line interection function that correctly rejects segments/vertices that only touch the hull polygons without penetrating them 2021-05-29 00:13:24 +02:00
Tomasz Wlostowski 8c4361bbc6 router: adapt to new SHAPE_LINE_CHAIN::INTERSECTIONS structure 2021-05-29 00:13:24 +02: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 4c69a74505 Force layers visible when routing on them.
Fixes https://gitlab.com/kicad/code/kicad/issues/8432
2021-05-16 11:18:31 +01:00
david-beinder 75f49ba1b6 Add length tuner settings to toolbar context menu 2021-05-12 02:34:52 +00:00
Jon Evans bc6b9b527a Allow stackup height to be excluded from length calculations
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8384
2021-05-10 22:11:58 -04: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 1a45d9474b Don't show commands that cancel routing when routing is in progress
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8363
2021-05-08 14:55:02 -04:00