- _load_geometry(): compute extents/volume from individual Scene meshes
without concatenating — avoids the RAM spike that crashed the container
- analyse_in_background(): spawns a child process (spawn context, not fork)
with a 120s timeout; OOM/crash in child no longer takes down the app
- _failed set: tracks files that timed out or crashed; spinner stops and
a warning with inline override form is shown instead of looping forever
- analysis_failed state passed to template; override form shown immediately
when analysis failed (no expand needed)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- analyse_in_background() runs in FastAPI BackgroundTasks with its own
DB session; _in_progress set prevents duplicate concurrent analyses
- Job detail shows a spinner + auto-reloads every 3s while computing
- 'Compute now' button also triggers background analysis
- StlCache.manually_set flag (migration 0011): entries marked manual are
never overwritten by auto-analysis
- 'Override values' collapsible form on job detail lets user set
bounding box and volume directly from slicer data
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
trimesh loads 3MF files as a Scene; force="mesh" fails on those.
Detect Scene and concatenate all geometries before computing extents/volume.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>