fix: include downloaded CAD models in GLB and GLTF exports - #4591
Draft
seveibar wants to merge 3 commits into
Draft
fix: include downloaded CAD models in GLB and GLTF exports#4591seveibar wants to merge 3 commits into
seveibar wants to merge 3 commits into
Conversation
seveibar
marked this pull request as draft
September 3, 2026 16:53
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
After
tsci import --download,tsci export ... -f glbor-f gltfcan report success while producing empty component meshes. Downloaded paths such as./imports/Part/Part.objare passed to the converter with the registry API asprojectBaseUrl, so the converter requests a registry URL instead of the local file.Resolve existing local model paths to
file://URLs before GLB/GLTF conversion, using the path conversion already used by the build pipeline. Model files remain separate and are read on demand; their bytes are not embedded in Circuit JSON. Preserve the input Circuit JSON, remote URLs, and registry resolution for uninstalled package assets. Bare local paths and paths with spaces are covered as well.Local loading depends on tscircuit/circuit-json-to-gltf#188, which adds a runtime-independent
FilesystemInterface. The CLI supplies a small Node adapter with onereadFile(fileUrl)method; the converter itself has no Node dependency.Validation:
tsci import --jlcpcb --download C2040tests pass.bunx tsc --noEmit,bun run build, and format checks pass.