Skip to content

v1.2.0 — Production threads, screws/bolts split, robustness overhaul

Choose a tag to compare

@asbis asbis released this 20 Apr 18:23
· 197 commits to master since this release

Highlights

Production helical threads

Rewritten thread builder using the build123d loft-per-turn algorithm — 20mm M3 bolts that used to time out now render in under a second. Internal threads (nuts, tapped holes) go through Manifold for mesh-native booleans. Call bolts.socket("M3x10") for a real threaded fastener; bolts.nut("M3") returns a MeshShape with true helical internal threads.

New screws vs bolts API

  • screws.* — cosmetic fasteners with plain cylinder shafts. Fast, composable, good for layout and assembly views.
  • bolts.* — real threaded fasteners for STEP export and print previews.

Both namespaces cover socket, button, flat, hex, and nut variants.

Expanded standards

  • M10 and M12 across socket/button/flat/hex-nut tables
  • New HEX_HEAD spec (ISO 4017 hex-head bolts)
  • Friendly Did you mean "X"? suggestions on spec-key typos

Hole API: open on any face

Every directional hole function (holes.through, holes.blind, holes.counterbore, etc.) now accepts an axis parameter — +Z / -Z / +X / -X / +Y / -Y — so you can drill into walls, not just top-down.

Robustness overhaul

  • Pre-OCCT validators turn degenerate inputs (NaN, zero-width, unsupported sizes) into readable TypeErrors instead of opaque WASM pointer exceptions
  • BRepCheck geometry validation flags non-manifold output and withholds measurements on invalid parts
  • WASM recovery auto-resets the OCCT core after memory-access exceptions so a single bad render can't wedge the session
  • Multi-window routing via per-pid heartbeat files so MCP commands target the correct VSCode window
  • Streaming render — mesh parts arrive one-at-a-time for visible progress on large assemblies
  • Pending-render handshake so render_preview waits for actual tessellation instead of polling stale status

Other

  • export const material = "PLA" maps to built-in density presets
  • export const params = {...} now parsed statically so MCP can report declared sliders even when a render fails
  • Runtime warning buffer surfaces stdlib concerns (ambiguous hole diameters, no-op cuts) without crashing