feat(editor): add print-ready model exports - #701
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit fcf8202. Configure here.
| } | ||
| } finally { | ||
| if (generation === generationRef.current) setIsPreparing(false) | ||
| } |
There was a problem hiding this comment.
Overlapping print prepares race
High Severity
Changing any print option or nodes while a prepare is running bumps generationRef and forces isPreparing back to false, even though the in-flight modelExport keeps going. Inputs stay editable during prepare, so a second prepare can start immediately. Those calls share a non-refcounted setExporting flag, so the first finish can clear exporting before the second clones, leaving instanced plants as proxy colliders in the later artifact.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit fcf8202. Configure here.


What does this PR do?
Adds an experimental print-ready export path to the editor while preserving the existing GLB, STL, and OBJ exports unchanged.
@pascal-app/editor;@pascal-app/viewerhas no diff frommain.How to test
bun check,bun run test,bun run check-types, andbun run build.Screenshots / screen recording
Local production-build smoke test at 1440 x 1000 confirmed the classic export controls and print-ready card render together without console or page errors.
Checklist
bun devbun checkto verify)mainbranchNote
Medium Risk
Large new mesh-compilation and export pipeline (Manifold worker, CSG topology checks) can produce incorrect or blocked print files, but it is editor-only and does not change auth or persisted scene data.
Overview
Adds an experimental print-ready export path in Settings: millimeter, Z-up 3MF (or binary STL) with scale, structure-vs-everything content, whole-scene or per-level packages, optional plinth, and a prepare/preflight step before download.
Structural prints compile canonical solids with Manifold in a worker, then run topology/volume/winding checks and optional minimum-feature thickness against wall/slab/roof semantics. Blocked reports prevent download; spanning stairs/elevators are omitted from level parts.
Classic GLB/STL/OBJ remain, now with a visible-nodes-only toggle (hidden nodes pruned by default). Export returns artifacts instead of always downloading immediately. A Settings sidebar tab is added in the editor app.
Reviewed by Cursor Bugbot for commit fcf8202. Bugbot is set up for automated code reviews on this repo. Configure here.