3 Commits

Author SHA1 Message Date
superGeometry 9ca93f03e5 Measure: right volumes and areas on extruded and revolved splines and their shells
The engine's measure integrated a face swept from a spline in one piece, blind
to the spline's own pieces: an extruded closed spline read 316 000 mm3 for
284 800 (11 % over), its side 1.7 % over, a revolved spline 1.2 %, the shelled
mouse 21 489 for 22 249. Bodies and faces with swept faces (extrusion,
revolution, offset) are now integrated in ocFree piece by piece (Green's
theorem round each face's outline, cut at the surface's joints and where the
outline crosses them), giving volume, area and centres to a millionth. A shell
measures in about 1 s (the kernel's own exact measure took 11 s), and each
shape is measured once.

Mouse test: the block equals its end x 45 and its side the outline x 45, the
shell agrees with a mesh, the button lines' change read straight off.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 22:56:42 +02:00
superGeometry 60b0c5e287 Shell: cuts across a curved shell's inner walls work (loose offset edges made again)
A slot right across a shelled mouse's top failed at every tolerance
("the faces don't meet up"). Two causes:

- The kernel's offset gave the edge where two smooth offset faces meet
  (the inner top and the inner rim round) a 3D curve 0.2 mm off, its
  tolerance 0.14 mm, while its curves on both faces were exact. Any cut
  across it broke the faces. tightenEdges (used by offsetSolid, so by
  Shell) makes each such edge again from its exact curve on each face,
  rebuilds those faces and sews them back; kept only if it is one sound
  solid of the same volume.
- unify (merging faces on one surface after a boolean) joined the two
  pieces of a closed round either side of its seam into a broken face.
  A merge that breaks a sound shape now keeps the pieces.

That second change showed a thread check letting a broken groove through:
on a whole round face, a thread must take all its grooves hold (the
"what the groove overlaps" fallback is for faces that aren't whole).

The mouse test now cuts the line across; the cut's change is checked by
mesh (the engine's volume measure is off on offset faces).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 21:04:14 +02:00
superGeometry a41684a5ed Stress test (a computer mouse): faster shell checks, quick no on broken cuts, a missed cut says so
- tests/mouse.test.ts: a spline outline cut by a spline side profile,
  rim and foot rounded, shelled from below, button slots, a scroll wheel
  with 24 patterned knurls joined, thumb holes, a base plate.
- Shell: the wall checks test points inside the body and the shell,
  instead of booleans with little cubes (the mouse's shell: 51 s -> 17 s).
- Repair: a "fix" measuring below nothing or more than its box is
  turned down at once, without meshing it (a failing cut across the
  shelled mouse: 186 s -> 10 s before it said no).
- A Cut that takes nothing away (drawn on the wrong side) leaves a
  note on its step; before, nothing happened and nothing was said.

Known limit, kept in the test: a cut that splits the shell's inner
(offset) faces in two leaves them invalid at every tolerance.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 20:07:20 +02:00