Bambu Studio (unofficial)

v0.3.0
io.github.danielefinocchiaro/unofficial-bambu-mcp Checked 3 days ago Published 1 month ago

Build, edit, slice, check and calibrate Bambu Studio projects; read a Bambu Lab printer's status.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

bambu_status

Where Bambu Studio is installed, its version, whether it is running, and the current project.

list_printers

Printer short names that can be used anywhere a printer is asked (a full machine preset name works too).

search_presets

Find presets. kind: filament | process | machine. query: words to match (e.g. 'eSUN PLA+', '0.16mm'). With printer, only presets compatible with it. User presets come first.

ParameterTypeDescription
kind *string
limitinteger
printerstring
querystring

filament_colors

Official colors (name, hex) of a Bambu filament line, e.g. 'Bambu PLA Basic @BBL X1C'.

ParameterTypeDescription
preset *string

new_project

Start an empty project. filaments: AMS slots in order, e.g. [{"preset": "Bambu PLA Basic", "color": "#000000"}, {"preset": "eSUN PLA+", "color": "#FFFFFF"}]. A filament name without '@...' is matched to the printer automatically. The build plate type is the one picked in Bambu Studio for this printer (change it with set_setting('curr_bed_type', ...)).

ParameterTypeDescription
name *string
filaments
printerstring
processstring

open_project

Open a .3mf saved by Bambu Studio (or downloaded from MakerWorld). The file is never modified: save_project writes a new file. Returns the project summary and what could not be carried over.

ParameterTypeDescription
path *string

get_project

Current project: printer, process, filament slots, plates, objects (id, name, center, size, filaments), setting overrides and warnings. If the project was saved in Bambu Studio in the meantime it is re-read first.

set_printer

Switch printer (e.g. P1S -> A1M). Filament presets are swapped for the same filaments on the new printer. With rearrange, objects are re-placed to fit the new bed (extra plates are added if needed).

ParameterTypeDescription
printer *string
processstring
rearrangeboolean

set_filament

Change one filament slot (1-based); a new slot number = add a slot. Leave a field empty to keep it.

ParameterTypeDescription
slot *integer
colorstring
presetstring

add_plate

Add an empty plate at the end.

ParameterTypeDescription
namestring

rename_plate

Give a plate a name (shown in Bambu Studio).

ParameterTypeDescription
name *string
plate *integer

set_plate_settings

Settings of one plate, like Bambu Studio's plate settings; they win over the project's on that plate. bed_type: Cool Plate, Engineering Plate, High Temp Plate, Textured PEI Plate or Supertack Plate. print_sequence: 'by layer', or 'by object' (each object printed to the end before the next). first_layer_filaments: order of the filament slots on the first layer, e.g. [2, 1]. spiral_vase: 'on' or 'off'. prime_tower: [x, y] in mm, where its corner goes (e.g. between objects). 'global' (or [] for the lists) goes back to the project's choice; empty leaves it as it is.

ParameterTypeDescription
plate *integer
bed_typestring
first_layer_filaments
prime_tower
print_sequencestring
spiral_vasestring

remove_plate

Delete a plate. Its objects are moved to plate `move_objects_to` (0 = delete them too).

ParameterTypeDescription
plate *integer
move_objects_tointeger

import_model

Put an STL, OBJ or 3MF on a plate. Without x/y it goes to the free spot closest to the center. From a 3MF every object is imported (with its parts and filament assignments).

ParameterTypeDescription
path *string
filamentinteger
namestring
plateinteger
rotate_znumber
scalenumber
x
y

add_relief

Text or an SVG logo on a face of an object, raised or engraved, like Bambu Studio's Text and SVG tools. It wraps around curved faces: on a cup it keeps its size along the surface and stands out square to it. face: top, bottom, front, back, left, right (the side it is read from); at: [x, y, z] plate point to center it on (default: the middle of that face); size: capital letter height for text, longest side for an SVG (mm); depth: how far it stands out or goes in; rotate: degrees within the face. Raised, it is a new part (filament=N prints it in another color); engraved, a ne…

ParameterTypeDescription
object *string
at
depthnumber
engraveboolean
facestring
filamentinteger
fontstring
rotatenumber
sizenumber
svgstring
textstring

add_shape

Create a simple solid: box (width, depth, height), cylinder (diameter, height), cone (diameter, diameter_top, height), sphere (diameter), text (text, text_height = capital letters in mm, height = depth of the letters; base > 0 puts the text on a plate that thick, as a separate part 'Base' with filament base_filament (0 = same as the text), e.g. white letters on a black tag; font = path to a .ttf/.otf), svg (svg = path of an .svg file, a logo raised `height` mm; size = its longest side in mm, 0 = the file's own size; base works as for text). To put text or a logo on an exist…

ParameterTypeDescription
shape *string
basenumber
base_filamentinteger
depthnumber
diameternumber
diameter_topnumber
filamentinteger
fontstring
heightnumber
namestring
plateinteger
sizenumber
svgstring
textstring
text_heightnumber
widthnumber
x
y

move_object

Move an object (by name or id): absolute x/y, relative dx/dy, rotate around Z by rotate_z degrees, or move it to another plate (it keeps x/y if given, otherwise it goes to a free spot).

ParameterTypeDescription
object *string
dxnumber
dynumber
plateinteger
rotate_znumber
x
y

transform_object

Scale (uniform or per axis) and rotate an object around its center. It stays on the bed.

ParameterTypeDescription
object *string
rotate_xnumber
rotate_ynumber
rotate_znumber
scalenumber
scale_xyz

duplicate_object

Copy an object `copies` times onto free spots (same plate unless `plate` is given).

ParameterTypeDescription
object *string
copiesinteger
plateinteger

fill_plate

Fill the free area of an object's plate with copies of it, like Bambu Studio's Fill bed with copies. copies: 0 = as many as fit, N = at most N. Shapes nest by their real outline (brim and brim ears counted), and rotate=True also tries turning them by rotation_step degrees. The original is placed again together with the copies (more fit), unless keep_original=True; the other objects on the plate stay where they are.

ParameterTypeDescription
object *string
copiesinteger
gapnumber
keep_originalboolean
rotateboolean
rotation_stepnumber

convert_units

An object modeled in other units, like Bambu Studio's Convert from inch / meter: unit 'inch', 'cm' or 'meter' scales it up from that unit to millimeters (a 1-unit cube becomes 25.4, 10 or 1000 mm); restore=True scales it back down. import_model says when a model looks like it is in inches or meters.

ParameterTypeDescription
object *string
restoreboolean
unitstring

set_object_printable

Keep an object on the plate but leave it out of the print (printable=False), like unticking Printable in Bambu Studio; True puts it back. The other objects slice and print as usual.

ParameterTypeDescription
object *string
printableboolean

copy_object_settings

Copy one object's own settings (set_object_setting: infill, walls, brim...) to other objects, like Bambu Studio's Copy / Paste process settings. keys: only these; replace=True first removes the targets' own settings; height_ranges=True copies the height bands too.

ParameterTypeDescription
from_object *string
to_objects *array
height_rangesboolean
keys
replaceboolean

align_objects

Line up objects of one plate, like Bambu Studio's Align / Distribute, by their outer boxes. align: left, right, center_x (along X); front, back, center_y (along Y). distribute: 'x' or 'y' spaces them evenly between the two outermost ones. Both can be given.

ParameterTypeDescription
objects *array
alignstring
distributestring

export_stl

Save objects as STL files (e.g. to print them on other printers of a farm, or to share them): the named objects, all of a plate, or all of the project. One file per object, or one_file=True for all of them where they are on the plate. Negative parts (holes) are cut out; colors and settings are not part of an STL.

ParameterTypeDescription
objects
one_fileboolean
plateinteger

replace_with_stl

Swap the shape of an object (or of its part `part`) for the one in an STL/OBJ/3MF file, like Bambu Studio's Replace with STL, e.g. after fixing it in CAD. Name, filament, settings, place on the plate and the other parts stay; the new shape takes the old one's center, standing on the same bottom. Painting on the old shape is dropped (it was for other triangles).

ParameterTypeDescription
object *string
path *string
partstring

delete_object

Remove an object from the project.

ParameterTypeDescription
object *string

set_object_filament

Assign a filament slot to a whole object, or to one of its parts (by part name).

ParameterTypeDescription
filament *integer
object *string
partstring

set_object_setting

Per-object print setting (e.g. sparse_infill_density '40%', wall_loops '4', layer_height '0.12'). An empty value removes the override.

ParameterTypeDescription
key *string
object *string
value *string

check_object

Is the mesh a closed, printable solid? Size, volume, number of separate pieces.

ParameterTypeDescription
object *string

measure_object

Measure an object (or its part `part`), in plate mm: size and where it is, each part's size, volume and surface, the area standing on the bed, the smallest gaps between its separate pieces or parts (the clearance of print-in-place joints, with where), and walls thinner than the nozzle's line width (or min_wall mm), with where and at which heights. z >= 0: also the cross-section at that height above the bed, every island with its length, width and thickest point and its holes (how long and thick a bar is, how wide a hole is).

ParameterTypeDescription
object *string
min_wallnumber
partstring
znumber

measure_between

Distance between two objects or two parts (part_a / part_b; the same object twice with two parts measures the clearance between them), in plate mm: the smallest gap with about where it is, the distance between their centers, the gap along each axis between their outer boxes (negative = they overlap along it) and, if they overlap, the volume they share.

ParameterTypeDescription
object_a *string
object_b *string
part_astring
part_bstring

arrange

Arrange objects by their real outline seen from above, brim and brim ears included, so shapes can nest (like Bambu Studio's Arrange, which only uses convex hulls). gap: mm between those outlines (and from the plate's edge half of it). Which objects: plate N, the named `objects` (ids or names), or all (plate=0). plates: 0 = each object stays on its plate; N = spread them over plates 1..N, evenly; -1 = as few plates as possible. rotate: allow turning them by multiples of rotation_step degrees (e.g. 60 for snowflakes); multi_material false = one material (set of filaments) per…

ParameterTypeDescription
align_to_yboolean
avoid_calibration_areaboolean
gapnumber
multi_materialboolean
objects
plateinteger
platesinteger
rotateboolean
rotation_stepnumber

get_setting

Current value of a print/filament/printer setting, where it comes from, and the preset value.

ParameterTypeDescription
key *string

set_setting

Override a project setting. For filament settings (temperatures, plate temperatures...) slot = filament slot (0 = all slots). Values are Bambu Studio strings, e.g. '0.16', '15%', '65'. Useful keys: layer_height, wall_loops, sparse_infill_density, top_shell_layers, enable_support, brim_type, initial_layer_speed, ironing_type, textured_plate_temp(_initial_layer) for Textured PEI, hot_plate_temp(_initial_layer) for the smooth/High Temp plate, nozzle_temperature(_initial_layer), close_fan_the_first_x_layers, print_sequence ('by object'), curr_bed_type ('Textured PEI Plate').

ParameterTypeDescription
key *string
value *string
slotinteger

reset_setting

Drop an override: the setting goes back to the preset value.

ParameterTypeDescription
key *string

get_purge_volumes

Purge (flush) volumes between filament slots, in mm³, and the multiplier: the filament wasted at each change on the prime tower (or into infill/objects, see set_purge_volumes).

set_purge_volumes

Change the purge (flush) volumes, as in Bambu Studio's Purging volumes dialog. volumes: [{"from": 1, "to": 2, "volume": 350}, ...] mm³ for single changes; matrix: every value at once, rows = from, columns = to (the diagonal is ignored); multiplier: scales all of them (0..3, 1 = as written); reset: back to the values estimated from the colors and multiplier 1. A value set by hand stays while both slots keep their color. Values are 0..900 mm³. Less purge saves filament but the new color can come out mixed at first; to waste less without that, purge into the infill or into a…

ParameterTypeDescription
matrix
multipliernumber
resetboolean
volumes

save_project

Write the project as a Bambu Studio .3mf (default folder: the output dir, name from the project). Never overwrites: if the file exists a -2, -3... suffix is added. Optionally open it in Bambu Studio.

ParameterTypeDescription
open_in_bambuboolean
pathstring

open_in_bambu_studio

Open a .3mf in the Bambu Studio window: by default the last saved project (else the last sliced one). Bambu Studio re-slices a project when asked (Slice plate), it does not reuse the slicing done here; to open a plate sliced and ready to print, use send_to_printer(via='bambu_studio').

ParameterTypeDescription
pathstring

slice_project

Slice with Bambu Studio (plate 0 = all). Returns per plate: minutes, grams (total and per filament slot), cost (from the presets' price per kg), filament changes, layers and warnings. The sliced project is saved next to the project file.

ParameterTypeDescription
plateinteger

preview_plate

Image of a plate with its objects in their filament colors (painted colors too). view: iso | top. zoom: frame the objects instead of the whole bed, to see details. labels: write each object's id and name on it, e.g. view='top', labels=True to tell which part is which (a part that came off the plate, the list in Bambu Handy's skip objects).

ParameterTypeDescription
labelsboolean
plateinteger
viewstring
zoomboolean

check_print_risks

Before a long print: parts likely to come off or topple, and settings that do not fit. Per plate (0 = all): tall and narrow parts (height against the smaller side of the footprint), parts standing on a narrow or tiny footing without a brim (e.g. pins lying on their side), filaments whose temperature for this build plate is 0 (not meant for it), and plates where tall parts share a long print with many others (a part that fails late can knock the others: print them apart).

ParameterTypeDescription
plateinteger

reprint_objects

A new project with only some objects of the open one, e.g. a part that came off the plate and was skipped: same printer, process, filaments and settings, laid out again (more plates if needed); brim=True gives each an outer brim. Saved as a new file (never overwrites) and sliced; the open project is not changed: open_project(file) then send_to_printer to print it. objects: names or ids (see get_project).

ParameterTypeDescription
objects *array
brimboolean
namestring
sliceboolean

preview_layer

Image of one sliced layer seen from the top (needs slice_project first). Choose by layer number (1 = first) or by height z in mm. Extrusions are drawn in the filament colors. zoom: frame the extrusions (default), or False for the whole bed.

ParameterTypeDescription
layerinteger
plateinteger
znumber
zoomboolean

make_first_layer_test

Add a plate with the first `height` mm of the objects of a plate (or of the listed objects): a short print to check bed adhesion and the first layers before a long print. Slice it with slice_project(plate=<new plate>).

ParameterTypeDescription
heightnumber
objects
plateinteger

send_to_printer

Make the print file of one plate (.gcode.3mf) and send it. via = auto (Bambu Connect if installed, otherwise Bambu Studio) | bambu_connect | bambu_studio: open it in an official Bambu app, where the user checks printer and AMS mapping and presses Print/Send. via = file: only make the file. via = lan: copy it to the printer on the local network and START PRINTING, for printers in LAN-only mode with Developer Mode (print farms; in cloud mode the printer refuses and the answer says so). Two steps: without confirm nothing is sent, the answer gives the AMS slots it wou…

ParameterTypeDescription
ams_slots
bed_levelingboolean
confirmstring
plateinteger
timelapseboolean
viastring

skip_objects

Stop printing some objects of the print running now, e.g. a part that came off the plate. It CANNOT be undone. ids: the objects' ids as the printer knows them (identify_id; Bambu Handy's skip list, or printer_status 'skipped_objects'). Do not list every object: to stop the whole print, cancel it on the printer. First call without confirm: nothing is sent, the answer says what would be skipped and the confirm code; tell the user, and only after they agree call again with confirm=<code>. Bambu firmware accepts it only in LAN-only mode with Developer Mode; otherwise use Bambu…

ParameterTypeDescription
ids *array
confirmstring

ams_load

Load the filament of an AMS slot into the nozzle, like Load in Bambu Studio's Device tab: the nozzle heats, the filament loaded now (if any) goes back to its slot, the new one comes in and is purged. slot: as in printer_status (AMS 1 = slots 1-4, AMS 2 = 5-8). Only when the printer is not printing. First call without confirm: nothing is sent, the answer says what would happen and the confirm code; tell the user, and only after they agree call again with confirm=<code>. Bambu firmware accepts it only in LAN-only mode with Developer Mode; otherwise use the printer screen, Bam…

ParameterTypeDescription
slot *integer
confirmstring

ams_unload

Unload the filament in the nozzle back to its AMS slot, like Unload in Bambu Studio's Device tab (the nozzle heats). Only when the printer is not printing. First call without confirm: nothing is sent, the answer gives the confirm code; call again with confirm=<code> only after the user agrees. Bambu firmware accepts it only in LAN-only mode with Developer Mode; otherwise use the printer screen, Bambu Handy or Bambu Studio.

ParameterTypeDescription
confirmstring

printer_status

Read-only status of the printer on the local network: state, job, progress, remaining time, layer (or the last job's result when idle), temperatures, AMS trays (type, color, remaining %; 'unknown' = a spool the AMS has not been told about), AMS humidity and temperature, active slot, errors, objects skipped during the print, and warnings (the spool being fed is unknown or not the project's filament, sport speed on a long print, a report that looks old). read_at = when the printer sent it; age_s = seconds since, when a reading of a few seconds ago is given again (the printer…

printer_camera

A picture from the printer's camera right now (P1 and A1 series), to see the plate: how a print is going, whether something came off or made spaghetti, what is left on the bed. Read-only; works with the printer in cloud mode. With the chamber light off the picture is dark. max_size: longest side in pixels.

ParameterTypeDescription
max_sizeinteger

printer_files

Files on the printer's SD card, newest first, with name, size and date and the total per folder: timelapse (videos of past prints), prints (files of past prints the printer keeps), thumbnails (timelapse thumbnails whose video was deleted). Read-only; works with the printer in cloud mode.

ParameterTypeDescription
kindstring
limitinteger

download_printer_file

Copy a file from the printer's SD card into the projects folder: a timelapse video (name from printer_files, or 'latest') or the file of a past print (kind='prints'). For a timelapse its last frame is shown too: the finished print. Read-only on the printer.

ParameterTypeDescription
kindstring
namestring

delete_printer_files

Free space on the printer's SD card: delete timelapse videos (with their thumbnails), files of past prints (kind='prints') or thumbnails whose video is gone (kind='thumbnails'). Pick them by names (from printer_files) or all those older than older_than_days. Two steps: without confirm nothing is deleted, the answer lists what would go, the space freed and a code; show the list to the user and only if they agree call again with confirm=<code>. Deleted files cannot be recovered. Nothing is deleted while a print is running.

ParameterTypeDescription
kind *string
confirmstring
names
older_than_daysinteger

use_ams_filaments

Set the project's filament slots from what is loaded in the AMS right now (preset and color), like Bambu Studio's 'sync AMS'. Default: every loaded tray in order (project slot 1 = first loaded tray). ams_slots: pick trays explicitly, e.g. [1, 3] -> project slot 1 = AMS slot 1, project slot 2 = AMS slot 3.

ParameterTypeDescription
ams_slots

add_layer_action

Do something when the print reaches height z (mm), before that layer is printed: action = pause (e.g. to insert magnets or nuts; message is shown in Bambu Studio), filament_change (switch to filament slot `filament` from that height on, with the AMS), gcode (any G-code line(s), e.g. 'M104 S210'). z is snapped to the nearest real layer at or above it.

ParameterTypeDescription
action *string
plate *integer
z *number
filamentinteger
gcodestring
messagestring

remove_layer_action

Remove a layer action (1-based index as listed by get_project), or all of them with index 0.

ParameterTypeDescription
plate *integer
indexinteger

make_temperature_tower

Add a plate with a temperature tower for a filament slot: one 8 mm block per temperature (hottest at the bottom), each with a bridge and its temperature engraved on the front. Defaults: the filament's temperature +15 down to -25 °C, within its allowed range. Pick the block with the best bridge, surface and least stringing.

ParameterTypeDescription
endnumber
filamentinteger
startnumber
stepnumber

make_flow_test

Add a plate of flow-rate squares for a filament slot, each printed with a different flow modifier (percent) engraved on top. Pass 1: -20..+20 step 5. Pass 2: around the best one, e.g. low=-4 high=4 step=1. Pick the square with the smoothest top surface (no gaps, no ridges).

ParameterTypeDescription
filamentinteger
highnumber
lownumber
stepnumber

make_pa_tower

Add a plate with a pressure advance (flow dynamics) tower: a thin square tube printed fast, the K value grows by `step` every millimeter. Find the height with the sharpest corners and no gaps: K = start + floor(height) * step. When sending it, turn off the printer's automatic flow dynamics calibration.

ParameterTypeDescription
endnumber
filamentinteger
startnumber
stepnumber

make_vfa_test

Add a plate with a VFA test (vertical fine artifacts: fine vertical ripples on walls that some speeds cause): one block per outer wall speed from start to end mm/s, the speed engraved on top. Look at the long faces with light from the side and pick the fastest speed without ripples for outer_wall_speed. Bambu Studio's VFA tower changes the speed inside one object; here each block has its own speed.

ParameterTypeDescription
endnumber
filamentinteger
startnumber
stepnumber

save_filament_preset

Save the filament of a slot, with this project's changes for that slot (temperatures, flow ratio, pressure advance, plate temperatures...), as a Bambu Studio user preset; it appears after Bambu Studio restarts. A new filament (made from a Generic preset, or with another filament_vendor) is saved like Bambu Studio's Create Filament does: its own filament id, so it can be picked for an AMS slot (Device > AMS). Changes to a Bambu filament are saved as a variant of it, so its RFID spools still match it. replace=True updates an existing user preset with that name (e.g. after a c…

ParameterTypeDescription
name *string
slot *integer
replaceboolean

save_process_preset

Save this project's process changes (layer height, walls, infill, speeds, brim, supports, ironing...: the set_setting changes that belong to the process) as a Bambu Studio user process preset, a child of the project's process preset, like Save as in Bambu Studio. replace=True updates your user preset with that name (a backup copy is kept). It appears after Bambu Studio restarts.

ParameterTypeDescription
name *string
replaceboolean

save_printer_preset

Save this project's printer changes (start/end G-code, retraction, printable area...: the set_setting changes that belong to the printer) as a Bambu Studio user printer preset, a child of the project's printer preset. replace=True updates your user preset with that name (a backup copy is kept). It appears after Bambu Studio restarts.

ParameterTypeDescription
name *string
replaceboolean

list_user_presets

Your own Bambu Studio presets (kind: filament | process | printer; empty = all): the preset each one inherits and what it changes, whether it is in your Bambu cloud (then only Bambu Studio can delete or rename it), and which presets inherit it. To find system presets too, use search_presets.

ParameterTypeDescription
kindstring

edit_preset

Change settings of one of your user presets directly, without a project (a backup copy is kept). kind: filament | process | printer. values: {"key": "value"}, e.g. {"pressure_advance": "0.025", "enable_pressure_advance": "1"} or {"nozzle_temperature": "215"}; a list gives one value per extruder variant (Standard / High Flow nozzle); null removes the key, so the value comes from the parent preset again. Bambu system presets are read-only: save a user preset from them first. Bambu Studio sees the change after it restarts, and uploads it to your Bambu cloud if the preset is th…

ParameterTypeDescription
kind *string
name *string
values *object

rename_preset

Rename one of your user presets (a backup copy is kept). A preset in your Bambu cloud cannot be renamed from here, because Bambu Studio would download the old one again: the answer says how to do it in Bambu Studio.

ParameterTypeDescription
kind *string
name *string
new_name *string

delete_preset

Delete one of your user presets (a backup copy is kept, see the answer). A preset in your Bambu cloud cannot be deleted from here, because Bambu Studio would download it again at its next start: only its own Delete removes the cloud copy, and the answer says where it is.

ParameterTypeDescription
kind *string
name *string

sync_with_bambu_studio

Re-read the project file after you changed it by hand in Bambu Studio and saved (same file). This also happens automatically on the next command when there are no unsaved changes here; force=True takes the app's version even if there are (they are lost).

ParameterTypeDescription
forceboolean

mirror_object

Mirror an object across its own center (axis x, y or z).

ParameterTypeDescription
object *string
axisstring

lay_flat

Rotate an object so one of its flat faces lies on the bed: face 1 = the biggest flat face, 2 = the second biggest, and so on.

ParameterTypeDescription
object *string
faceinteger

orient_object

Turn an object the way up it prints best, like Bambu Studio's Auto orientation: least area that needs support (faces leaning more than overhang_angle degrees from vertical, not on the bed), enough area on the bed, low height. Returns the 3 best options with those numbers and the current ones; choice=2 or 3 applies another option, apply=False only compares. Look at preview_plate afterwards.

ParameterTypeDescription
object *string
applyboolean
choiceinteger
overhang_anglenumber

split_object

Split an object into its separate pieces, like Bambu Studio's Split: into='objects' makes one object per piece (each part of a multi-part object becomes an object too), into='parts' keeps one object whose parts are the pieces, so each can get its own filament. Pieces stay where they are; painted colors are kept, modifiers and negative parts go with the piece they overlap.

ParameterTypeDescription
object *string
intostring

merge_objects

Join objects of the same plate into one object with several parts, where they are now, like Bambu Studio's Assemble: they move and print as one (e.g. a model and its base in another color). Each part keeps its filament and painting; the merged object takes the first object's settings (the others' are listed if they differ).

ParameterTypeDescription
objects *array
namestring

boolean_objects

Mesh boolean between two objects where they are on the plate, like Bambu Studio's Mesh boolean. difference: cut tool_object's shape out of object (a hole, a slot, a lettering); intersection: keep only what they share; union: weld tool_object onto object (onto its part `part`, default the biggest). The result keeps object's name, settings and filaments; painted colors stay, new faces take the part's filament. The tool object is removed unless keep_tool=True. Both must be closed solids (check_object).

ParameterTypeDescription
object *string
tool_object *string
keep_toolboolean
operationstring
partstring

cut_object

Cut an object with a plane, optionally with connectors that line the pieces up for gluing (like the connectors of Bambu Studio's Cut tool). keep: both | bottom | top. The plane is horizontal at height z (mm from the object's bottom), or goes through `point` [x, y, z] (plate mm, z above the bed) with `normal` [nx, ny, nz]: [1, 0, 0] cuts vertically across x, [0.5, 0, 1] is tilted. place: auto = the lower piece stays as it is and the upper one lies on its cut face; cut_down = both lie on their cut faces; keep = both as they were. connector: none | plug (a peg on the piece…

ParameterTypeDescription
object *string
clearancenumber
connectorstring
countinteger
depthnumber
keepstring
normal
placestring
point
positions
shapestring
sizenumber
stylestring
znumber

set_part_type

Change what a part of an object is, like Bambu Studio's Change type: 'part' (printed), 'modifier' (its settings apply inside it), 'negative' (cut out, a hole), 'support_blocker' or 'support_enforcer'. An object keeps at least one printed part.

ParameterTypeDescription
object *string
part *string
type *string

add_modifier

Add a part to an object, covering its whole footprint between z_from and z_to (mm from the object's bottom; z_to 0 = top), or only region [x0, y0, x1, y1] (mm from the object's center). kind: modifier (different settings inside, e.g. {"sparse_infill_density": "100%"} for the top 5 mm), negative (removes material), support_blocker, support_enforcer. shape: box, or cylinder (round, as wide as the smaller side of the region: e.g. a hole for a magnet or a screw is kind='negative', shape='cylinder', region=[-4, -4, 4, 4] for 8 mm).

ParameterTypeDescription
object *string
kindstring
region
settings
shapestring
z_fromnumber
z_tonumber

remove_part

Remove a part (e.g. a modifier) from an object, by part name. The last solid part cannot be removed.

ParameterTypeDescription
object *string
part *string

add_brim_ears

Brim ears: small round brims only where a part needs them, instead of a brim all around (Bambu Studio's Painted brim). Meant for print-in-place and articulated models: a full brim fills the joint gaps on the first layer and welds them. Without points, ears go to the tips of the thin parts of the first layer (fingers, toes, any tip thinner than `narrow` mm), each as large as possible up to `radius` without reaching another piece, a gap or hole, or a second thin part (those tips are listed as skipped, with the reason). small > 0 also gives ears to first-layer pieces smaller t…

ParameterTypeDescription
object *string
clearancenumber
keepboolean
narrownumber
points
radiusnumber
smallnumber

remove_brim_ears

Remove an object's brim ears; its brim goes back to the project's brim type.

ParameterTypeDescription
object *string

set_height_range

Settings for a height band of an object, like Bambu Studio's Height range modifier. Heights are mm from the object's bottom. E.g. z_from=0, z_to=5, settings={"sparse_infill_density": "100%"}; {"layer_height": "0.12"} for finer layers there (variable layer height); {"filament": 2} to print that band with another filament slot (a color band). A band with the same z_from and z_to is updated (null removes a key); bands cannot overlap.

ParameterTypeDescription
object *string
settings *object
z_from *number
z_to *number

remove_height_range

Remove the height band of an object that starts at z_from (mm), or all its bands (z_from=-1).

ParameterTypeDescription
object *string
z_fromnumber

paint_object

Paint a region of an object, like Bambu Studio's painting tools. paint: 'color' (with filament=N), 'support' (supports there), 'block_support' (none there), 'seam' (put the seam there), 'block_seam', 'fuzzy_skin'. Region: the height band z_from..z_to (mm from the object's bottom; z_to=0 = to the top) and the faces looking 'top', 'bottom', 'sides', 'front', 'back', 'left', 'right', 'overhangs' (leaning more than `angle` degrees from vertical, for supports) or 'all'. clear=True removes that painting there. Triangles crossing a band's edge are split, so the edge is sharp. part…

ParameterTypeDescription
object *string
paint *string
anglenumber
clearboolean
facingstring
filamentinteger
partstring
z_fromnumber
z_tonumber

make_max_flow_test

Max volumetric speed test for a filament slot, as a separate project file (the open project is not changed): single-wall cylinders, each printed at the wall speed that gives the volumetric speed Q (mm³/s) on its tag. Default range: around the filament's current limit. The highest Q without gaps or weak walls is the max; use a bit less (about 90%) as filament_max_volumetric_speed.

ParameterTypeDescription
filamentinteger
highnumber
lownumber
stepnumber

make_retraction_test

Stringing test for a filament slot: one small separate project per retraction length (Bambu printers cannot change retraction during a print). Print them one after the other and keep the shortest length without strings between the two pillars; then set_setting('filament_retraction_length', value, slot) or save_filament_preset.

ParameterTypeDescription
filamentinteger
lengths