Roadmap 0.13, Fixes

FX.757 PartCraft exact STEP export: a corner is no longer moved millimetres off the part

  • Fix
  • Built · in the lab
  • PartCraft

Owner 2026-12-01: "look into why volumes got worse" (the exact STEP round trip measured on 159 production STEP files).

Cause: the exact STEP writer (step-exact.js) snaps each corner onto the exact surfaces it touches and accepted any move up to 2% of the part size. Where two exact planes are almost one plane (a face the source split in two, each half on its own plane a tolerance apart), the nearest point on their crossing line is millimetres away, so corners jumped 4 to 19 mm and the neighbouring faces changed. 24 of the 156 files that write in time came out more than 1% off in volume, with no warning.

Fix: the allowed move is now 0.1% of the part size (MOVE_MAX = 1e-3, both the corner and the edge-point check). A longer move is refused: a flat corner stays where the mesh has it, round faces there are written as facets.

Measured by the builder on the 156 files, before and after: volume off by more than 1%: 24 to 0; area off by more than 1%: 4 to 0; 38 files improved, none got worse; exact faces (7,079) and fully exact files (20) unchanged.

Tested: node tools/partcraft-test/test-step-exact.mjs 183 passed, 0 failed (2 new checks: a slab whose top is two almost coincident planes; the corner was 1.5 mm off before, 0.001 mm after, and the file is a valid solid in the test reference kernel); test-step-roundtrip.mjs 85 passed.

Not done: the residual limit stays at 1e-9 x size (1e-8 gives 29 fully exact files instead of 20 but one file's volume slips from 7e-7 to 1e-5; owner asked); the writer still has no self-check of the written body against the mesh (proposal: compare volume and per-face area, write the body as facets and say so when they differ); the 268-solid assembly takes more than 300 s to write; 13 files blocked by round faces beside faceted ones are not investigated. Backup tmp/step-exact.js.pre-volume-fix.

Add a comment

Community comments

No comments yet

Add detail as we go: how you would use it, files or steps that show the problem, what other programs do. The team reads every comment.

Sign in or create a free account to add a comment.