estimate_cost
Analyze a G-code file to estimate filament usage, material weight, electricity cost, and total print cost. Specify material, electricity rate, and printer wattage.
Instructions
Estimate the cost of a print job from a G-code file (already-sliced only).
For STL/OBJ files, use ``slice_and_estimate`` instead — it slices
and estimates in one step.
Analyses G-code extrusion commands to calculate filament usage,
material weight, filament cost, electricity cost, and total.
Args:
file_path: Path to the G-code file.
material: Filament material (PLA, PETG, ABS, TPU, ASA, NYLON, PC).
electricity_rate: Cost per kWh in USD (default 0.12).
printer_wattage: Printer power consumption in watts (default 200).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| material | No | PLA | |
| file_path | Yes | ||
| printer_wattage | No | ||
| electricity_rate | No |