tsci export -f glb can't load a relative cadModel stepUrl (404); build --glbs can

未关闭
#5,654 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

@jeffrey-graham 已经在做这个了。

开始于 2026年11月7日。

  • #5656 来自 @tonnylegacy —— 已关闭,未合并
  • #5657 来自 @Abse2001 —— 已关闭,未合并
  • #5718 来自 @Crodify —— 已关闭,未合并
  • #5728 来自 @jeffrey-graham —— 未关闭
  • #5775 来自 @aswadi —— 未关闭

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
25/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
停滞
技术栈
cli, react, typescript
领域
cli

调研方向

The bug is in tsci export -f glb, which fails to resolve a relative cadModel stepUrl (404) while tsci build --glbs succeeds on the same file. Compare how the two commands pass the project base URL to circuit-json-to-gltf, starting with the export path. Two open pull requests (#5656, #5657) already target this, so check them before starting. Done means a GLB exported with the STEP model included, matching the size from build.

由索引模型根据 Issue 内容生成。

描述

tsci export -f glb can't load a cadModel with a relative stepUrl, but tsci build --glbs loads the same file.

// index.tsx, with libraries/cap.step next to it
export default () => (
  <board width="10mm" height="10mm">
    <capacitor name="C1" capacitance="100nF" footprint="0402" cadModel={{ stepUrl: "./libraries/cap.step" }} />
  </board>
)
$ tsci export index.tsx -f glb -o export.glb
Failed to load STEP from ./libraries/cap.step
error: Failed to fetch STEP file: 404 Not Found
$ tsci build index.tsx --glbs
[index] Written 3d.glb

The export still writes a GLB, without the model: 21 KB against 63 KB from build. It looks like export doesn't pass the project base URL to circuit-json-to-gltf the way build does.

Versions: tscircuit 0.0.3055, @tscircuit/core 0.0.2252, @tscircuit/cli 0.1.2428, circuit-json-to-kicad 0.0.263, Bun 1.3.11.

主要语言
TypeScript
星标
19
派生
115
平均合并
1 小时 50 分钟
30 天内合并 PR
260

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

tscircuit/cli 的其他 Issue

查看 tscircuit/cli 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。