Tomasz Wlostowski
45f7cf9571
router: rework the DEBUG_DECORATOR a bit:
...
- support for dumping complete PNS::ITEMs and generic SHAPEs
- support for log nesting levels
- wxT-ized strings
- more verbose output where needed
2022-03-03 01:02:00 +01:00
Jeff Young
b2e3f03222
More wide-string declarations.
2022-02-05 22:03:04 +00:00
Tomasz Wlostowski
79fe0bf456
router: use VIA::PushoutForce() for via push force calculation in the shove algorithm
...
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/10317
2022-01-13 00:43:27 +01:00
Tomasz Wlostowski
2ae3a83b54
router: fix use-after-free crash in single trace shove routing when m_endItem's owning NODE is erased by the springback algorithm.
...
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/9994
2021-12-15 01:33:05 +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
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
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
Roberto Fernandez Bautista
dc1fd3d9ba
PNS test app: Add logging information for curved track routing
2021-09-20 20:35:24 +01:00
Wayne Stambaugh
cf00319c85
More NULL expunging.
2021-07-20 07:27:18 -04:00
Tomasz Wlostowski
af26eab5fb
router: even more debug in SHOVE
2021-06-03 22:44:53 +02: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
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
a433451bd8
router: 'root line' tracking in the SHOVE algorithm. See comments for detailed explanation.
2021-04-27 14:13:16 +02:00
Tomasz Wlostowski
4538d78828
router: fix via shoving regression.
2021-04-19 00:43:30 +02: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
Tomasz Wlostowski
87ea540953
Fix whitespace errors
2021-02-25 17:18:23 +01:00
Tomasz Wlostowski
9bdfc13155
router: improve locality of post-shove optimization
...
Fixes : #4359
2021-02-25 17:18:23 +01:00
Tomasz Wlostowski
34c037684b
router: partially migrate SHOVE algorithm to use new DEBUG_DECORATOR
2021-02-25 17:18:23 +01:00
Jeff Young
d975f2f6aa
Commenting and naming for clarity.
2021-01-05 16:54:52 +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
Jeff Young
d06d35a74d
Formatting.
2020-12-02 20:05:47 +00:00
Jeff Young
9c7c05c161
Mostly formatting cleanup but a few type-casting cleanups too.
2020-11-24 22:16:41 +00: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
Wayne Stambaugh
ede39780e2
Remove all debugging output that cannot be disabled.
...
The use of printf, wxLogDebug, and std::err/std::out causes excessive
debugging output which makes finding specific debugging messages more
difficult than it needs to be.
There is still some debugging output in test code that really needs to
be moved into a unit test.
Add debugging output section to the coding policy regarding debugging
output.
2020-08-18 10:17:36 -04:00
Seth Hillbrand
afc94fdec3
PNS: Be better about handling multiple layers
...
Rather than adding pads/vias multiple times for each layer, we introduce
the "alternate shape" idiom to PNS that allows us to optionally place
the collision constraint on the hole instead of the pad for those
vias/pads that have inner layers removed.
Fixes https://gitlab.com/kicad/code/kicad/issues/5158
Fixes https://gitlab.com/kicad/code/kicad/issues/5198
Fixes https://gitlab.com/kicad/code/kicad/issues/5195
2020-08-16 12:39:15 -07:00
Tomasz Wlostowski
379aa8f3b5
router: clearer distinction between LOGGER and DEBUG_DECORATOR classes.
...
The first one keeps a log of events (start routing, mouse motion, etc).
The second allows for adding temporary debug drawings and messages which are stored synchronously with the events in LOGGER.
The event stream together with the PCB design (now with UUIDs) can be used to deterministically replay routing bugs as the user sees them.
2020-07-22 18:05:54 +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
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
Tomasz Wlostowski
4a3cd77416
router: smarter way to check the shove direction without using silly heuristics
2020-04-15 13:00:48 +02:00
jean-pierre charras
6e47f147aa
A few Coverity fixes.
2020-03-30 09:50:26 +02: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
Tomasz Wlostowski
1d0ee66187
router: kill debug printf()
2020-02-28 23:17:15 +01:00
Tomasz Wlostowski
4525a17076
router: backspace key to undo last fixed segment(s)
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
Ian McInerney
13b6028e1b
Refactor all math into a new kimath library
...
* Split up the thirdparty code into the thirdparty folder (#3637 )
* Create a new kimath static library containing all the math functions
This is part of cleaning the build system for #1906 .
2020-01-07 17:12:59 +00:00
Seth Hillbrand
e7c07501c5
Minor compile warning cleanup
2019-09-05 09:47:52 -07:00
Tomasz Włostowski
88f2318c9c
router: add VIA_HANDLE to refer to VIAs going in/out the SHOVE algorithm without raw pointers
2019-08-07 23:48:28 +02:00
Tomasz Włostowski
75fcdb3b08
router: disable hole to hole mechanical constraint in P&S until a suitable solution is found (as it is now it breaks springback)
2019-08-07 23:44:43 +02:00
Jeff Young
79934a327e
Implement shoving of free vias.
...
Also contains a little bit of cleanup and a lot of commenting.
Fixes: lp:1833216
* https://bugs.launchpad.net/kicad/+bug/1833216
Fixes: lp:1833214
* https://bugs.launchpad.net/kicad/+bug/1833214
2019-07-24 09:33:47 -06:00
Jeff Young
a7c41f0c34
Renaming for clarity. Unqualified "push" could mean push-n-shove, or it could mean push/pop.
2019-07-24 09:33:47 -06:00
Jeff Young
c1fcb1d895
Allow shoving and springback when dragging vias (either connected or free).
...
Fixes: lp:1833216
* https://bugs.launchpad.net/kicad/+bug/1833216
2019-07-24 09:33:47 -06:00
Jeff Young
8c77d31d4d
Simplification in prep for fixing some via dragging issues.
...
There should be no change in logic with this commit.
2019-07-24 09:33:47 -06:00
Jeff Young
aa4d7682ca
Don't shove stitching vias.
...
Whether or not it's a good idea, the current algorithm doesn't support
it and leaves them on top of each other.
Fixes: lp:1833214
* https://bugs.launchpad.net/kicad/+bug/1833214
2019-07-21 16:38:06 -06:00
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
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
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
Maciej Suminski
65821328d2
Fix a crash when dragging a via attached to a locked track (PNS)
...
Fixes: lp:1625835
* https://bugs.launchpad.net/kicad/+bug/1625835
2016-09-21 14:47:14 +02:00
Maciej Suminski
f1e2a2c4c1
Corrected debug information display call. Removed an unused variable.
2016-09-06 16:27:35 +02:00
decimad
94aaa47583
Add Remove overloads for specific item types, split removal into index-handling and lifetime-handling (not 100% correct yet, since the index is defactor lifetime-owner, it will be later.)
2016-09-06 16:06:06 +02:00
decimad
96a3145543
use unique_ptr at client <-> pns-router border, to document the pns router is taking ownership
...
add overloads for NODE::Add( ... ) taking pointers to specific item types (retain old private add-Functions, they will come in handy later)
LINE overloads now take by reference, to document their special treatment.
updated code throughout affected by these changes
2016-09-06 16:06:06 +02:00