Support standard IPC-2581C NetShort declarations in DFM - #1245
Conversation
There was a problem hiding this comment.
Stale comment
Left a non-blocking comment; no reviewers were assigned. Bugbot completed with no findings and the Security Agent was not running, but this is a functional DFM change rather than a small fixup, so it still needs human review.
Sent by Cursor Approval Agent: Pull Request Router and Approver
There was a problem hiding this comment.
Stale comment
Left a non-blocking comment; no reviewers were assigned. Bugbot completed with no findings and the Security Agent was not running, but this is a functional DFM change rather than a small fixup, so it still needs human review.
Sent by Cursor Approval Agent: Pull Request Router and Approver
Amp-Thread-ID: https://ampcode.com/threads/T-01a078eb-df41-766f-a1e5-78294c09f3d7 Co-authored-by: Amp <amp@ampcode.com>
8f19e54 to
742324f
Compare
There was a problem hiding this comment.
Stale comment
Left a non-blocking comment; no reviewers were assigned. Bugbot completed with no findings and the Security Agent was not running, but this is a functional DFM change rather than a small fixup, so it still needs human review.
Sent by Cursor Approval Agent: Pull Request Router and Approver
Amp-Thread-ID: https://ampcode.com/threads/T-01a078eb-df41-766f-a1e5-78294c09f3d7 Co-authored-by: Amp <amp@ampcode.com>
There was a problem hiding this comment.
Stale comment
Left a non-blocking comment; no reviewers were assigned. Bugbot completed with no findings and the Security Agent was not running, but this is a functional DFM change rather than a small fixup, so it still needs human review.
Sent by Cursor Approval Agent: Pull Request Router and Approver
Amp-Thread-ID: https://ampcode.com/threads/T-01a078eb-df41-766f-a1e5-78294c09f3d7 Co-authored-by: Amp <amp@ampcode.com>


Summary
Set/NetShortmetadata, including transformed locations and source step/layout occurrence.NetShortidentifies one physical contact; it does not give a netless graphic ownership or exempt a whole component or net pair.Specification and limitations
The supplied IPC-2581C June 2020 draft, §8.2.3.10.8, specifies a single referenced location for each intentional short; another contact between the same nets requires another declaration. This replaces the earlier, incorrect whole-graphic NetTie exemption.
Partial overlaps, edge/point-only contacts, uncertain contact topology, multi-layer declarations, and declarations with more than two NetRefs remain unsupported and fail closed. In particular, the isolated real-geometry antenna regression completes, but a routed feed extending outside the bridge can still require unsupported partial-contact handling. This PR does not establish that the complete routed board passes DFM.
Companion exporter work: https://gitlab.com/diode-inc/kicad/-/merge_requests/35. The corrected exporter changes are now published to that fork MR under explicit user approval. They use native
net_tie_pad_groups, explicitSet/net, and contact-specific NetShort locations. No bespoke properties or board changes are used.Validation
cargo nextest run -p pcb-ipc2581-tools -p pcb-ir -p ipc2581: 627 passed; no snapshots changed.--all-targets -- -D warningspassed.fixtures/antenna.xml; regressions exercise standard and jlcpcb-1oz profiles, separate declarations for separate contacts, nearby same-pair gaps, third-net shorts, unrelated drills, missing ownership, metadata-only Sets, repeated layout occurrences, and partial/uncertain geometry including a 10 nm sliver.Note
Medium Risk
Changes copper clearance exemptions and conductor ownership in DFM—a correctness-sensitive fab path—but behavior is heavily regression-tested and invalid declarations fail closed.
Overview
Adds initial DFM support for IPC-2581C
NetShort(intentional net ties): the parser and import path now readSet/NetShortas electrical intent (not painted copper), keep declarations on step definitions even when a layer has no geometry, and scope import diagnostics to the checked step/layer.Copper clearance is updated so a valid declaration exempts only the specific contact at the declared location—graphic↔pad or pad↔pad on the same component—without merging nets or waiving unrelated shorts, third-net overlaps, or clearance elsewhere. Net-tie copper gets distinct conductor identity (
ConductorIdwith optional tied object); unattributed functional copper still fails closed, with clearer Set/feature/component messaging. Unsupported or ambiguousNetShortmetadata marks ownership-dependent rules Incomplete rather than silently passing.Includes a real antenna IPC fixture and broad regression tests (panel/array occurrences, negative clear copper, location tolerance, KiCad-like pad entry).
Reviewed by Cursor Bugbot for commit 310e6b2. Bugbot is set up for automated code reviews on this repo. Configure here.