# bambulab/bambustudio architecture

> Architecture diagram of the GitHub repository bambulab/bambustudio, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/bambulab/bambustudio
- Repository: https://github.com/bambulab/bambustudio

## Overview

Bambu Studio is a desktop 3D-printing slicer. Its main user workflow is to prepare models on managed plates, configure geometry and print settings, slice them into G-code, then inspect or send the result for printing. The README also describes remote monitoring and control; the tree includes device-management and filament-manager code supporting that product area. Core slicing and GUI wiring were not sampled, so those paths use existing enclosing directories and the graph shows only the documented workflow at a subsystem level.

Main entry points: [`src/slic3r/GUI/DeviceManager.cpp`](https://github.com/bambulab/bambustudio/blob/master/src/slic3r/GUI/DeviceManager.cpp) (Device manager), [`src/slic3r`](https://github.com/bambulab/bambustudio/tree/master/src/slic3r) (Slicing algorithms), [`src/slic3r/GUI`](https://github.com/bambulab/bambustudio/tree/master/src/slic3r/GUI) (Project workflow), [`src/slic3r/GUI/Gizmos/GLGizmosManager.cpp`](https://github.com/bambulab/bambustudio/blob/master/src/slic3r/GUI/Gizmos/GLGizmosManager.cpp) (Painting and supports)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_prep["Project preparation"]
  node_plates["Plate management"]
  node_models["Model geometry"]
  node_arrange["Arrange and orient"]
end

subgraph group_slice["Slicing and output"]
  node_slicer["Slicing algorithms"]
  node_optimization["Print optimization"]
  node_gcode["G-code output"]
end

subgraph group_device["Printer operations"]
  node_device["Device manager<br/>[DeviceManager.cpp]"]
  node_device_state["Printer state<br/>[DevStorage.cpp]"]
  node_filament["Filament manager"]
end

subgraph group_interface["User interface"]
  node_project["Project workflow"]
  node_gizmos["Painting and supports"]
  node_settings["Print parameters"]
  node_viewer["G-code viewer"]
end

node_user(("Printer user"))
node_printer(("Bambu printer"))

node_user -->|"creates project"| node_project
node_project -->|"manages plates"| node_plates
node_plates -->|"holds models"| node_models
node_user -->|"arranges models"| node_arrange
node_user -->|"edits geometry"| node_gizmos
node_user -->|"sets parameters"| node_settings
node_plates -->|"slices plate"| node_slicer
node_models -->|"provides geometry"| node_slicer
node_gizmos -->|"provides modifications"| node_slicer
node_settings -->|"configures slicing"| node_slicer
node_slicer -->|"applies logic"| node_optimization
node_optimization -->|"produces G-code"| node_gcode
node_gcode -->|"loads output"| node_viewer
node_user -->|"controls printer"| node_device
node_device -.->|"sends commands"| node_printer
node_printer -.->|"pushes status"| node_device
node_device -->|"parses device data"| node_device_state
node_device -->|"bridges filament requests"| node_filament
node_gcode -.->|"transfers print job"| node_device

click node_project "https://github.com/bambulab/bambustudio/tree/master/src/slic3r/GUI"
click node_plates "https://github.com/bambulab/bambustudio/tree/master/src/slic3r"
click node_models "https://github.com/bambulab/bambustudio/tree/master/src/slic3r"
click node_arrange "https://github.com/bambulab/bambustudio/tree/master/src/slic3r"
click node_gizmos "https://github.com/bambulab/bambustudio/blob/master/src/slic3r/GUI/Gizmos/GLGizmosManager.cpp"
click node_settings "https://github.com/bambulab/bambustudio/tree/master/src/slic3r/GUI"
click node_slicer "https://github.com/bambulab/bambustudio/tree/master/src/slic3r"
click node_optimization "https://github.com/bambulab/bambustudio/tree/master/src/slic3r"
click node_gcode "https://github.com/bambulab/bambustudio/tree/master/src/slic3r"
click node_viewer "https://github.com/bambulab/bambustudio/tree/master/src/slic3r/GUI"
click node_device "https://github.com/bambulab/bambustudio/blob/master/src/slic3r/GUI/DeviceManager.cpp"
click node_device_state "https://github.com/bambulab/bambustudio/blob/master/src/slic3r/GUI/DeviceCore/DevStorage.cpp"
click node_filament "https://github.com/bambulab/bambustudio/blob/master/src/slic3r/GUI/DeviceWeb/device_page/src/features/filament-manager/useFilamentManagerBridge.ts"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_plates,node_models,node_arrange,node_user toneBlue
class node_slicer,node_optimization,node_gcode toneAmber
class node_device,node_device_state,node_filament toneMint
class node_project,node_gizmos,node_settings,node_viewer toneRose
class node_printer toneIndigo
```

## Components

### Project preparation

- [Plate management](https://github.com/bambulab/bambustudio/tree/master/src/slic3r): `src/slic3r`
- [Model geometry](https://github.com/bambulab/bambustudio/tree/master/src/slic3r): `src/slic3r`
- [Arrange and orient](https://github.com/bambulab/bambustudio/tree/master/src/slic3r): `src/slic3r`

### Slicing and output

- [Slicing algorithms](https://github.com/bambulab/bambustudio/tree/master/src/slic3r): `src/slic3r`
- [Print optimization](https://github.com/bambulab/bambustudio/tree/master/src/slic3r): `src/slic3r`
- [G-code output](https://github.com/bambulab/bambustudio/tree/master/src/slic3r): `src/slic3r`

### Printer operations

- [Device manager](https://github.com/bambulab/bambustudio/blob/master/src/slic3r/GUI/DeviceManager.cpp): `src/slic3r/GUI/DeviceManager.cpp`
- [Printer state](https://github.com/bambulab/bambustudio/blob/master/src/slic3r/GUI/DeviceCore/DevStorage.cpp): `src/slic3r/GUI/DeviceCore/DevStorage.cpp`
- [Filament manager](https://github.com/bambulab/bambustudio/blob/master/src/slic3r/GUI/DeviceWeb/device_page/src/features/filament-manager/useFilamentManagerBridge.ts): `src/slic3r/GUI/DeviceWeb/device_page/src/features/filament-manager/useFilamentManagerBridge.ts`

### User interface

- [Project workflow](https://github.com/bambulab/bambustudio/tree/master/src/slic3r/GUI): `src/slic3r/GUI`
- [Painting and supports](https://github.com/bambulab/bambustudio/blob/master/src/slic3r/GUI/Gizmos/GLGizmosManager.cpp): `src/slic3r/GUI/Gizmos/GLGizmosManager.cpp`
- [Print parameters](https://github.com/bambulab/bambustudio/tree/master/src/slic3r/GUI): `src/slic3r/GUI`
- [G-code viewer](https://github.com/bambulab/bambustudio/tree/master/src/slic3r/GUI): `src/slic3r/GUI`

### Other components

- **Printer user**
- **Bambu printer**

## Connections

- Printer user → Project workflow: creates project
- Project workflow → Plate management: manages plates
- Plate management → Model geometry: holds models
- Printer user → Arrange and orient: arranges models
- Printer user → Painting and supports: edits geometry
- Printer user → Print parameters: sets parameters
- Plate management → Slicing algorithms: slices plate
- Model geometry → Slicing algorithms: provides geometry
- Painting and supports → Slicing algorithms: provides modifications
- Print parameters → Slicing algorithms: configures slicing
- Slicing algorithms → Print optimization: applies logic
- Print optimization → G-code output: produces G-code
- G-code output → G-code viewer: loads output
- Printer user → Device manager: controls printer
- Device manager → Bambu printer: sends commands
- Bambu printer → Device manager: pushes status
- Device manager → Printer state: parses device data
- Device manager → Filament manager: bridges filament requests
- G-code output → Device manager: transfers print job
