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
decimad
4770be0920
Make the segment-ref container a true member of PNS::LINE
...
improve const correctness
return segment container by ref
change client code accordingly
2016-09-06 16:06:06 +02:00
decimad
6c749e0ba8
Remove PNS_ prefix from most types inside namespace PNS
2016-09-06 16:06:06 +02:00
decimad
4cf44d9725
Rename pns item kind constants in preparation for renaming pns classes
2016-09-06 16:06:06 +02:00
decimad
de6281e977
Move PNS router code into namespace PNS
...
update copyright messages
2016-09-06 16:06:06 +02:00
Maciej Suminski
78050c05e2
Changed PNS logging routine to wxLogTrace
2016-08-17 16:00:21 +02:00
Maciej Suminski
7e94e5282a
Changed PNS debug output to use wxLogTrace
2016-08-15 17:16:54 +02:00
Maciej Suminski
0ef866ee74
Code formatting
2016-08-15 17:16:53 +02:00
Tomasz Wlostowski
456c02c800
router: multiple fixes - fixed crash when trying to drag a locked via - prompt when the user attempts to drag a locked via/segment - removed remains of PICKED_ITEMS_LIST from the PNS_ROUTER class
2016-08-15 17:16:50 +02:00
Tomasz Wlostowski
2b32b6f72e
P&S: support for trace & via locking
2016-08-15 17:16:48 +02:00
Simon Richter
1b2fd6a382
Replace BOOST_FOREACH with C++11 range based for.
2016-06-29 16:07:55 -04:00
Thomasz Wlostowski
6e470ece1d
Pcbnew: fix push and shove router segfault bug.
2015-11-03 11:19:42 -05:00
Tomasz Wlostowski
3596ef2d4c
router: fixed loop removal regression in shove mode
2015-10-09 14:31:06 +02:00
Maciej Suminski
2607497b37
Code formatting.
2015-10-05 18:28:41 +02:00
Maciej Suminski
f752f7875e
Code formatting.
2015-09-30 11:18:19 +02:00
Tomasz Wlostowski
5bbf980ec7
router: fixes for disappearing segments after shoving & assertion in PNS_NODE destructor
2015-09-14 18:40:29 +02:00