Skip to content

Show the error cube when a footprint has no 3D model - #963

Draft
addibble wants to merge 1 commit into
tscircuit:mainfrom
addibble:fix/error-cube-for-empty-footprinter-model
Draft

Show the error cube when a footprint has no 3D model#963
addibble wants to merge 1 commit into
tscircuit:mainfrom
addibble:fix/error-cube-for-empty-footprinter-model

Conversation

@addibble

@addibble addibble commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

jscad-electronics reports "I have no body for this footprint" by returning
an empty model rather than by throwing. FootprinterModel then built an
empty THREE.Group: no geometry, no error, nothing added to the scene. The
component was simply absent from the board, indistinguishable from one
that was never placed.

That silence is expensive to debug. A board authored with parametric chip
footprints (res_p0.8656mm_..., which jscad-electronics has no body for)
lost 26 of its 36 passives -- every resistor among them -- and the only
signal was noticing by eye that they were gone.

Both viewers already wrap every model in a ThreeErrorBoundary backed by
Error3d, which draws the red cube and shows the message on hover. All
this needs is something to catch: throw during render, naming the
footprint, and the missing part becomes visible in the place you are
already looking, rather than a component you have to notice the absence of.

Tests render the component inside that boundary and assert what the
boundary caught. The upstream silence is asserted too, so if
jscad-electronics ever reports this itself -- or grows a body for these
footprints (tscircuit/jscad-electronics#319) -- the test says so rather
than leaving a guard for a condition that no longer happens.

jscad-electronics reports "I have no body for this footprint" by returning
an empty model rather than by throwing. `FootprinterModel` then built an
empty THREE.Group: no geometry, no error, nothing added to the scene. The
component was simply absent from the board, indistinguishable from one
that was never placed.

That silence is expensive to debug. A board authored with parametric chip
footprints (`res_p0.8656mm_...`, which jscad-electronics has no body for)
lost 26 of its 36 passives -- every resistor among them -- and the only
signal was noticing by eye that they were gone.

Both viewers already wrap every model in a ThreeErrorBoundary backed by
`Error3d`, which draws the red cube and shows the message on hover. All
this needs is something to catch: throw during render, naming the
footprint, and the missing part becomes visible in the place you are
already looking, rather than a component you have to notice the absence of.

Tests render the component inside that boundary and assert what the
boundary caught. The upstream silence is asserted too, so if
jscad-electronics ever reports this itself -- or grows a body for these
footprints (tscircuit/jscad-electronics#319) -- the test says so rather
than leaving a guard for a condition that no longer happens.
@vercel

vercel Bot commented Aug 6, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
3d-viewer Ready Ready Preview Aug 6, 2026 1:56am

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.

1 participant