//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:

Bambu Studio Print Order & Travel Optimization

Bambu Studio Print Order & Travel Optimization#

What Was Established#

Methods for controlling print sequence and travel paths in Bambu Studio, specifically addressing chaotic jumping when printing multiple identical objects (e.g., 64 clones) in layer-by-layer mode.

Key Decisions#

  • Print Sequence: Change from “By layer” to “By object” or “Sequential” to complete one item before moving to the next.
  • Travel Optimization: Adjusting “Order of walls”, “Avoid crossing walls”, and “Reduce infill retraction” can impact travel patterns.
  • Orca Slicer: Recommended for better manual control over print sequence within layers.
  • Post-Processing: G-code editors can manually reorder layer segments if slicer settings are insufficient.

Current Configuration#

  • Bambu Studio: Default slicer for Bambu Lab printers.
  • Orca Slicer: Alternative slicer (Bambu Studio fork) with “Sequential Printing” feature.
  • G-code Editors: gcode.ws, Pronterface, or custom Python scripts for manual reordering.

Historical Notes#

  • User reported chaotic jumping when printing 64 clones of the same STL in layer-by-layer mode.
  • Solutions explored included changing infill/wall order, travel optimization settings, and manual reordering.
  • Orca Slicer identified as the most reliable solution for true manual ordering within layers.

Open Questions#

  • Does “One at a time” printing significantly increase total print time for 64 clones?
  • Are there Bambu Studio plugins for sequential layer printing?

Sources#

  • ingested/chats/164-Fixing Bambu Studio Print Order Issues.md
  • Conversation: Fixing Bambu Studio Print Order Issues (2026-02-02)