Skip to content

Repro: tsci export -f glb cannot load a relative stepUrl (#5654) - #5875

Open
Abse2001 wants to merge 2 commits into
mainfrom
repro/glb-export-relative-step
Open

Abse2001 wants to merge 2 commits into
mainfrom
repro/glb-export-relative-step

Conversation

@Abse2001

Copy link
Copy Markdown
Contributor

Stack: 1/2, this repro → the fix PR. Merge the fix into this branch first, then merge this PR, which then contains the repro and the fix, to main.

Repro for #5654. A cadModel with a relative stepUrl loads with tsci build --glbs, but tsci export -f glb can't load it:

Command Result on main
tsci build index.tsx --glbs Loads the model: a 214 KB GLB
tsci export index.tsx -f glb Failed to load STEP from ./libraries/cap.step, then 404 Not Found, and a 22 KB GLB without the model

Test

tests/cli/export/export-glb-relative-step-model.test.ts writes this TSX next to a libraries/cap.step model, copied from tests/cli/assets:

<board width="10mm" height="10mm">
  <capacitor name="C1" capacitance="100nF" footprint="0402"
    cadModel={{ stepUrl: "./libraries/cap.step" }} />
</board>

It runs tsci export index.tsx -f glb, then inline-snapshots every Failed to load STEP from … message in stderr. Today there's one. The fix PR keeps the test as is and updates the snapshot to [].

The CLI test fixture can't run in my container, which has no IPv6 listen, so CI runs this test. I reproduced the same command directly with bun cli/main.ts export, and checked the inline snapshot's format against that real stderr.


Generated by Claude Code

A cadModel with stepUrl "./libraries/cap.step" loads with
`tsci build --glbs`, but `tsci export -f glb` reports
"Failed to load STEP from ./libraries/cap.step" (404) and writes the GLB
without the model (cli#5654).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PiJ1d34GaQJAWypDADnioN
Renders the GLB from `tsci export -f glb` to a PNG snapshot. The relative
STEP model fails to load, so the part shows as a placeholder box. The
model file is renamed to model.step, since the asset is a push button.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PiJ1d34GaQJAWypDADnioN
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