build_material_overrides
Generate a JSON override dictionary with correct temperatures, speeds, and retraction settings for switching materials on your printer. Combine material database data with printer-specific tuning for ready-to-use reslicing overrides.
Instructions
Auto-generate slicer override dict for a specific material.
Combines material thermal data (from the material database) with
printer-specific tuning (from printer intelligence) to produce a
ready-to-use JSON override dict for ``reslice_with_overrides`` or
``run_reslice_and_print``.
This is the key tool for material switching — call it to get the
correct temperatures, speeds, and retraction settings when changing
from one material to another.
Example workflow::
# 1. Get overrides for PETG on your printer
overrides = build_material_overrides("petg", "bambu_a1")
# 2. Reslice and print with those overrides
run_reslice_and_print(model_path, overrides=json.dumps(overrides["overrides"]))
Args:
material_id: Target material (e.g. ``"petg"``, ``"tpu"``).
printer_id: Optional printer model for printer-specific tuning.
If omitted, uses material database defaults.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| printer_id | No | ||
| material_id | Yes |