Skip to content

fix(quad): reject zero pitch instead of emitting NaN pads (#871) - #893

Open
yanyishuai wants to merge 1 commit into
tscircuit:mainfrom
yanyishuai:fix/quad-zero-pitch-nan
Open

yanyishuai wants to merge 1 commit into
tscircuit:mainfrom
yanyishuai:fix/quad-zero-pitch-nan

Conversation

@yanyishuai

Copy link
Copy Markdown

Summary

Fixes #871 — explicit zero pitch on quad-family footprints (lcc_p0mm, qfn16_p0mm, etc.) no longer silently produces NaN/null pad coordinates.

Root cause

quadTransform used truthiness checks on v.p. Explicit p=0 is falsy, so body sizing / pad sizing were skipped and getQuadCoords later computed NaN.

Fix

  • Validate that p / px / py are positive finite numbers and throw a clear error otherwise
  • Replace truthy v.p checks used for size inference with v.p > 0

Test plan

  • tests/quad-zero-pitch.test.ts — zero pitch throws; valid lcc pads stay finite
  • CI

Wallet

Do4v7foHJvRJLpRRoGaVPWX6DDEjX3yTK7J91gpwUQpE

This branch has not been deployed

No deployments
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.

bug: zero pitch on quad-family footprints produces NaN pad coordinates

1 participant