Skip to content

feat: add courtyard support for KiCad footprints#180

Open
janisag07 wants to merge 1 commit intotscircuit:mainfrom
janisag07:feat/courtyard-support
Open

feat: add courtyard support for KiCad footprints#180
janisag07 wants to merge 1 commit intotscircuit:mainfrom
janisag07:feat/courtyard-support

Conversation

@janisag07
Copy link
Copy Markdown

Summary

  • Parse F.CrtYd and B.CrtYd layers from fp_line elements and detect axis-aligned rectangles
  • Add fp_rect parsing to the kicad-zod schema and parser (handles courtyards defined as fp_rect)
  • Emit pcb_courtyard_rect circuit-json elements with correct center, width, height, and layer
  • Skip courtyard layers in the main fp_line processing loop to avoid debug noise

Fixes tscircuit/tscircuit#1081

Test plan

  • bun test — all 18 tests pass (16 existing + 2 new courtyard tests)
  • Courtyard from fp_line segments (R_01005_0402Metric): 4 lines → 1 pcb_courtyard_rect
  • Courtyard from fp_rect (DIP-10): rect element → 1 pcb_courtyard_rect (12.26mm × 13.2mm)

- Parse F.CrtYd and B.CrtYd layers from fp_line elements and detect axis-aligned rectangles
- Add fp_rect parsing to the kicad-zod schema and parser
- Emit pcb_courtyard_rect circuit-json elements with correct center, width, height, and layer
- Add courtyard tests covering both fp_line-based and fp_rect-based courtyards

Fixes tscircuit/tscircuit#1081
@vercel
Copy link
Copy Markdown

vercel bot commented Feb 17, 2026

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

Project Deployment Actions Updated (UTC)
kicad-component-converter Error Error Feb 17, 2026 1:53pm

Request Review

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.

Make sure kicad component components create courtyards

1 participant