- Unit: cover the kernel-free helpers (shapeYawDegrees, worldAabb,
aabbsOverlap) and the new "step" export filename.
- E2E: drive the real exportShapesToStep/importedShapeFromStep against
the actual OpenCascade kernel (loaded from node_modules), asserting
primitives, holes, AABB gating, cones, and import->re-export all
conserve volume. Add tests/vitest.e2e.config.ts and a test:e2e script.
Bump occt-wasm 3.6.0 -> 3.6.1, which fixes the multi-solid STEP writer
that dropped a cone's lateral CONICAL_SURFACE. Verified end-to-end: a
cone keeps its full surface and exact volume in a multi-solid assembly,
so cones now map to exact B-Rep alongside box/cylinder/sphere.
- Add "cone" to EXACT_KINDS and restore the cone build branch
(full and truncated cones, honoring resized footprint).
- Drop the obsolete cone-bug skip and its special-cased reason string.
- brepKernel: clear the cached promise on a failed load so a transient
kernel fetch failure can be retried instead of poisoning the session.
- Update the export panel copy to list cones as exact geometry.
Import STEP/STP files as tessellated mesh bodies (Tier 1) while retaining
each body's exact OpenCascade B-Rep, normalized to the body's local frame
(lib/stepImport). On STEP export, re-emit imported bodies from that stored
B-Rep with the editor's placement reapplied via rigid kernel ops: rigid and
uniform-scaled placements stay exact analytic geometry, and non-uniform
resize degrades to valid B-splines (Tier 2). Closes import -> edit -> export.
A shared lazy occt-wasm loader (lib/brepKernel) is reused by import and
export so the kernel loads at most once per session, on first use.
Reconstruct parametric box/cylinder/sphere shapes as exact OpenCascade
B-Rep solids and write a named, colored multi-body STEP assembly, cutting
holes via boolean subtraction (only against bodies they overlap). brepjs
and the 22 MB occt-wasm kernel load lazily on first export, so the initial
bundle is unchanged.
Unsupported shape kinds are skipped with an in-app notice. Cones are exact
in the kernel but skipped pending an upstream occt-wasm multi-solid STEP
writer fix that drops conical surfaces.
occt-wasm runtime is staged into public/occt by scripts/copy-occt-wasm.mjs
(gitignored) and loaded outside the bundler; the optional brepkit /
opencascade kernel backends are aliased away in next.config.
Add a feature bullet, an "AI Scene Bridge (MCP)" section (enable bridge mode,
connect the MCP server, tools table, example prompt), and project-layout entries
for apps/mcp, the scene route, and docs/scene-bridge.
Co-Authored-By: Claude Opus 4.8 <[email protected]>
Additive fork feature letting an MCP server (driven by Claude) push parametric
WorkplaneShape[] scenes into the running SketchForge editor. The Node side never
writes browser storage; it stages a command file that an in-page poller applies
through the editor's existing updateProjectShapes() save path.
- Phase 1: apps/web/src/app/api/scene/route.ts — stages/serves commands behind the
existing same-origin guard, with its own monotonic stagingRevision (separate from
the app's project revision).
- Phase 2: apps/web/src/lib/sceneBridge.ts (SceneTransport seam + polling transport)
and a useSceneBridge poller hook in page.tsx (gated on ?bridge=1), which creates
unknown projects and hydrates via updateProjectShapes; defers while dragging.
- Phase 3: apps/mcp/ MCP server — set_scene/get_scene/add_shapes/list_kinds. zod
validates the ShapeKind union enum + base numerics, then reuses the app's own
sceneShape/canonicalizeShape for defaults/canonicalisation (no hand-authored ranges).
- Phase 4: docs/scene-bridge/README.md plus vitest cases for the route handler and
the schema validator.
Staged scenes live under .codex/pending-scenes/ (gitignored). MCP registered via
.mcp.json. npm run test: 29 passing.
Co-Authored-By: Claude Opus 4.8 <[email protected]>