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
startGcodeLibraries.System.File: The start G-code file.endGcodeLibraries.System.File: The end G-code file.settingsTemplateLibraries.System.File: The settings template.
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
startGcodetext: The start G-code file's path.endGcodetext: The end G-code file's path.settingsTemplatetext: 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
- Clear(text key)
- Describe()
- GetBoolean(text key)
- GetInherits()
- GetInteger(text key)
- GetName()
- GetNumber(text key)
- GetOwnKeys()
- GetParent()
- GetSchema()
- GetSource(text key)
- GetText(text key)
- Set(text key, text value)
- SetBoolean(text key, boolean value)
- SetInherits(text parentName)
- SetInteger(text key, integer value)
- SetName(text value)
- SetNumber(text key, number value)
- SetParent(Libraries.Fabrication.Profiles.Profile value)
- SetsOwn(text key)
- TrySet(text key, text value)
- Validate()