Add physical dimensions to bin editor for correct aspect ratio

When de-perspectiving a bin photo taken at an angle, inferring the
output size from the quadrilateral shape squishes the result. Entering
real-world W×H (mm) lets the server use the correct aspect ratio,
scaled to the same resolution as the inferred size.

- Bin editor dialog: W×H number inputs, pre-filled from saved phys_w/phys_h
- PUT /api/bins/:id/corners: accepts optional phys_w/phys_h; when provided,
  derives bin_w/bin_h from the physical aspect ratio at equivalent area
- phys_w/phys_h stored on the bin record for re-use on next edit
- future-plans.md: bin types note (reusable dimensions per model)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-01 05:13:57 +00:00
parent 1ea14f8953
commit 320c6f1bd9
6 changed files with 60 additions and 6 deletions

View File

@@ -1972,6 +1972,22 @@ nav {
flex: 1;
}
.bin-editor-dims {
display: flex;
align-items: center;
gap: 0.4rem;
}
.bin-editor-dims input {
width: 5rem;
}
.form-hint {
font-size: 0.78rem;
color: var(--text-faint);
margin-left: 0.25rem;
}
.bin-editor-canvas {
display: block;
border-radius: 4px;