Single source of truth: build123d drives BOTH the STL preview and the STEP
export from the same script + params, so what you see is what you download.
Verified live: generate → build123d → /api/build STL + /api/step STEP.
- prompts: SYSTEM_PROMPT teaches build123d (Python) with # @param sliders
- claude.ts: parse python fences
- step.ts → generic geometry-service client (/tessellate + /step), GeometryError
carries the Python traceback for the repair loop
- worker: /api/generate returns code; /api/build tessellates; /api/step runs the
same code+params (no separate Claude re-gen)
- client engine: runJscad → buildModel (server STL); parseParams handles # @param
- App: debounced param rebuilds + rebuilding indicator; STEP sends script+params
- Viewer: Z-up→Y-up rotation; retire client-side JSCAD worker
- VM service.py/runner.py: /tessellate + /step with params
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- Finishes (Plastic/Matte/Glossy/Metal/Chrome) via meshPhysicalMaterial pills
- Self-contained studio Environment (Lightformers, no external HDRI fetch) so
metal/glossy actually reflect; ContactShadows ground the model on y=0
- Models now rest on the floor plane (centered X/Z) instead of floating centered
- Snapshot button → clean PNG (hides grid+gizmo, forces render, downloads)
- color + finish persisted to localStorage
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Floating swatch palette (bottom-left) + native custom picker. Colour is a
viewer preference persisted in localStorage; threads App → Viewer → Model
material. Defaults to brand red.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- CaptureBridge forces gl.render(scene,camera) before toDataURL so the
screenshot is never a pre-render black frame (root cause of the bogus
"empty scene" critique + pointless auto-refine).
- Verify prompt is now a pure geometry-fidelity check: never judges/refuses
on subject matter, biases to matches:true unless empty/broken.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- Fix param sliders: Viewer now fits camera once per design (fitKey), not on
every param change — size changes are visible again. Better slider ranges.
- Progress UX: full-stage overlay with spinning cube + pipeline stepper,
animated thinking dots in chat, send-button spinner, staged status.
- B (vision verify): capture canvas → /api/verify (Claude vision) → auto-refine
one pass on mismatch. Fail-open so a flaky judge never blocks.
- C (persistence): D1 designs table + anonymous cookie identity, save/load/list,
designs drawer, autosave, shareable ids. no-store on all /api responses.
- D (STEP scaffold): /api/step + build123d prompt + service client (step.ts),
Download STEP button. Needs STEP_SERVICE_URL to go live.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Chat → Claude writes a JSCAD script → sandboxed Web Worker executes it →
live three.js preview + STL export. Parametric // @param comments become
live sliders. Server-side repair loop fixes geometry errors before the user
sees them.
- src/worker: Hono API, Claude orchestration (prompt-cached system prompt),
/api/generate + /api/repair
- src/client: React + react-three-fiber viewport, JSCAD engine Web Worker
- Radical-branded (red #FF2D55 on #0B0B09, Syne + IBM Plex Mono)
Engine validated end-to-end: mug model → 3256-triangle valid binary STL.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>