Optimize multi-colour waste
optimize_multicolorMeasures filament waste from colour changes in multi-colour prints, tests settings that may reduce it, and recommends a change only when all colours survive and filament is saved.
Instructions
Measure how much filament a multi-colour print wastes on colour changes and try settings that might reduce it.
Recommends a setting only if every colour survives and it saves filament; otherwise says the default is best and gives layout tips such as fewer colour changes per layer. Slices several times, so it takes a while, and writes each test's G-code to output_dir. For single-colour prints use slice_model or compare_slices.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"models": "<models>",
"filaments": "<filaments>",
"object_filaments": "<object_filaments>"
},
"name": "optimize_multicolor"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| models | Yes | Model paths, one per colour part, in the same order as object_filaments. | |
| printer | No | Printer preset name or a unique part of it, e.g. 'Kobra X'. Omit to use the printer selected in the slicer window. | |
| process | No | Process preset (layer height, speeds), e.g. '0.20mm Standard'. Omit to use the slicer window's selection. | |
| filaments | Yes | Filament preset for each slot, e.g. two entries for a two-colour print. | |
| output_dir | No | Folder for the output files. Default: next to the first model. | |
| output_name | No | Base name for the output files. | |
| filament_colours | No | '#RRGGBB' for each slot; colour order affects how much is flushed. | |
| object_filaments | Yes | Filament slot (1-based) for each model, e.g. [1, 2]. |