Skip to content

fix: add collinearity check to pointOnSegment() for diagonal wires#55

Merged
valentinozegna merged 1 commit into
mainfrom
fix/pointOnSegment-collinearity
Mar 21, 2026
Merged

fix: add collinearity check to pointOnSegment() for diagonal wires#55
valentinozegna merged 1 commit into
mainfrom
fix/pointOnSegment-collinearity

Conversation

@valentinozegna
Copy link
Copy Markdown
Contributor

Summary

  • Add cross-product collinearity check to pointOnSegment() before the bounding-box test, preventing false net merges when diagonal wire bounding boxes overlap
  • Use perpendicular distance tolerance of 2 units (0.0002 mil) to accommodate Altium coordinate rounding
  • Clean up undefined keys (mpn, description) from Altium component output

Test plan

  • New unit test for crossing diagonal wires with overlapping bounding boxes
  • All 404 tests pass including golden file tests (no regressions)
  • Type-check and lint clean

Closes #54

Bounding-box-only containment falsely merged nets when diagonal wire
bounding boxes overlapped. Add cross-product collinearity check with
2-unit perpendicular distance tolerance to handle Altium coordinate
rounding. Also clean up undefined mpn/description keys in component
output.

Closes #54
@valentinozegna valentinozegna merged commit 51fd2bb into main Mar 21, 2026
2 checks passed
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.

Altium parser: pointOnSegment() uses bounding-box instead of collinearity, causing false net merges

1 participant