Commit Graph

1018 Commits

Author SHA1 Message Date
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
Marek Roszko 03cf2b517f Enum class PAD_ATTR_T
Renamed such that python stays the same
2021-05-01 10:51:54 -04:00
Marek Roszko e20562b09b Some cleanup 2021-05-01 10:37:20 -04:00
Marek Roszko 21fde9b629 enum class PCB_SHAPE_TYPE_T 2021-04-30 22:36:12 -04:00
Tomasz Wlostowski a433451bd8 router: 'root line' tracking in the SHOVE algorithm. See comments for detailed explanation. 2021-04-27 14:13:16 +02:00
Tomasz Wlostowski 3a8744d054 router: introduce concept of a root lines in the OPTIMIZER.
By 'root lines' we mean the oldest traceable ancestor of each track moved by the router
(i.e. after shoving for a while, the root of each shoved line is it's latest non-shoved version).

With this we can teach the OPTIMIZER more tricks, such as the LIMIT_CORNER_COUNT constraint. It ensures
the results of the optimization will not be less cornery than the original line, reducing the feeling
of the optimizer being too intrusive.
2021-04-27 14:13:16 +02:00
Tomasz Wlostowski 76f8861e6e router: revert Seth's arc adjustment in StartDragging().
Fixes picking the last segment instead of the last vertex to drag (when one is requested).
I didn't notice any behaviour change of the dragger wrs to arcs.
2021-04-27 14:13:16 +02:00
jean-pierre charras e27733587d Fix 2 minor Coverity warnings. 2021-04-23 19:57:36 +02:00
Jonathan Haas 075bd788eb Remove unused OBSTACLE_VISITOR::m_extraClearance 2021-04-23 01:53:09 +00:00
Ian McInerney ecd9bf696e Be consistent about using nullptr instead of 0
0 can be too easily overloaded into an int, so ensure we use nullptr
when we mean pointers.
2021-04-22 22:20:34 +01:00
Jon Evans cf47d665ea PNS: Dragged line needs to retain width
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8246
2021-04-22 09:04:41 -04:00
Jon Evans 9b1890606d PNS: Do not allow resolved optimal values to go below board minimums 2021-04-21 22:43:26 -04:00
Jon Evans cbd7d698a9 Fix diff pair error message suffix suggestions
We accept diff pairs that end in N/P, no underscore required
2021-04-20 21:08:34 -04:00
Jon Evans 2535daf661 PNS: Account for via stack height in diff pair length tuner
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8256
2021-04-20 19:31:10 -04:00
Jon Evans dd828bd964 PNS: Bring back original Highlight Collisions behavior
From discussion with Tom, Jeff, and Wayne, it appears as though
we all agreed that Highlight Collisions should behave like it
did in 5.1, which is to say, always just highlight collisions,
never prevent them.  The Allow DRC Violations checkbox just
controls whether or not you can fix/commit the head line if it
has violations; you are not prevented from moving the head
line to violating positions in any case.

Right now, there does not seem to be much demand for a separate
"Stop at First Obstacle" mode since Walkaround basically does that
but better, but we agreed that if there is demand for it in the
future, it should be implemented as a new router mode rather than
a behavior of Highlight Collisions mode controlled by the Allow
DRC Violations checkbox.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/7828
2021-04-18 21:01:07 -04:00
Tomasz Wlostowski 4538d78828 router: fix via shoving regression. 2021-04-19 00:43:30 +02:00
Tomasz Wlostowski 57de83897a router: VIA SetDrill() and SetPosition() must update the hole shape too. 2021-04-19 00:43:15 +02:00
Jon Evans ec6995697d PNS: even more free performance
If this doesn't work, we have bigger problems
2021-04-18 09:50:06 -04:00
Jon Evans 6425ad4118 PNS: Fix propagateDpHeadForces obstacle calculation
Using a synthetic via here doesn't quite let us use VIA::PushoutForce
because it will use the wrong clearance, and also doesn't quite have
the logic we want.  I am not familiar enough with PushoutForce to know
if its logic is a bug in other cases, so instead I just brought in the
parts of its algorithm that are needed here.

Additionally, we prevent pushing more than once from a given obstacle,
which causes walkaround to be more successful when routing diff pairs
against a large collider such as a keepout area.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/8232
2021-04-17 22:37:30 -04:00
Jon Evans 5974446523 PNS: Let's make the r-tree work for us
I'm not sure where the magic number of "4x worst" came from, but it's
been around forever.  This is extremely inefficient as it negates much
of the power of r-tree filtering in dense designs.  If we really trusted
it, we could set this just to worstClearance.  Keeping it above the worst
clearance by a little bit seems to provide enough of a speed improvement
to resolve the test cases I have, so I'll go with that for now.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/7777
2021-04-17 21:37:11 -04:00
Jon Evans 1d7e5a0443 Fix merge error that prevented a previous change from working 2021-04-14 23:30:16 -04:00
Jon Evans 268d570941 PNS: keep last valid diff pair trace as current state
This allows fixing/committing what is on screen even if the current
cursor position doesn't have a valid solution (the old behavior
would result in the current trace disappearing)
2021-04-14 23:21:10 -04:00
Jon Evans c829dba88e PNS: Reduce minimum distance to start turn in diff pair placer
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8193
2021-04-14 23:21:10 -04:00
Jon Evans cac4d70154 PNS: Respect fix-all in diff pair placer 2021-04-14 23:21:10 -04:00
Jon Evans 296a9df530 PNS: Pick up diff pair starting width from continuation track 2021-04-12 23:10:15 -04:00
Jon Evans 1d9ca181a2 PNS: Use existing seg direction if both DP segs are parallel 2021-04-12 22:34:13 -04:00
Jon Evans 311cde0984 Safety check suggested by Coverity 2021-04-12 20:42:50 -04:00
Jon Evans 2aa5e568e8 Refactoring 2021-04-12 20:40:05 -04:00
Jon Evans 73fb85a352 PNS: Calculate diff pair primitive orientation using anchors only
The previous method fails if the primitive is an expanding or
contracting pair (diagonals going inward or outward) resulting in
incorrect orientation, which then leads to incorrect candidate
gateways being generated and no solution found.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/8185
2021-04-12 20:34:44 -04:00
Jon Evans 715c61ac9f PNS: Fix yet more arc edge cases
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8150
2021-04-12 19:59:55 -04:00
Jon Evans 49a91414d7 PNS: Apply co-linear seg merging to drag operations 2021-04-11 22:32:11 -04:00
Jon Evans 1c431d9929 PNS: Fix some off-by-one errors with arc dragging 2021-04-11 22:12:53 -04:00
Jon Evans a26fc6d65d PNS: Fix several issues with arc dragging
Do not merge vertices that belong to different arcs
Fix start segment identification after arcs
Fix free-angle drag after arc

Fixes https://gitlab.com/kicad/code/kicad/-/issues/8173
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8150
2021-04-11 17:56:40 -04:00
Jon Evans 7ba110bd77 PNS: Fix dragging of segments with arcs in line 2021-04-11 10:18:57 -04:00
Thomas Pointhuber a30894e5a1 Allow SHAPE_LINE_CHAIN and SHAPE_ARC to be mirrored using a SEG 2021-04-11 13:27:25 +00:00
Thomas Pointhuber fe8fbf1d5d Use arcs instead of line approximation for Miter shape
TODO:

* The resulting line chain is broken with the arcs, and
this appears to be some subsequent issue I was not able to pin down.
* The requirement of a correction factor is not clear to me
2021-04-11 13:27:25 +00:00
Jon Evans 5c448057c8 PNS: Prevent state flicker when starting drag 2021-04-10 16:31:39 -04:00
Jon Evans 7784d7cb12 PNS: Fix visible area restriction
VIEW::GetBoundary() returns the entire view area, not the visible area.
Surprisingly, we had no API for this, so I added one.

Also, changed the dragger behavior to toggle between optimizing just the
modified area and optimizing the visible area, i.e. we will now never
optimize off-screen portions of the dragged track.
2021-04-10 16:13:08 -04:00
Jon Evans 94afdcb92a PNS: Allow control of area-restricted drag optimization
CHANGED: The interactive router settings now include a switch to
         enable or disable optimization of the entire dragged track,
         which is now disabled by default.  When enabled, the router
         will reroute the entire track (from the dragged segment to
         the closest pad/via in each direction) to be more optimal.
         When disabled, only the area around the dragged segment
         will be modified.

CHANGED: The "optimizer effort" slider is removed from the interactive
         router settings dialog, as this setting did not have any
         meaningful impact in most cases and was a source of confusion.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/5918
2021-04-10 15:17:39 -04:00
Jeff Young dc0cf3b802 Clean up a confusing API.
AllowDRCViolations is kept in any mode as a *setting*, but only
controls router behaviour when the mode is mark obstacles.

Fixes https://gitlab.com/kicad/code/kicad/issues/7795
2021-04-10 11:08:02 +01:00
Jon Evans d878cbddbc PNS: a few forgotten cleanup items 2021-04-07 23:34:45 -04:00
Jon Evans c9040a5c53 PNS: fix some weirdness identified by PVS 2021-04-07 23:16:56 -04:00
Jon Evans d4957b112e PNS: Keep last valid drag solution in the node
Fixes https://gitlab.com/kicad/code/kicad/-/issues/5450
2021-04-07 21:59:23 -04:00
Jon Evans 26835f582c Some situations require more than one dummy
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7820
2021-04-07 21:30:18 -04:00
Jon Evans 9432484394 PNS: Find origin segment correctly when arcs are present
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8139
2021-04-07 20:28:30 -04:00
Jon Evans 9f957d3e08 Fix crash when attempting to tune discontinuous lines
Also correctly find the tuning path through arcs

https://gitlab.com/kicad/code/kicad/-/issues/8131
2021-04-06 09:07:11 -04:00