Commit Graph

122 Commits

Author SHA1 Message Date
Jon Evans 330d717c69 Fix typo 2021-01-18 21:50:26 -05:00
Jon Evans 111fa99f9f PNS: Use last-segment posture optimization always
Also when auto-posture is enabled, don't flutter
until area threshold has been met.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/6935
2021-01-07 20:12:31 -05:00
Jon Evans 0234b7278a PNS: Make DIRECTION_45 North be up everywhere
Fixes https://gitlab.com/kicad/code/kicad/-/issues/6935
2021-01-06 21:47:06 -05:00
Jon Evans 8619086cf2 PNS: re-enable optimization of colinear segs in lines with arcs 2021-01-05 17:57:21 -05:00
Jon Evans 8901e71fc8 PNS: Fix loop removal, make walkaround less broken for arcs 2021-01-05 17:57:21 -05:00
Jeff Young d24b034cbc Cleanup (and a minor performance improvement). 2021-01-04 22:32:29 +00:00
Jon Evans eba7cb222c PNS: Fix initial posture guess for pads 2021-01-02 10:32:15 -05:00
Jeff Young fc1b0ec11f Improve feedback when routing in highlight collisions mode.
In particular, when Allow DRC violations is NOT turned on and we
bump in to an obstacle.
2021-01-01 17:25:37 +00:00
Jeff Young ecc0e861d3 Implement hole clearance and hole-to-hole clearance in router.
Fixes https://gitlab.com/kicad/code/kicad/issues/6882
2021-01-01 00:31:36 +00:00
Jon Evans 73248ab219 PNS: correct initial segment direction for posture solver 2020-12-31 13:05:43 -05:00
Jon Evans 510db66f0e PNS: Fix rollback for arc traces
PNS: Update posture solver after rollback
2020-12-30 18:23:24 -05:00
Jon Evans b5b64a55ad PNS: Only run optimization if lastNode is valid 2020-12-30 18:23:24 -05:00
Jon Evans 79502a0d88 PNS: A new approach to arc placement
Fixes https://gitlab.com/kicad/code/kicad/-/issues/6334
2020-12-30 18:23:24 -05:00
Jon Evans bf9501e1d4 PNS: Fix auto-posture when placing via 2020-12-29 21:14:36 -05:00
Jon Evans 689da3794d PNS: Merge co-linear segments during placement 2020-12-29 21:14:36 -05:00
Jon Evans 81d4e06f00 PNS: Consider pad orientation when routing
PNS: Skip smart pads when posture was manually forced

This allows a more-correct pad breakout to be chosen when
smart pads is off.
2020-12-29 01:06:46 -05:00
Jon Evans 96d49d1473 PNS: Improved auto-posture when starting from a segment
The previous auto-posture algorithm worked great for pads
but not so great when starting routing from a segment.

Now we can optimize the posture based on the starting
segment if one exists, to maximize the "obtuseness" of the
posture.
2020-12-28 23:51:13 -05:00
Jon Evans c615b7a49b PNS: make initial direction behavior consistent with fix-all enabled 2020-12-27 15:21:55 -05:00
Jon Evans 8ad89ae457 PNS: fix manual posture mode 2020-12-24 17:31:54 -05:00
Jon Evans 8a2667c4c3 PNS: Fix all segments by default (and make optional)
Fixes https://gitlab.com/kicad/code/kicad/-/issues/5920
2020-12-23 21:55:43 -05:00
Jon Evans 8c247fc97c PNS: Add a setting to disable posture solver
PNS: Prevent autoposture flutter when trail has little area

Fixes https://gitlab.com/kicad/code/kicad/-/issues/6797
2020-12-23 21:02:17 -05:00
Jeff Young cd162a8f58 Honour m_placingVia when avoiding collisions.
Fixes https://gitlab.com/kicad/code/kicad/issues/3773
2020-12-20 20:36:19 +00:00
Jeff Young 46314f6483 Only compare collision-corrected routes when looking for shortest.
Fixes https://gitlab.com/kicad/code/kicad/issues/6511
2020-12-19 23:20:27 +00:00
Jeff Young 0ef63aca47 Don't reset tail when changing track width/via sizes.
Fixes https://gitlab.com/kicad/code/kicad/issues/6314
2020-12-11 17:58:36 +00:00
Jeff Young 00edc85f4f Allow layer switching when routing from pad.
Additionally, don't process layer events from both main loop and
transitions -- it makes for a mess.

Fixes https://gitlab.com/kicad/code/kicad/issues/4832
2020-12-02 21:17:56 +00:00
Jeff Young d06d35a74d Formatting. 2020-12-02 20:05:47 +00:00
Jeff Young 288ab7ed6f Minor formatting cleanup. 2020-12-01 14:04:01 +00:00
Jeff Young 7bd31d5237 Naming conventions. 2020-11-14 18:26:03 +00:00
Jon Evans fd4b9f0efa PNS: ratlines need to not be debug graphics
Fixes https://gitlab.com/kicad/code/kicad/-/issues/5995
2020-10-13 20:04:47 -04:00
Jon Evans 7a5c99ee0f Tweak the mouse-based posture solver
Add an epsilon to reduce flutter
Add a lock after a certain distance
Forget the old trail when unlocking

Fixes https://gitlab.com/kicad/code/kicad/-/issues/5381
2020-08-30 19:54:09 -04:00
Seth Hillbrand adff7f749b PNS: Addition layer smarts
Edge.Cuts have no parent but cross all layers, so we need to handle the
"all layers" case.  Also renames "IsPadOnLayer" to "IsOnLayer".

Fixes https://gitlab.com/kicad/code/kicad/issues/5351
2020-08-25 09:42:50 -07:00
Seth Hillbrand 9a66a5acad Cleanup code line endings 2020-08-10 03:27:27 +00:00
jean-pierre charras f00c59c446 Fix a few Coverity warnings. 2020-07-29 09:26:57 +02:00
Tomasz Wlostowski 2a2e389a94 router: auto-guess track posture from mouse movements, experimental! 2020-07-22 18:05:50 +02:00
Tomasz Wlostowski fd07e94760 router: abstract segment links into a LINK_HOLDER interface. DIFF_PAIRS are now also linkable 2020-07-22 17:04:42 +02: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 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 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 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 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 4525a17076 router: backspace key to undo last fixed segment(s) 2020-02-27 22:02:56 +01:00
Tomasz Wlostowski d1a5d8c78b router: don't forget the tail when toggling via placement 2020-02-27 22:02:56 +01:00
Tomasz Wlostowski 37a754c4dd router: initial attempt at improved 'aim at mouse cursor' strategy in walkaround mode, wip... 2020-02-27 22:02:56 +01: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
Seth Hillbrand f7cb970a02 PNS: Modify MarkObstacles logic to select shorter
When routing where we hit multiple obstacles, we choose the shortest
path to allow overlapping hits to choose the shorter path, thus giving a
better chance of returning true for the DRC-compliant path.

Fixes #3773 | https://gitlab.com/kicad/code/kicad/issues/3773
2020-01-16 19:57:38 -08:00
Seth Hillbrand eb3d32f967 SHAPE_LINE_CHAIN: Unify constructors
Keeps the multi element SHAPE_LINE_CHAIN constructors in a single
routine using std::vector and implicit construction.
2019-12-12 13:54:48 +00:00
Seth Hillbrand c4d853c1e8 SHAPE_LINE_CHAIN: Remove element access
This is the first step to allowing non-segments in the line chain.
External routines cannot be allowed to change the line chain without
going through the internal routines.  To accomplish this, we remove the
Vertex() and Point() access routines and only leave the const versions.
Transformations are given for both points as well as the chain itself.
2019-12-12 13:54:48 +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 a2edf9c442 Unified update to C++14 std::make_unique
This update replaces the existing uses of unique pointer creation with
the C++14 std::make_unique call that provides proper memory release in
event of an exception.
2019-12-05 10:43:55 -08:00