fix(work_plane): allow negative offset_mm + readable validation errors

- Drop the ge=0 constraint on FitReq.offset_mm (negative values are a
  documented usage: aggressive noise cull above the plane).
- HTML input min lowered to -200 to match.
- Render FastAPI 422 validation arrays as a human-readable string in the
  status chip (was showing "[object Object]").

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Adriano Dal PastroandClaude Opus 4.7 committed 2026-05-13 11:03:36 +02:00
1 parent 92506d62c6
commit 76e0739620
3 files changed
+22 -4

No files matched your search

+4 -1
View File
@@ -31,7 +31,10 @@ class FitReq(BaseModel):
v_min: int = Field(..., ge=0)
u_max: int = Field(..., gt=0)
v_max: int = Field(..., gt=0)
offset_mm: float = Field(5.0, ge=0.0, le=200.0)
# offset_mm può essere negativo: valore <0 esclude un buffer SOPRA il
# piano (toglie noise depth della superficie); valore >0 è permissivo
# (mantieni un buffer sotto il piano). Range esteso simmetricamente.
offset_mm: float = Field(5.0, ge=-200.0, le=200.0)
max_preview_points: int = Field(5000, ge=100, le=20000)