Skip to content

Extract CAD models from library footprint circuit json#2306

Merged
techmannih merged 1 commit into
tscircuit:mainfrom
techmannih:codex/jlcpcb-library-cadmodel
May 17, 2026
Merged

Extract CAD models from library footprint circuit json#2306
techmannih merged 1 commit into
tscircuit:mainfrom
techmannih:codex/jlcpcb-library-cadmodel

Conversation

@techmannih
Copy link
Copy Markdown
Member

What changed

  • extract cadModel from async footprintLibraryMap circuit json when the resolver does not return an explicit cadModel
  • add a regression test covering a jlcpcb: library footprint that embeds CAD data in fetched circuit json

Why

jlcpcb: footprint resolvers can return full circuit json that already includes a cad_component. Before this change, the generic library-footprint path only used result.cadModel, so embedded CAD metadata was dropped and the 3D render path could fall back incorrectly.

Impact

Library footprint resolvers can now behave more like the jlcpcb path in eval: if the fetched footprint circuit json already contains CAD metadata, core will preserve it for 3D rendering even without an explicit cadModel field.

Validation

  • bun test tests/footprint/footprint-library-map-jlcpcb-cadmodel.test.tsx tests/footprint/footprint-library-map-cadmodel.test.tsx
  • bunx tsc --noEmit (fails in unrelated existing files such as schematic trace solver, pcb trace typing, and missing optional test deps)

@vercel
Copy link
Copy Markdown

vercel Bot commented May 17, 2026

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

Project Deployment Actions Updated (UTC)
tscircuit-core-benchmarks Ready Ready Preview, Comment May 17, 2026 3:01am

Request Review

@techmannih techmannih changed the title [codex] Extract CAD models from library footprint circuit json Extract CAD models from library footprint circuit json May 17, 2026
@techmannih techmannih marked this pull request as ready for review May 17, 2026 03:04
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 941309cec6

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@techmannih techmannih merged commit 5465cae into tscircuit:main May 17, 2026
13 checks passed
@techmannih techmannih deleted the codex/jlcpcb-library-cadmodel branch May 17, 2026 19:05
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.

2 participants