//nbkelley /homelab

Bambu Studio Layer G-code

Bambu Studio Layer G-code#

What Was Established#

Methods for applying custom G-code to specific layers in Bambu Studio, including Height Range Modifiers and the Layer Range G-code interface. Specific commands for Bambu Lab printers to control infill angles, wall order, and layer pauses.

Key Decisions#

  • Layer Range G-code Interface: Preferred for direct layer-specific application without Height Range Modifiers.
  • Layer Numbering: The Layer Range G-code UI uses 1-indexed layer numbers. Conditional logic ({if layer_num == X}) uses 0-indexed numbers.
  • Bambu Proprietary G-code: Commands like M9000 (infill angle) and M9001 (wall order) are specific to Bambu Lab firmware.

Current Configuration#

Layer Range G-code Setup#

  1. Slice the model.
  2. Navigate to the G-code tab.
  3. Scroll to Layer Range G-code in the left panel.
  4. Click + Add.
  5. Enter From and To layer numbers.
  6. Enter G-code in the field.

Examples#

  • Layer 27 Direction Change: