Files
OpenNest/OpenNest.IO
ajandClaude Opus 5.5 fe31a3f8ec feat(io): add in-memory nest snapshots for undo
Undo will keep whole-nest states and restore by reading one back.
NestSnapshot.Capture writes the same archive a save writes, with three
differences Phase 0 found necessary: it does not stamp DateLastModified
on the live nest, it leaves best fits out (they are a cache), and it
keeps empty plates, which files drop, so an undo does not shift plate
indices or lose a plate the user added. File output is unchanged.

Restore reuses each live drawing whose saved content is unchanged,
matched by a fingerprint over its nest.json entry, program, hole
sub-programs and source entities. BestFitCache and FillResultCache are
keyed by the Drawing object, so a plain read would make the next fill
recompute every best-fit pair; reuse keeps those caches, colours and
Drawing.Id, and skips parsing the reused programs. Nested counts are
recomputed for the restored nest, and given back to the live one if the
read fails.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 12:11:43 -04:00
..