mirror of
https://github.com/ajisaacs/OpenNest.git
synced 2026-10-27 13:51:06 -04:00
A nest drawing copied from the drawing library has to remember exactly which revision it is a copy of, so later slices can tell when the library moved on (D2b) and so a save can target the right drawing. `Drawing.Library` holds the server key, id, revision and a snapshot of that revision's cut type, thickness, material, grade, units, notes and package hash. It is immutable, so copies can share it. `DrawingDto.library` is additive and omitted when null. It is read leniently: anything that cannot be trusted as a link drops the link with a reader warning and the drawing still loads, because a nest must never fail to open over provenance. Enum names are checked as single names since Enum.TryParse would accept numbers and comma lists. Copy paths: converter edits update drawings in place and so keep the link; canonical engine copies carry it; split pieces are new geometry and get none. Packages strip it so linking never changes a drawing's package bytes or hash. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>