Skip to content

Validate net-label and connector placement together before committing - #1212

Open
imrishabh18 wants to merge 2 commits into
repro/rp2040-shaft-positionfrom
fix/shaft-position-label-clearance
Open

imrishabh18 wants to merge 2 commits into
repro/rp2040-shaft-positionfrom
fix/shaft-position-label-clearance

Conversation

@imrishabh18

@imrishabh18 imrishabh18 commented Sep 16, 2026

Copy link
Copy Markdown
Member

Stacked on #1210 (repro/rp2040-shaft-position).

In the shaft-position schematic, the ENC_SCL label connector ends only 0.001 units from SDA. The label-clearance pass checks strict perpendicular crossings, which misses near-contact and endpoint contact, and only proposes an outward displacement. Clearing label text can therefore create an ambiguous wire attachment or leave the label unresolved.

The existing placement pass now validates the rendered label and its complete connector as one candidate, with 0.05 clearance from unrelated traces, including inline terminal wires. This rejects near-contact, endpoint contact, parallel overlap and crossing. Group changes are atomic and proposed connectors are also checked against one another. Same-net attachment remains legal.

If the usual outward proposal fails for an individual label, the same search tries alternate anchors and allowed orientations in connector-length order. It respects chips, text, labels, attachment geometry and same-net branches; blocked proposals do not mutate the output. In the shaft-position replay, ENC_SCL faces left beside its resistor on a short connector, clear of SDA. The SDA route remains unchanged. There is no additional cleanup/shortening stage.

Validation:

  • A regression starting at the resistor pin before a connector exists fails on the parent implementation and passes with candidate selection.
  • Tests cover blocked alternatives, orientation constraints, endpoint/near contact, parallel overlap, horizontal/reversed connectors and same-net attachment.
  • bun test: 416 passed, 4 existing skips, 0 failures.
  • bunx tsc --noEmit, bun run format:check and diff checks pass.
  • Shaft-position snapshot visually inspected. One additional snapshot changes: a V3V3 label moves 0.2 units to clear a neighboring wire. The successful group-shove test now uses a real gap rather than placing its signal tag on a ground wire.

The original shaft-position geometry is replayed at the label-clearance stage, not claimed as a captured historical full-pipeline input. Open InlineNetLabelSolver/shaft-position-label-clearance in Cosmos to inspect it.

Candidate-selected SCL label

@vercel

vercel Bot commented Sep 16, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
schematic-trace-solver Ready Ready Preview Sep 16, 2026 2:51pm UTC

Request Review

@imrishabh18 imrishabh18 changed the title Keep the shaft-position SCL label above the SDA wire Validate net-label and connector placement together before committing Sep 16, 2026
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.

1 participant