Repository navigation
Conversation
`import part from "./input.step"` now bundles on every host, and the new stdlib helper `importStep(bytes)` turns the bytes into a shape inside a synchronous main(), so a script can load a part, edit it and export it. - bundle-spec: SHAPE_BUNDLE_LOADERS maps .step/.stp (both cases; esbuild loader keys are case-sensitive) to the binary loader. The MCP engine and the extension host inline their own options, so both now spread the shared map; the serve host gets it through shapeBundleOptions. - core/stdlib/step.ts: importStep does what replicad's async importSTEP does after `await blob.arrayBuffer()`, synchronously: Emscripten FS write, STEPControl_Reader, TransferRoots, OneShape, cast. It unlinks the temp file, frees the reader, progress range and root, and returns a Shape3D. A path string, a Blob, empty or non-STEP data each get a message that says how to import the file. - executor: a main() that returns a Promise (async main, or replicad's importSTEP returned directly) now fails with "main() returned a Promise" and points at importStep, instead of "main() must return one of". The abandoned Promise's rejection is silenced. - Typings: step-imports.d.ts declares *.step / *.stp modules as Uint8Array and ships with the shapeitup stubs, so the import type-checks. - Docs: get_api_reference (stdlib + export) and the skill. - Tests: core (real OCCT, against a block ShapeItUp exported itself), executor, shared, serve (native esbuild) and the MCP engine end to end (import, cut, export STEP; .STP; rebundle when the STEP changes). Versions: extension, mcp-server and the plugin entry bumped to 1.31.0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Replicad's exportSTEP registers its XSControl_WorkSession with a GC scope that deletes it directly, and also wraps it in a refcounting Handle that the writer shares. When GC collects the scope, replicad's FinalizationRegistry runs all three deletes in V8's order, so the session is freed twice. The finalizer logs "function signature mismatch" or "table index is out of bounds", and a later OCCT call dies with "memory access out of bounds". A rebundle after an export allocates enough to trigger that GC, which is why it crashed about 4 runs in 5. Core now writes STEP itself (step-writer.ts) with one owner per object, freeing everything in reverse order before it returns. The output matches replicad's once entity numbering is ignored. The exporter uses it, and so does the exportSTEP that scripts destructure. Tests: step-writer.test.ts forces GC through v8/vm and fails 3 of 3 runs against replicad's exportSTEP. export-rebundle.test.ts replays the reported sequence; it failed 5 of 5 runs before the fix and passed 10 of 10 after. step-import.test.ts now runs its export first. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
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.
To commits:
8b8738bImport existing STEP files into .shape.ts scripts (v1.31.0): STEP-leser i stdlib, step-writer, typer og MCP-verktøy, med tester og en fixture.c6a0d66Stop STEP export from crashing the next OCCT call (v1.31.1).Lagret fra en lokal worktree under opprydding 2026-12-04; ikke gjennomgått. Versjonsnumrene i grenene kolliderer (flere hever til 1.30.2/1.31.0), så de må rebases og nummereres om før fletting.
🤖 Generated with Claude Code