Repository navigation
Fix sizing errors in scans and STL exports - #234
Merged
Merged
Conversation
jasonmadigan
force-pushed
the
test/physical-size-accuracy
branch
from
October 7, 2026 10:50
601a8ce to
04a0cf2
Compare
jasonmadigan
force-pushed
the
test/physical-size-accuracy
branch
from
October 7, 2026 10:58
04a0cf2 to
de1be25
Compare
Generate photos of a flat 80 x 30 mm rectangle on A4, Letter and A3 paper. Check upload resizing, EXIF rotation, tracing and clearance against the actual downloaded cavity. A separate check rejects pockets with the right overall dimensions but corners that prevent the tool from fitting. Segmentation uses the submitted pixels instead of a hosted model. These tests do not establish model accuracy or account for raised objects. Signed-off-by: Jason Madigan <jason@jasonmadigan.com>
The brightness detector could put corners inside a shaded sheet or include an adjacent bright tabletop. Either mistake changes the physical scale. Try closed edges with bright paper inside before the existing fallbacks. Four maintainer photos cover the failure cases; synthetic tests protect dim-paper detection and prevent selecting a dark rectangular tool. The photo fixtures have EXIF metadata removed. Signed-off-by: Jason Madigan <jason@jasonmadigan.com>
A slow autosave could leave the export using old clearance even after the page showed Saved. Run saves in order and wait for them before generation. Hide the previous export while edits or generation are pending. A failed save now rejects flush(), so generation stops and drawer navigation keeps the unsaved plan open. An idle flush still does nothing. Signed-off-by: Jason Madigan <jason@jasonmadigan.com>
Canceling a browser request does not stop its backend worker. If that worker finishes last, it can replace a newer STL with old dimensions. Lock each bin or session from reading its settings through publishing its files. Other bins can still generate concurrently. Tests hold one job, verify that the next waits, then measure the final STL. Locks remain local to the single backend process that owns the JSON stores. Signed-off-by: Jason Madigan <jason@jasonmadigan.com>
An 80 mm tool with 0.1 mm clearance could be assigned a two-unit bin whose stacking lip leaves only 78.3 mm inside, cutting off the cavity ends. Use the larger wall or lip inset when creating a bin, automatically sizing it, or adding a tool. Measure exported cavities across both axes, half-grid sizes, disabled lips and thicker walls. Signed-off-by: Jason Madigan <jason@jasonmadigan.com>
After shortening an outline from 80 to 72 mm, moving Detail could restore the original 80 mm shape. Use the edited outline as the basis for later Detail changes. Rotate and reflect that basis with the displayed outline, and restore it together with the slider level during undo and redo. Also record the first edit after undo so it replaces the redo branch. Tests cover corrected dimensions, full-detail restoration and transforms. Signed-off-by: Jason Madigan <jason@jasonmadigan.com>
Upload a known photo, accept the detected paper corners, save the tool and measure the STL downloaded through the UI. Cover Accurate and Smooth output, a slow clearance save, automatic bin sizing and a manual correction followed by a Detail change. Run the suite in CI with isolated storage and pixel-based segmentation. Document the 1 mm limit, the physical-fit check for rounded corners, and what these tests cannot tell us about real model or raised-object errors. Signed-off-by: Jason Madigan <jason@jasonmadigan.com>
Require repository text to describe core behavior, changes and verification. Link these writing conventions from the shared agent instructions and align the existing documentation and test description. Signed-off-by: Jason Madigan <jason@jasonmadigan.com>
jasonmadigan
force-pushed
the
test/physical-size-accuracy
branch
from
October 7, 2026 11:07
de1be25 to
6701fa6
Compare
jasonmadigan
marked this pull request as ready for review
October 7, 2026 11:12
jasonmadigan
added a commit
that referenced
this pull request
Oct 7, 2026
An older split job could leave 17.45 mm ZIP pockets beside a full STL that already contained the new 12 mm pockets. The export lock in #234 prevents that mismatch. Measure both downloads after overlapping bin and session exports, saved depth changes, per-tool overrides and cached generation. Signed-off-by: Jason Madigan <jason@jasonmadigan.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Sugge
2D77
stion cannot be applied right now. Please check back later.
Summary
This fixes five bugs found while investigating wrong-sized cutouts:
The Detail bug, for example, turned a saved 72 mm correction back into an 80 mm outline. Its regression test now checks the actual downloaded cavity is 72.2 mm with 0.1 mm clearance.
The original scan-size report remains unresolved. This PR does not correct perspective enlargement of raised objects. Fixtures are synthetic or maintainer-provided. Edits made in another tool editor still require reloading the bin.
The contribution guide now requires repository writing to describe core behavior directly.
Tests
venv/bin/python -m pytest: 848 passed.pnpm test: 275 passed.make lint: passed, with nine existing warnings.make test-e2e-accuracy: five browser-to-STL tests passed.The browser suite runs in CI and measures exported geometry within 1 mm. Smooth output must also fit the whole known tool. Segmentation is substituted with a mask derived from the uploaded pixels, so these tests cover calibration and export handling rather than hosted model quality.
Relates to #233