Skip to content

feat: add kicad_sym support for schematic pin arrangement and labels#177

Open
aifunmobi wants to merge 1 commit intotscircuit:mainfrom
aifunmobi:feat/kicad-sym-support
Open

feat: add kicad_sym support for schematic pin arrangement and labels#177
aifunmobi wants to merge 1 commit intotscircuit:mainfrom
aifunmobi:feat/kicad-sym-support

Conversation

@aifunmobi
Copy link
Copy Markdown

/claim #114

Summary

  • Adds parseKicadSymToSchematicInfo() that parses .kicad_sym files and extracts schPinArrangement (left/right/top/bottom sides with pin ordering) and pinLabels (pin number → name mapping)
  • parseKicadModToCircuitJson() now accepts an optional kicadSym parameter to enrich circuit JSON with schematic info
  • Enriches schematic_component, source_component, and source_port elements with pin labels and port arrangement from the symbol file
  • Web UI updated to show kicad_sym file status indicator (optional file alongside kicad_mod)

How it works

KiCad symbol pins have rotation angles that indicate which side of the component they're on:

  • 0° → pin points right → LEFT side of component
  • 90° → pin points up → BOTTOM side
  • 180° → pin points left → RIGHT side
  • 270° → pin points down → TOP side

The parser recursively walks the S-expression tree, deduplicates pins across sub-units, categorizes them by side, and sorts by position for natural visual ordering.

Test plan

  • 3 new tests: resistor (2-pin passive), ATmega328P (28-pin IC), invalid input
  • All 19 existing tests pass
  • Format check passes (biome format)
  • Tested with ATmega328P.kicad_sym fixture — correctly maps VCC/GND to left side, PB0-PB5/PC0-PC5/PD0-PD7 to right side

🤖 Generated with Claude Code

Parse .kicad_sym files to extract pin positions and names, converting
them into schPinArrangement (left/right/top/bottom sides) and pinLabels
for enriched schematic component output.

- Add parseKicadSymToSchematicInfo() parser
- Accept optional kicad_sym in parseKicadModToCircuitJson()
- Enrich schematic_component and source_port with pin labels
- Update web UI to show kicad_sym file status
- Add tests with ATmega328P (28-pin IC) and resistor fixtures

/claim tscircuit#114

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel bot commented Feb 9, 2026

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

Project Deployment Actions Updated (UTC)
kicad-component-converter Error Error Feb 9, 2026 6:22pm

Request Review

@aifunmobi
Copy link
Copy Markdown
Author

Friendly ping — CI is green on this one. Happy to address any feedback!

@aifunmobi
Copy link
Copy Markdown
Author

@seveibar Following up — this adds kicad_sym schematic symbol parsing/conversion. CI is green. Let me know if there's anything to adjust!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant