TS

Summary

Fixes #54 — Improves Smoothie Board DSN-to-Circuit-JSON conversion by addressing three core issues:

  • Apply component rotation to pin positions: 206 of 322 components have non-zero rotation (0°-315°), but pin offsets were added without rotation transform — placing pads at wrong positions
  • Handle non-numeric pin numbers: 144 pins use string labels (GND2, rotate, A, C, +, -) that caused NaN in element IDs and null pin_number in source ports
  • Fix via/pad ID collisions: Multiple vias on the same net got identical IDs; pads with duplicate pin_number (“rotate”) also collided

Before → After

Metric Before After
Elements with NaN 920 0
Unique pad IDs 876/1055 1055/1055
Unique via IDs 1/42 42/42

Files changed (5 files, +119/-23)

  • convert-padstacks-to-smtpads.ts — rotation transform + pin label normalization
  • convert-dsn-pcb-components-to-source-components-and-ports.ts — same fixes for source ports
  • convert-wiring-via-to-pcb-vias.ts — include coordinates in via ID
  • repro7-smoothie-board.snap.svg — updated snapshot
  • repro15-smoothie-board-integrity.test.ts — 4 new tests (no NaN, unique IDs, element counts, rotation verification)

Regression check

All 47 existing tests pass — zero regressions on motor-breakout, water-counter, USB-C, and all other boards.

Test plan

  • 47 existing tests pass (0 regressions)
  • 4 new integrity tests pass
  • No NaN values in any circuit JSON element
  • All 1055 pad IDs unique
  • All 42 via IDs unique
  • Rotated component pads have >900 unique positions

/claim #54

🤖 Generated with Claude Code

Claim

Total prize pool $170
Total paid $0
Status Pending
Submitted February 09, 2026
Last updated February 09, 2026

Contributors

AI

aifunmobi

@aifunmobi

100%

Sponsors

TS

tscircuit

@tscircuit

$70
AI

aifunmobi

@aifunmobi

$70
MO

Mohan

@mohan-bee

$30