Commit Graph

1412 Commits

Author SHA1 Message Date
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
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
jean-pierre charras 59f0e428fa Fix a PnS router issue doesn't respect knockout texts.
Fixes #13251
https://gitlab.com/kicad/code/kicad/issues/13251
2022-12-23 18:17:44 +01:00
Alex e8f755c665 router: Match segment endpoint calculation between dragger and the tool.
Prevents always picking point A when dragging short segments.
2022-12-21 20:55:49 +03:00
jean-pierre charras 161a1e21f5 PnS router: NPTH can be on copper layers, depending of the pad size and the hole size.
Now: round NPTH with a round hole bigger than the pad are not on a copper layer.
Other pas shapes are seen on copper layers (far from ideal, but reasonable)
Fixes #13214
https://gitlab.com/kicad/code/kicad/issues/13214
2022-12-20 12:50:22 +01:00