pyboxbuilder.export.fingerprint¶
Conditional write, gated on the description a piece was built from (FR-031).
Re-exporting an unchanged box should not rewrite its 3MF — a rewritten file looks modified to the slicer and to git even when the geometry is identical. What decides that is whether the description changed, and that is knowable exactly: the box’s fields, its compartments, its lid, the project’s thicknesses, the curve precision. This module records that fingerprint beside the file and compares it on the next run.
It replaces a mesh comparison (a Hausdorff distance from pymeshlab, over 10,000 surface samples in each direction, per file). That measured the wrong thing. OpenSCAD’s boolean solver does not promise to triangulate a complex CSG tree identically between runs, so nine of Emberleaf’s pieces — the SVG player boxes, the element-pack common box and the three spacers — measured as changed on every single export and were rewritten every time, while the tolerance that would have absorbed that was far above the 0.1mm the library promises to resolve. A description hash is exact, costs nothing, and needs no dependency.
Functions
Drop |
|
Return True when |
|
Normalize a fingerprint digest to prefixed 'sha256:<hex>' format. |
|
Note what |
|
Return True when |