slice_estimate
Analytically estimate FDM part mass, filament usage, layer count, and print time from volume, bounding box, material, and infill settings—no slicer needed.
Instructions
First-order FDM slice estimate (analytic, NO slicer needed; see slice_gcode_submit for the real PrusaSlicer CLI). mass_g = volume·density (Materials DB); deposited = volume·(wall_fraction + infill·(1−wall_fraction)) so at 100% infill filament_g == mass_g; layer_count = ceil(bbox height/layer_height); print_time from nozzle volumetric flow.
material may be any Materials-DB card name (material_list / material_get), or
anything at all if you supply density_g_cc yourself — it overrides the DB
lookup. A generic word like 'polymer' is a CATEGORY, not a card, and 'nylon' is
a near-miss for one, so neither carries a density; the error names both exits.
filament_dia_mm (1.75 default, 2.85 for the older standard) sets the spool
stock the filament length is computed against.
Returns {mass_g, filament_g, deposited_volume_mm3, layer_count, print_time_min, infill_fraction}. Errors on a material with no density and no override, a negative volume, a bbox shorter than [x,y,z], or a non-positive layer height.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bbox_mm | Yes | ||
| material | No | PLA | |
| nozzle_mm | No | ||
| volume_mm3 | Yes | ||
| density_g_cc | No | ||
| wall_fraction | No | ||
| filament_dia_mm | No | ||
| infill_fraction | No | ||
| layer_height_mm | No | ||
| print_speed_mm_s | No |