BambuPrinter

Package: Libraries.Fabrication.Printers · Inherits from: Libraries.Fabrication.Printers.Printer, Libraries.Language.Object, Libraries.Fabrication.Printers.DirectDrivePrinter, Libraries.Fabrication.Profiles.Profile

The BambuPrinter class is a Bambu Lab printer. Bambu printers start with their own G-code (for their bed leveling, nozzle cleaning and calibration), and print from a .gcode.3mf file that also holds Bambu Studio's settings. Quorum doesn't include these, so before printing, give the printer three files with SetBambuFiles: the start G-code, the end G-code, and a settings template (a .gcode.3mf exported by Bambu Studio for this printer, or its project_settings file). Its bed is 256 by 256 millimeters until SetBed changes it.

Example Code

use Libraries.System.File
use Libraries.Fabrication.Printers.BambuPrinter

File start
start:SetPath("Bambu/start.gcode")
File finish
finish:SetPath("Bambu/end.gcode")
File settings
settings:SetPath("Bambu/plate.gcode.3mf")
BambuPrinter printer
printer:SetBambuFiles(start, finish, settings)
output printer:Describe()

Actions

GetBambuSettingsFile()

This action returns the settings template given with SetBambuFiles, or undefined before it is given.

Returns

Libraries.System.File: The settings template, or undefined.

Example

use Libraries.System.File
use Libraries.Fabrication.Printers.BambuA1

BambuA1 printer
printer:SetBambuFiles("Bambu/start.gcode", "Bambu/end.gcode", "Bambu/plate.gcode.3mf")
File template = printer:GetBambuSettingsFile()

GetEndGcode()

This action returns Bambu's end G-code, read from the file given with SetBambuFiles.

Returns

text: The end G-code.

Example

use Libraries.Fabrication.Printers.BambuA1

BambuA1 printer
printer:SetBambuFiles("Bambu/start.gcode", "Bambu/end.gcode", "Bambu/plate.gcode.3mf")
text code = printer:GetEndGcode()

GetStartGcode()

This action returns Bambu's start G-code, read from the file given with SetBambuFiles. It stops with a message if SetBambuFiles wasn't called first: the generic start G-code would be wrong on a Bambu printer.

Returns

text: The start G-code.

Example

use Libraries.Fabrication.Printers.BambuA1

BambuA1 printer
printer:SetBambuFiles("Bambu/start.gcode", "Bambu/end.gcode", "Bambu/plate.gcode.3mf")
text code = printer:GetStartGcode()

HasBambuFiles()

This action returns true once SetBambuFiles has given the printer all three of Bambu's files.

Returns

boolean: True if the printer has Bambu's files.

Example

use Libraries.Fabrication.Printers.BambuP1S

BambuP1S printer
if not printer:HasBambuFiles()
    output "Export Bambu's files from Bambu Studio first."
end

SetBambuFiles(Libraries.System.File startGcode, Libraries.System.File endGcode, Libraries.System.File settingsTemplate)

This action gives the printer Bambu's own files, exported from Bambu Studio for this printer: the start G-code, the end G-code, and a settings template (a .gcode.3mf or a project_settings file).

Parameters

Example

use Libraries.System.File
use Libraries.Fabrication.Printers.BambuA1

File start
start:SetPath("Bambu/start.gcode")
File finish
finish:SetPath("Bambu/end.gcode")
File settings
settings:SetPath("Bambu/plate.gcode.3mf")
BambuA1 printer
printer:SetBambuFiles(start, finish, settings)

SetBambuFiles(text startGcode, text endGcode, text settingsTemplate)

This action gives the printer Bambu's own files, as paths relative to the folder the program runs in (see SetBambuFiles(File, File, File)).

Parameters

  • startGcode text: The start G-code file's path.
  • endGcode text: The end G-code file's path.
  • settingsTemplate text: The settings template's path.

Example

use Libraries.Fabrication.Printers.BambuA1

BambuA1 printer
printer:SetBambuFiles("Bambu/start.gcode", "Bambu/end.gcode", "Bambu/plate.gcode.3mf")

Inherited Actions

5 actions from Libraries.Fabrication.Printers.Printer
22 actions from Libraries.Fabrication.Profiles.Profile
3 actions from Libraries.Language.Object