Skip to content

Support standard IPC-2581C NetShort declarations in DFM - #1245

Merged
LK merged 4 commits into
mainfrom
ipc2581-netshort-dfm
Sep 23, 2026
Merged

LK merged 4 commits into
mainfrom
ipc2581-netshort-dfm

Conversation

@LK

@LK LK commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Preserve standard IPC-2581C Set/NetShort metadata, including transformed locations and source step/layout occurrence.
  • Require explicit copper net attribution. A NetShort identifies one physical contact; it does not give a netless graphic ownership or exempt a whole component or net pair.
  • Validate declarations against final copper on the declared layer. The supported case is a two-net contact where one connected region is contained in the other, without significance filtering or geometric uncertainty beyond coincidence precision.
  • Preserve other contacts, nearby gaps, third-net clearance, and unrelated drill checks. Ambiguous functional copper still fails closed with component, Set, and feature diagnostics.

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, explicit Set/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.
  • Scoped Clippy with --all-targets -- -D warnings passed.
  • Scoped doctests: 2 passed, 1 existing ignored test.
  • Real antenna geometry retained in 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.
  • Real findings remain, including the ground pad's 0.1 mm annular ring.

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 read Set/NetShort as 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 (ConductorId with optional tied object); unattributed functional copper still fails closed, with clearer Set/feature/component messaging. Unsupported or ambiguous NetShort metadata 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.


Devin Review

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale comment

Left a non-blocking comment; no reviewers were assigned. Bugbot and the Security Agent completed with no findings, but this is a functional DFM change rather than a small fixup, so it still needs human review.

Open in Web View Automation 

Sent by Cursor Approval Agent: Pull Request Router and Approver

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Open in Web View Automation 

Sent by Cursor Approval Agent: Pull Request Router and Approver

devin-ai-integration[bot]

This comment was marked as resolved.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Open in Web View Automation 

Sent by Cursor Approval Agent: Pull Request Router and Approver

@LK
LK force-pushed the ipc2581-netshort-dfm branch from 8f19e54 to 742324f Compare September 23, 2026 04:38

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note

Newer findings are available below. Devin Review posted a newer report on this PR, in addition to the findings presented here.

Devin Review found 1 new potential issue.

Devin Review

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Open in Web View Automation 

Sent by Cursor Approval Agent: Pull Request Router and Approver

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Open in Web View Automation 

Sent by Cursor Approval Agent: Pull Request Router and Approver

devin-ai-integration[bot]

This comment was marked as resolved.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Open in Web View Automation 

Sent by Cursor Approval Agent: Pull Request Router and Approver

@LK
LK requested a review from akhilles September 23, 2026 05:30
@LK
LK merged commit bc66fd4 into main Sep 23, 2026
14 checks passed
@LK
LK deleted the ipc2581-netshort-dfm branch September 23, 2026 16:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants