Jeff Young
b2a45023bc
Tighten ownership model of PNS::ITEM.
...
In particular, ownership must be explicitly set. It is
no longer inherited through copy/clone/etc.
2023-04-28 11:05:39 +01:00
Jeff Young
9646e3c1c0
Simplify PNS::VIA construction.
2023-04-28 00:32:49 +01:00
Lucas Dumont
2992d7c68b
Fix typo in QueryConstraint switch
2023-04-26 13:20:32 +00:00
jean-pierre charras
b9ed84b7db
Fix minor compil warnings
2023-04-25 12:43:15 +02:00
Lucas Dumont
e2e901de1d
Don't override clearance when routing
...
The default `m_overrideClearance = -1` used here was changed to 1.
Reseting it to -1 to solve linked issue
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14595
2023-04-25 09:18:53 +00:00
Jeff Young
676a15df65
Don't try to keep track of a HOLE's net.
...
Keep track of it's parentPadVia instead.
Fixes https://gitlab.com/kicad/code/kicad/issues/14603
2023-04-24 18:32:17 +01:00
Seth Hillbrand
990641d2eb
Cleanup printf bits
2023-04-20 15:19:04 -07:00
Lucas Dumont
469fe76994
pcbnew: Fix crash with differential routing
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14537
2023-04-17 14:17:14 +12:00
Jeff Young
26609bbf05
Fix PNS_KICAD_IFACE_BASE::IsFlashedOnLayer() to be able to handle multi-layer queries.
2023-04-14 12:02:36 +01:00
Jeff Young
6059e895d7
Fix a typo.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/14515
2023-04-12 10:45:24 +01:00
Jeff Young
6fb30398ca
Don't steal an existing via's hole.
2023-04-11 17:48:27 +01:00
Jeff Young
ab0dbeb523
Post-holes-work cleanup.
2023-04-11 15:51:00 +01:00
Jeff Young
2f198bdcb2
Further simplify PNS::ITEM::collideSimple().
...
Also brings text_pns_basic's mocks into line with their "real"
counterparts.
2023-04-11 15:51:00 +01:00
Jeff Young
6f0d963683
Add PNS::ITEM::BoardItem() call.
...
About 1/3 of callers to Parent() don't care if they get the immediate
parent or not, about 1/3 want only the immediate parent, and about 1/3
want the hole parent's Parent().
I had earlier changed PNS::ITEM::HOLE to override Parent() and return
the hole parent's Parent(), but since the callers are pretty evenly
split I've reverted that and added BoardItem() for callers who want the
eventual BOARD_ITEM (whether a direct parent or a grandparent).
(Also removes a dead routine so I didn't have to figure out which of
the two it wanted....)
2023-04-11 15:51:00 +01:00
Jeff Young
8a0c225efa
Unify most special-case processing to the clearance if-then-else.
...
This also allows us to support hole-to-hole clearance when dragging
a via near another via on the same net.
Fixes https://gitlab.com/kicad/code/kicad/issues/12781
2023-04-11 15:51:00 +01:00
Jeff Young
b18bf09208
Don't return holes that have a parent pad or via.
...
(While we don't currently have holes without a parent pad or via, you
could imagine using HOLEs in the future to represent a hole in a first-class
board outline, so better not to build this assumption in.)
2023-04-11 15:51:00 +01:00
Jeff Young
4cc289c6fb
Post-merge cleanup of holes-as-first-class-citizens.
2023-04-11 15:51:00 +01:00
Tomasz Wlostowski
1532a83330
router: hole as first-class-object, initial version of rewritten collision check routine
...
Rebased and modified by Jeff Young <jeff@rokeby.ie> 6 April 2023
2023-04-11 15:51:00 +01:00
Tomasz Wlostowski
d961cdce3f
router: further changes to the ownership model
...
- LINEs now own their vias optionally (depending whether a LINE with its VIA belongs to a node)
- get rid of unique_ptr on the internal NODE::Add API (and also made it private)
- make sure stack pointers are not added to the node
- use rvalue reference for NODE::Add/NODE::Replace
Manually rebased by Jeff Young <jeff@rokeby.ie> 5 April 2023
2023-04-11 15:51:00 +01:00
Tomasz Wlostowski
bfbda978b8
router: hole as first class objects, wip
...
Rebased by Jeff Young <jeff@rokeby.ie> 5 April 2023
(Also includes a bug-fix for highlighting collisions with edge-cut
items.)
2023-04-11 15:51:00 +01:00
Jeff Young
507a25f150
Don't call BuildInitialTrace() for entry gateways.
...
We're going to call it to connect the entry and target gateways
anyway, so all we need are gateways at 22.5 degrees to setup entry
at +/- 45 degrees from the current direction.
Fixes https://gitlab.com/kicad/code/kicad/issues/14324
Fixes https://gitlab.com/kicad/code/kicad/issues/12459
2023-04-11 15:34:55 +01:00
Jeff Young
11995c1350
Improve readability.
2023-04-11 15:26:39 +01:00
Jeff Young
d040690f60
Ease acquisition of a target item.
...
pickSingleItem() had a two-attempt algorithm, but the second attempt
was never made because we'd check for no hits before throwing out the
aAvoidItems.
The second attempt would fail anyway because QueryHoverItems() ignored
the aUseClearance flag when not idle, and didn't factor in the actual
clearance.
2023-04-09 22:05:17 +00:00
Jeff Young
1d19672054
Handle more pad shapes when building diffpair gateways.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/1883
2023-04-09 22:05:17 +00:00
Jeff Young
e522e73e0e
Improve readability.
2023-04-08 15:06:49 +01:00
Jeff Young
3b63d70d01
Centralize NPTH has-annulus processing.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/13437
2023-04-08 15:06:49 +01:00
Tomasz Wlostowski
1283c4713f
router: rework ITEM ownership model.
...
- prerequisite for holes as first class objects code
- introduced the OWNABLE_ITEM interface that defines the owning container (NODE/other ITEM/ITEM_SET)
- simplified the ITEM_SET interface
- constified a lot of APIs (ownership/JOINT management) as a side effect
Rebased and cleaned up by Jeff Young <jeff@rokeby.ie> 5 April 2023
- some STL cover types removed
2023-04-05 11:21:31 +01:00
Tomasz Wlostowski
eed05191a9
router: pass collision query options in a structure
...
Selectively cherry-picked by Jeff Young <jeff@rokeby.ie> 4 April 2023
- Jon's user-clearance-epsilon algo kept intact
- Jeff's castellated-pad code kept intact
2023-04-05 11:21:31 +01:00
Jeff Young
bbd6c80507
Collapse FP_* down into their PCB_* equivalents.
2023-03-31 22:57:46 +01:00
Wayne Stambaugh
28776f5745
Text attributes object improvements.
...
* Add compare method to COLOR4D object.
* Add unit test to validate COLOR4D comparison method.
* Add missing color test in text attribute comparison method.
* Add unit test for text attribute object.
* Remove unnecessary headers from text attribute header.
* Move text attribute code into separate source file.
2023-03-29 12:53:45 -04:00
jean-pierre charras
893a362d9e
Minor Coverity and compil warnings fix.
2023-03-15 20:09:04 +01:00
Mike Williams
74a9d79a8d
Router: fix Continue From End/ Attempt Finish work for diff pairs
...
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/13772
2023-03-08 12:23:04 -05:00
Mike Williams
8d3e1eb52a
Continue From End: support other placement algos
2023-03-08 12:01:29 -05:00
Mike Williams
e7555aa45f
PNS Router: arcs are directional, too
...
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/10391
2023-03-08 12:01:29 -05:00
Mike Williams
5bc018f7dc
PNS Diff Placer: fix invalid cast of Arc to Segment and derefence
2023-03-08 12:01:29 -05:00
Wayne Stambaugh
a1fb8e1b1d
Coverity fixes and code cleaning.
2023-03-06 07:12:18 -05:00
Wayne Stambaugh
4e99812145
Coverity fixes and code cleaning.
2023-03-04 13:02:05 -05:00
Wayne Stambaugh
789bf6455a
Coverity fixes and code cleaning.
2023-03-02 09:04:47 -05:00
Ian McInerney
c6e417c19c
Fix missing override statements
2023-02-22 01:44:06 +00:00
Marek Roszko
aacc9746e3
Yeet the last of wxSize/wxPoint to stop leaking gdicmn everywhere
2023-02-18 22:57:18 -05:00
Jon Evans
f12f2b8420
PNS: Diff pairs can have different hole-to-hole size
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13993
2023-02-17 19:56:02 -05:00
Jon Evans
459473ccc3
PNS: Safety for evaluating item nets for rules
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13993
2023-02-17 19:56:02 -05:00
Jon Evans
2d7c5c5c0f
Router: Do not collide items within a net tie footprint
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13909
2023-02-14 21:08:36 -05:00
Alex
bf1a8f2582
router: Fix clamp in meander corner radius calculation.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/13781
2023-02-05 07:22:38 +03:00
Alex
6543d23d9f
router: Re-add electrical path lines drawing for length tuning.
2023-02-01 20:36:52 +03:00
Jon Evans
48e4005111
Fix diff pair router checking of min clearance
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13720
2023-01-31 19:53:35 -05:00
Jon Evans
971abcfc1a
Fix DP meander placer when tuning from an uncoupled section
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/12212
2023-01-28 22:25:46 -05:00
Jeff Young
8268234aa1
Reverse shown-source logic so we report if it's the netclass width.
...
(whether or not it's *also* the previous track width).
2023-01-27 15:31:02 +00:00
Alex
e3fa447f0c
router: Remove extra qualification.
2023-01-27 11:56:23 +03:00
Alex
0ff6cb49d6
router: When dragging tracks, don't snap to parts of the original line.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/10113
2023-01-27 11:06:36 +03:00