Jeff Young
f8270b9cec
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:03:24 +01:00
Jeff Young
21eb2c8dad
Simplify PNS::VIA construction.
...
(cherry picked from commit 9646e3c1c0
)
2023-04-28 00:33:27 +01:00
Lucas Dumont
9a0e2f3395
Fix typo in QueryConstraint switch
...
(cherry picked from commit 2992d7c68b
)
2023-04-26 14:21:38 +01:00
Lucas Dumont
b926d2f0bd
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
(cherry picked from commit e2e901de1d
)
2023-04-25 10:21:13 +01:00
Jeff Young
89d1d36e79
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
(cherry picked from commit 676a15df65
)
2023-04-24 18:32:48 +01:00
Lucas Dumont
0736c141b9
pcbnew: Fix crash with differential routing
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14537
(cherry picked from commit 469fe76994
)
2023-04-17 09:48:18 +01:00
Jeff Young
2d13ddc70c
Fix PNS_KICAD_IFACE_BASE::IsFlashedOnLayer() to be able to handle multi-layer queries.
2023-04-14 10:59:10 +01:00
Jeff Young
0be01f3c24
Don't steal an existing via's hole.
...
(cherry picked from commit 6fb30398ca
)
2023-04-14 10:09:03 +01:00
Jeff Young
eb492724c7
Further simplify PNS::ITEM::collideSimple().
...
Also brings text_pns_basic's mocks into line with their "real"
counterparts.
(cherry picked from commit 2f198bdcb2
)
2023-04-14 10:09:03 +01:00
Jeff Young
3b05d03220
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....)
(cherry picked from commit 6f0d963683
)
2023-04-14 10:09:03 +01:00
Jeff Young
4c04233a20
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
(cherry picked from commit 8a0c225efa
)
2023-04-14 00:10:48 +01:00
Jeff Young
2b6d2fc117
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.)
(cherry picked from commit b18bf09208
)
2023-04-14 00:10:43 +01:00
Jeff Young
f64ef39687
Post-merge cleanup of holes-as-first-class-citizens.
...
(cherry picked from commit 4cc289c6fb
)
2023-04-14 00:10:34 +01:00
Tomasz Wlostowski
c1fb392333
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
(cherry picked from commit 1532a83330
)
2023-04-14 00:10:07 +01:00
Tomasz Wlostowski
de60d5467c
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
(cherry picked from commit d961cdce3f
)
2023-04-14 00:10:01 +01:00
Tomasz Wlostowski
c1274e24b0
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.)
(cherry picked from commit bfbda978b8
)
2023-04-14 00:09:56 +01:00
Tomasz Wlostowski
7f593d3999
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
(cherry picked from commit 1283c4713f
)
2023-04-14 00:09:49 +01:00
Tomasz Wlostowski
3a6a6097a7
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
(cherry picked from commit eed05191a9
)
2023-04-14 00:07:47 +01:00
Jeff Young
323a2d83fa
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.
(cherry picked from commit d040690f60
)
2023-04-09 23:13:44 +01:00
Jeff Young
03c3393616
Handle more pad shapes when building diffpair gateways.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/1883
(cherry picked from commit 1d19672054
)
2023-04-09 23:07:38 +01:00
Jeff Young
2ba6fad633
Centralize NPTH has-annulus processing.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/13437
(cherry picked from commit 3b63d70d01
)
2023-04-09 19:04:33 +01:00
Wayne Stambaugh
d28cf632e4
Coverity fixes and code cleaning.
...
(cherry picked from commit a1fb8e1b1d
)
2023-03-16 10:59:05 -04:00
Wayne Stambaugh
9e1fd16329
Coverity fixes and code cleaning.
...
(cherry picked from commit 4e99812145
)
2023-03-10 11:21:19 -05:00
Wayne Stambaugh
2c7f44f78d
Coverity fixes and code cleaning.
...
(cherry picked from commit 789bf6455a
)
2023-03-04 13:14:59 -05:00
Jon Evans
cb334be8c4
PNS: Diff pairs can have different hole-to-hole size
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13993
(cherry picked from commit f12f2b8420
)
2023-02-26 17:57:47 +00:00
Jon Evans
8845cc0556
PNS: Safety for evaluating item nets for rules
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13993
(cherry picked from commit 459473ccc3
)
2023-02-26 17:57:33 +00:00
Jon Evans
3dfc502814
Router: Do not collide items within a net tie footprint
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13909
(cherry picked from commit 2d7c5c5c0f
)
2023-02-14 21:10:42 -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
Mike Williams
a76a4f9788
Router: don't unnecessarily change track widths on layer change
...
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/13546
2023-01-25 09:34:17 -05:00
Jeff Young
89d434255c
Run clearance rules for router status bar.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/13605
2023-01-20 14:19:58 +00:00
Tomasz Wlostowski
761e754294
router: trying to improve the 'guess posture' algorithm to work well with both fix-all and fix-last-segment on click
2023-01-12 23:37:07 +01:00
Tomasz Wlostowski
65def26b4d
router: follow up ROUTER::GetUpdatedItems() API changes in the ROUTER_TOOL
2023-01-12 23:37:07 +01:00
Tomasz Wlostowski
d07d6c9a30
router: fix 'Bowen knot'-looking hulls for 0-length segments
2023-01-12 23:37:07 +01:00
Tomasz Wlostowski
0595440d79
router: minor improvements in shove algorithm handling of vias
2023-01-12 23:37:07 +01:00
Tomasz Wlostowski
213d30cad6
router: workaround for assertion fail on NODE::Add(unique_ptr<LINE>)
2023-01-12 23:37:07 +01:00
Tomasz Wlostowski
aa7271e55a
router: expose the 'head' traces in a separate list for debug logs
2023-01-12 23:37:07 +01:00
Jon Evans
c530bdb5a1
Rename GetSelectMenuText to GetItemDescription
...
This descriptive text is used for many more things than
just the select menu these days.
2023-01-11 22:27:44 -05:00
Alex
95f5d92fc6
Fix length overestimation when first/last line segment enters a pad.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/13322
2022-12-30 16:27:59 +05:00
Alex
867a2e833d
router: Hotglue the debug graphics back to pcbnew.
2022-12-30 14:44:48 +05:00
Jeff Young
4c63b4e061
Class name <-> file name sync.
2022-12-29 18:05:57 +00:00
Tomasz Wlostowski
7d40bbdf38
router: mark the head trace (as opposed to the 'fixed tail') with fully saturated color
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/11386
2022-12-29 17:54:59 +01:00
Tomasz Wlostowski
dfb1068358
router: improve heuristic to avoid segment drag 'flickery snapping'
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/10113
2022-12-29 17:54:31 +01:00
Jon Evans
ee0a41e3bc
Remove excess calls to SelectedItemsModified
...
We really don't want to post these events unless the *selected* items
were actually modified, since it results in a redraw of the properties
panel (which disturbs edit state and causes flicker on MSW).
Now the COMMIT system is responsible for sending this event iff the
commit touches items that are selected.
Side note: UpdateMsgPanel is useless on every app except pl_editor, so
it can probably be refactored/removed at some point.
2022-12-26 20:57:58 -05:00
Jeff Young
34e134c5e5
Don't allow clearanceEpsilon to force clearance < 0.
...
Also, a plated hole has the max clearance of hole_clearance and
copper_clearance.
Fixes https://gitlab.com/kicad/code/kicad/issues/13237
2022-12-24 12:56:41 +00:00