1851 Commits

Author SHA1 Message Date
Jon Evans
d0b2334ceb PNS: Support via stacks 2024-11-04 21:30:38 -05:00
Tomasz Wlostowski
c258b85e4d router: provisional fix for stray vias in shove mode and related crashes
Fixes https://gitlab.com/kicad/code/kicad/issues/19057

Fixes https://gitlab.com/kicad/code/kicad/issues/19045

Fixes https://gitlab.com/kicad/code/kicad/issues/19044
2024-11-04 21:58:22 +01:00
Tomasz Wlostowski
69210e684a router: move FindViaByHandle to NODE 2024-11-04 21:57:14 +01:00
Tomasz Wlostowski
f53823799c router: improved AREA_RESTRICTION in the optimizer and more control over 'optimize entire track being dragged' 2024-11-04 21:57:14 +01:00
Jon Evans
2d0e8c73d0 Fix crashes in qa_pns_regressions 2024-11-03 11:22:15 -05:00
Jon Evans
bdfeb9068a Change some asserts to wxCHECKs
Make sure that if these are hit, we don't double-add to m_links

See https://gitlab.com/kicad/code/kicad/-/issues/19049
2024-11-03 09:04:58 -05:00
Jon Evans
d4053b36f4 Fix some Coverity issues in PNS changes 2024-11-03 08:53:03 -05:00
Tomasz Wlostowski
6daa097e1c router: fix spurious segments left by the DRAGGER in shove mode 2024-11-02 22:59:25 +01:00
Alex Shvartzkop
72266f5638 Fix uninitialized variable in router. 2024-11-02 23:57:18 +03:00
Tomasz Wlostowski
d776cc1124 router: fix incorrect cast from enum to bool 2024-11-02 20:47:22 +01:00
Marek Roszko
f67f6d0460 Remove unused shove func that causes build error 2024-11-02 15:19:12 -04:00
Marek Roszko
bc1e9bc759 Fix build err on windows due to pns changes 2024-11-02 15:12:40 -04:00
Tomasz Wlostowski
d97065609d router: remove some loose printfs() 2024-11-02 19:59:09 +01:00
Tomasz Wlostowski
c8e2beeb3a router: fix copyright + minor code formatting for MULTI_DRAGGER 2024-11-02 19:59:09 +01:00
Tomasz Wlostowski
e4ef642940 router: NODE::FindJoint() should also compare the matching joint's net/position. Another 'senior' bug in the P&S 2024-11-02 19:59:09 +01:00
Tomasz Wlostowski
0f75dcb5ed router: fix updating of leader segments set in MULTI_DRAGGER 2024-11-02 19:59:09 +01:00
Tomasz Wlostowski
92f30b18d2 router: revert back to using std::set for OBSTACLES to avoid duplicates... 2024-11-02 19:59:09 +01:00
Tomasz Wlostowski
c99478e0fd router: make sure last drag solution does not persist in the case more than one shove algorithm run have failed 2024-11-02 19:59:09 +01:00
Tomasz Wlostowski
dd1046bedd router: a bit of cleanup in MULTI_DRAGGER + restoring of 'leader' segments in all modes 2024-11-02 19:59:09 +01:00
Tomasz Wlostowski
3d20e2ee3d router: provisional fix for 'random sprinkled vias' issue in SHOVE 2024-11-02 19:59:09 +01:00
Tomasz Wlostowski
8033b568dd router: trying to fix remaining issues 2024-11-02 19:59:09 +01:00
Tomasz Wlostowski
c5aaaf1d65 router: ignore items belonging to the net of the head trace when building walkaround clusters 2024-11-02 19:59:09 +01:00
Tomasz Wlostowski
5e77da4902 router: make a 'tadpole' via (via at the end of a LINE) linkable item 2024-11-02 19:59:09 +01:00
Tomasz Wlostowski
d9ae8e44c2 router: fix a few more missing translations between pcbnew layers and router layers 2024-11-02 19:59:09 +01:00
Tomasz Wlostowski
4464490ad5 router: don't treat LINEs that exceeded the iteration limit as STUCK 2024-11-02 19:59:09 +01:00
Tomasz Wlostowski
6878d5f9cf router: use const ref instead of raw LINE pointers in SHOVE::AddHeads() 2024-11-02 19:59:09 +01:00
Tomasz Wlostowski
18c17111bc router: prevent bogus collision detection between an ITEM and a HOLE of both the same net 2024-11-02 19:59:09 +01:00
Tomasz Wlostowski
9f3825b003 router: integrate multidrag in ROUTER_TOOL 2024-11-02 19:59:09 +01:00
Tomasz Wlostowski
2cb141b294 router: ROUTER class now invokes the MULTI_DRAGGER with StartDragging() is passed more than one item 2024-11-02 19:59:09 +01:00
Tomasz Wlostowski
6311df377f router: initial support for multidrag (just the algorithm) 2024-11-02 19:59:09 +01:00
Tomasz Wlostowski
731cc1eb1a router: const fixes in OPTIMIZER + revert to legacy line simplification function 2024-11-02 19:59:09 +01:00
Tomasz Wlostowski
efeae50fba router: migrate drag/place algos to use new WALKAROUND class 2024-11-02 19:59:09 +01:00
Tomasz Wlostowski
07c34702c6 router: major rewrite of the WALKAROUND algorithm
Notes:
- works on clusters, not single items
- can define policies (cw/ccw/shortest) that run in parallel
2024-11-02 19:59:09 +01:00
Tomasz Wlostowski
6507c1ea5c router: use separate object for constructing clusters (+ add area threshold) 2024-11-02 19:59:09 +01:00
Tomasz Wlostowski
0619b37b93 router: update drag/place algorithms to use the new SHOVE class 2024-11-02 19:59:08 +01:00
Tomasz Wlostowski
bc2a444805 router: major changes in the SHOVE algorithm
- support for multiple heads (including vias)
- more "shove-o-inistic" behaviour (i.e. increased strength)
- work in progress, but usable enough.
2024-11-02 19:59:08 +01:00
Tomasz Wlostowski
183042cdb7 router: LOGGER now logs the current layer 2024-11-02 19:59:08 +01:00
Tomasz Wlostowski
d25b27c328 router: add constructor for VIA_HANDLE 2024-11-02 19:59:08 +01:00
Tomasz Wlostowski
34d1515827 router: fix VIA ownership inside LINE (clone if owned, copy reference if not) 2024-11-02 19:59:08 +01:00
Tomasz Wlostowski
009e31d6df router: follow up with the changes to JOINT::NextSegment() 2024-11-02 19:59:08 +01:00
Tomasz Wlostowski
28927c713d router: when removing a JOINT completely (no links remaining) from a child node, insert a dummy one to prevent fallback to the root node
Private note: another "maladie de naissance", hopefully cured for good.
2024-11-02 19:59:08 +01:00
Tomasz Wlostowski
a6e111ec06 router: prevent double removal of a VIA/SOLID and its associated HOLE 2024-11-02 19:59:08 +01:00
Tomasz Wlostowski
fe49bad99f router: expose overrides in public API of NODE 2024-11-02 19:59:08 +01:00
Tomasz Wlostowski
76a0260d4a router: QueryColliding filter lambda should be applied in the obstacle visitor 2024-11-02 19:59:08 +01:00
Tomasz Wlostowski
79f679fc9a router: empty LAYER_RANGE cannot overlap with anything 2024-11-02 19:59:08 +01:00
Tomasz Wlostowski
0583b55ba0 router: reimplement JOINT::NextSegment() to correctly handle multilayer joints
Note: as JOINTs are indexed by position and net, we can have a joint with four track segments belonging to two LINEs linked (two on layer A, two on layer B, e.g. two corners of two separate lines going through). The previous version
of the function would stop at such a joint (thinking it's a corner joint). As such situation is pretty common while shoving/moving vias, the algorithm was easily confused.

Private note: just fixed another 11-year-old bug...
2024-11-02 19:59:08 +01:00
Tomasz Wlostowski
663afac3df router: make sure empty (unlinked) JOINTs have also empty layer range
Due to the architecture of the NODE storage (overrides), JOINTs that don't have any items attached are still kept in the child nodes, but with empty link list. So has to be the layer range, otherwise adding new items to a child node might result with JOINTs having mismatched layers vs items.
2024-11-02 19:59:08 +01:00
Tomasz Wlostowski
0192bba053 router: use std::vector for storage of OBSTACLEs (instead of std::set) 2024-11-02 19:59:08 +01:00
Tomasz Wlostowski
3453592fc3 router: introduce ITEM::UNIQ_ID
It's a globally unique identifier for each PNS::ITEM, used as a reliable hash key (pointers are NOT unique)
2024-11-02 19:59:08 +01:00
Tomasz Wlostowski
f77f63cf2d router: add PNS_SILENCE_DEBUG macro which allows to squelch PNS_DBG() stuff compile-time 2024-11-02 19:59:08 +01:00