feat(slicer): add "slice as designed" mode honouring a 3MF's embedded settings (#2611)

Server-side slicing always applied the picked printer/process/filament
triplet via --load-settings, which overrides the designer's embedded
project_settings.config — so a MakerWorld model set up for 5 walls came
out at the picked profile's default 2. That override is correct for
re-slicing a design onto your own printer/AMS, but there was no way to
slice a file the way its author configured it.

SliceModal now offers a "Use the file's built-in settings" checkbox when
the source 3MF carries embedded settings AND the picked printer matches
the design's target model. It routes to the existing embedded-settings
slice path (previously only a crash fallback), so walls/infill/filament
come from the file. Ticking it locks all four preset dropdowns — printer
included, since it's unused on this path and changing it would drop the
match and hide the toggle. The printer-match gate stops embedded settings
being honoured across models (wrong bed); there is no cross-printer
re-targeting on this path.

- schema: use_embedded_settings on SliceRequest
- route: embedded_mode branch; crash-fallback guarded against re-running
- frontend: gated checkbox locking all four dropdowns, resets on mismatch
- 2 i18n keys across all 11 locales
- tests: backend (flag skips triplet / ignored for STL) + frontend
  (toggle offered on match, locks dropdowns + sends flag / hidden on mismatch)
This commit is contained in:
maziggy
2026-07-20 10:50:15 +02:00
parent 69c0effb92
commit c469aa3407
20 changed files with 314 additions and 19 deletions
+5
View File
@@ -1543,6 +1543,11 @@ export interface SliceRequest {
// "Textured PEI Plate", "Smooth PEI Plate", "Cool Plate (SuperTack)",
// "Supertack Plate".
bed_type?: string | null;
// "Slice as designed" (#2611). 3MF only: slice using the file's embedded
// project_settings.config (the designer's own wall count, infill, etc.)
// instead of the picked profile triplet. The preset refs above are still
// required by the backend validator but go unused on this path.
use_embedded_settings?: boolean;
}
// GET /api/v1/slicer/presets — unified listing across cloud / local / standard.