slice_gcode_submit
Submit a 3D model or STL to the PrusaSlicer CLI for real G-code generation; returns a job ID to poll for filament usage, layer count, and estimated print time.
Instructions
Slice a real part with the PrusaSlicer CLI, asynchronous — the external-CLI
upgrade of the analytic slice_estimate: real perimeters, infill patterns,
supports, travel/acceleration, and the slicer's own print-time model.
Requires a PrusaSlicer install ('apt install prusa-slicer' / the AppImage);
when absent this returns {ok:false, reason, install} rather than raising.
Pass a body handle (exported to STL in the modeller) or a prepared
stl_path. infill_fraction is 0..1 (full infill auto-switches the fill
pattern — PrusaSlicer's default refuses 100%); material/density_g_cc set
the filament density used to turn the sliced volume into grams. With a body
the result also carries the analytic estimate and the deposited_ratio
between them (a 20 mm cube at 100% lands ~1.008 — the skirt).
Returns the degradation dict or {job_id, status, cache_hit}; poll job_result for {ok, gcode_path, filament_mm, filament_cm3, filament_g, print_time_s, print_time_text, layer_count, config (the slicer's echoed settings), analytic?, deposited_ratio?}.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| body | No | ||
| material | No | PLA | |
| stl_path | No | ||
| supports | No | ||
| extra_args | No | ||
| density_g_cc | No | ||
| infill_fraction | No | ||
| layer_height_mm | No |