retry_print_with_fix
Diagnose the last print failure, merge recommended and custom slicer overrides, validate mesh printability, then re-slice and re-print the model with fixes.
Instructions
Diagnose the last print failure and re-slice + print with fixes.
When a print fails, call this tool instead of manually chaining
``diagnose_print_failure_live`` → ``slice_and_print``. It:
1. Reads live printer state and analyses the model geometry to
diagnose the failure (unless ``skip_diagnosis`` is True).
2. Auto-detects the loaded material from the AMS when
``material`` is omitted and the printer supports it.
3. Merges diagnosis-recommended slicer overrides with any
``custom_overrides`` you supply (your overrides win on
conflict).
4. Re-validates the mesh's printability before re-slicing. A
retry path that re-sends a broken mesh is the highest-
value place to validate — the previous attempt already
failed, and slicer overrides can't fix mesh-level issues.
Bypass with ``skip_validation=True`` if the caller already
validated.
5. Re-slices the (possibly auto-repaired) mesh with the merged
overrides, uploads the result, and starts the print.
Args:
model_path: Path to the STL/OBJ/3MF that failed.
printer_name: Target printer name. Omit for the default
printer.
material: Filament material (e.g. ``"PLA"``, ``"ABS"``).
Auto-detected from AMS when omitted.
printer_id: Printer model ID for intelligence lookup
(e.g. ``"bambu_a1"``).
custom_overrides: JSON object of additional slicer overrides
to merge on top of the diagnosis recommendations
(e.g. ``'{"brim_width": "8"}'``). Your values win on
conflict.
skip_diagnosis: If True, skip the failure diagnosis step and
re-slice using only ``custom_overrides``.
skip_validation: If True, bypass the pre-print mesh
validation gate. Defaults to False — designs are
pre-tested for printability before the retry reaches
the printer.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| material | No | ||
| model_path | Yes | ||
| printer_id | No | ||
| printer_name | No | ||
| skip_diagnosis | No | ||
| skip_validation | No | ||
| custom_overrides | No |