Commit Graph
3 Commits
Author SHA1 Message Date
Andy Aragon a0fa3559b3 feat: enable cone STEP export and harden kernel load
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.
2026-06-29 15:03:32 +03:00
Andy Aragon 80b12ee9f7 feat: add B-Rep STEP import with exact round-trip
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.
2026-06-29 15:03:32 +03:00
Andy Aragon b292cc14eb feat: add B-Rep STEP export via brepjs + OpenCascade
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.
2026-06-29 15:03:32 +03:00