# vlo-labs/3d-slicer architecture

> Architecture diagram of the GitHub repository vlo-labs/3d-slicer, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-11). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/vlo-labs/3d-slicer
- Repository: https://github.com/vlo-labs/3d-slicer

## Overview

Creator Pro Slicer is a web slicer and printer-control UI. A user loads an STL, configures a slice, and receives G-code and X3G; they can then download the X3G or start a USB print. The UI also exposes printer status, temperature, homing, jog, and fan controls. The graph distinguishes the Flask route layer, slicer/conversion stages, and printer protocol/control. Some capabilities are documented but their implementation details were not sampled; those links cite the README rather than implying further source inspection.

Main entry points: [`templates/index.html`](https://github.com/vlo-labs/3d-slicer/blob/main/templates/index.html) (Slicer UI), [`app.py`](https://github.com/vlo-labs/3d-slicer/blob/main/app.py) (Slice configuration), [`printer.py`](https://github.com/vlo-labs/3d-slicer/blob/main/printer.py) (CreatorPro controller), [`output`](https://github.com/vlo-labs/3d-slicer/tree/main/output) (G-code and X3G)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web interface"]
  node_ui["Slicer UI<br/>[index.html]"]
  node_viewer["STL viewer<br/>[index.html]"]
  node_controls_ui["Control panel<br/>[index.html]"]
  node_api["Flask routes<br/>[app.py]"]
end

subgraph group_slicing["Slicing workflow"]
  node_upload["STL upload<br/>[app.py]"]
  node_slice["Slice configuration<br/>[app.py]"]
  node_slic3r["Slic3r"]
  node_postprocess["G-code postprocess<br/>[app.py]"]
  node_gpx_convert["GPX conversion<br/>[app.py]"]
end

subgraph group_control["Printer control"]
  node_print_dispatch["Print dispatch<br/>[app.py]"]
  node_printer_api["Printer routes<br/>[app.py]"]
  node_controller["CreatorPro controller<br/>[printer.py]"]
  node_serial["USB serial"]
end

subgraph group_runtime["Runtime resources"]
  node_stl_store[("STL files")]
  node_machine_profile["Machine profile<br/>[creator_pro.ini]"]
  node_outputs[("G-code and X3G")]
end

node_user(("Operator"))
node_printer{{"Creator Pro"}}
node_gpx["GPX runtime"]

node_user -->|"uses"| node_ui
node_ui -->|"previews STL"| node_viewer
node_ui -->|"sets controls"| node_controls_ui
node_ui -->|"requests routes"| node_api
node_api -->|"handles upload"| node_upload
node_upload -->|"saves STL"| node_stl_store
node_api -->|"handles slice"| node_slice
node_slice -->|"reads STL"| node_stl_store
node_slice -->|"runs slicer"| node_slic3r
node_slice -->|"postprocesses G-code"| node_postprocess
node_slice -->|"converts G-code"| node_gpx_convert
node_gpx_convert -->|"uses profile"| node_machine_profile
node_gpx_convert -->|"writes X3G"| node_outputs
node_postprocess -->|"writes G-code"| node_outputs
node_ui -->|"downloads X3G"| node_outputs
node_ui -->|"starts print"| node_print_dispatch
node_print_dispatch -->|"reads G-code"| node_outputs
node_print_dispatch -->|"dispatches print"| node_gpx
node_gpx -->|"sends print"| node_printer
node_ui -->|"controls printer"| node_printer_api
node_printer_api -->|"calls methods"| node_controller
node_controller -->|"queries device"| node_serial
node_serial -->|"communicates"| node_printer
node_controller -->|"runs movement"| node_gpx
node_printer_api -->|"reads status"| node_controller

click node_ui "https://github.com/vlo-labs/3d-slicer/blob/main/templates/index.html"
click node_viewer "https://github.com/vlo-labs/3d-slicer/blob/main/templates/index.html"
click node_controls_ui "https://github.com/vlo-labs/3d-slicer/blob/main/templates/index.html"
click node_api "https://github.com/vlo-labs/3d-slicer/blob/main/app.py"
click node_upload "https://github.com/vlo-labs/3d-slicer/blob/main/app.py"
click node_stl_store "https://github.com/vlo-labs/3d-slicer/tree/main/uploads"
click node_slice "https://github.com/vlo-labs/3d-slicer/blob/main/app.py"
click node_postprocess "https://github.com/vlo-labs/3d-slicer/blob/main/app.py"
click node_gpx_convert "https://github.com/vlo-labs/3d-slicer/blob/main/app.py"
click node_machine_profile "https://github.com/vlo-labs/3d-slicer/blob/main/creator_pro.ini"
click node_outputs "https://github.com/vlo-labs/3d-slicer/tree/main/output"
click node_print_dispatch "https://github.com/vlo-labs/3d-slicer/blob/main/app.py"
click node_printer_api "https://github.com/vlo-labs/3d-slicer/blob/main/app.py"
click node_controller "https://github.com/vlo-labs/3d-slicer/blob/main/printer.py"

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_ui,node_viewer,node_controls_ui,node_api toneBlue
class node_upload,node_slice,node_slic3r,node_postprocess,node_gpx_convert toneAmber
class node_print_dispatch,node_printer_api,node_controller,node_serial toneMint
class node_stl_store,node_machine_profile,node_outputs toneRose
class node_user,node_printer,node_gpx toneIndigo
```

## Components

### Web interface

- [Slicer UI](https://github.com/vlo-labs/3d-slicer/blob/main/templates/index.html): `templates/index.html`
- [STL viewer](https://github.com/vlo-labs/3d-slicer/blob/main/templates/index.html): `templates/index.html`
- [Control panel](https://github.com/vlo-labs/3d-slicer/blob/main/templates/index.html): `templates/index.html`
- [Flask routes](https://github.com/vlo-labs/3d-slicer/blob/main/app.py): `app.py`

### Slicing workflow

- [STL upload](https://github.com/vlo-labs/3d-slicer/blob/main/app.py): `app.py`
- [Slice configuration](https://github.com/vlo-labs/3d-slicer/blob/main/app.py): `app.py`
- **Slic3r**
- [G-code postprocess](https://github.com/vlo-labs/3d-slicer/blob/main/app.py): `app.py`
- [GPX conversion](https://github.com/vlo-labs/3d-slicer/blob/main/app.py): `app.py`

### Printer control

- [Print dispatch](https://github.com/vlo-labs/3d-slicer/blob/main/app.py): `app.py`
- [Printer routes](https://github.com/vlo-labs/3d-slicer/blob/main/app.py): `app.py`
- [CreatorPro controller](https://github.com/vlo-labs/3d-slicer/blob/main/printer.py): `printer.py`
- **USB serial**

### Runtime resources

- [STL files](https://github.com/vlo-labs/3d-slicer/tree/main/uploads): `uploads`
- [Machine profile](https://github.com/vlo-labs/3d-slicer/blob/main/creator_pro.ini): `creator_pro.ini`
- [G-code and X3G](https://github.com/vlo-labs/3d-slicer/tree/main/output): `output`

### Other components

- **Operator**
- **Creator Pro**
- **GPX runtime**

## Connections

- Operator → Slicer UI: uses (evidence: `README.md`)
- Slicer UI → STL viewer: previews STL (evidence: `README.md`)
- Slicer UI → Control panel: sets controls (evidence: `README.md`)
- Slicer UI → Flask routes: requests routes (evidence: `README.md`)
- Flask routes → STL upload: handles upload (evidence: `app.py`)
- STL upload → STL files: saves STL (evidence: `app.py`)
- Flask routes → Slice configuration: handles slice (evidence: `app.py`)
- Slice configuration → STL files: reads STL (evidence: `app.py`)
- Slice configuration → Slic3r: runs slicer (evidence: `app.py`)
- Slice configuration → G-code postprocess: postprocesses G-code (evidence: `app.py`)
- Slice configuration → GPX conversion: converts G-code (evidence: `app.py`)
- GPX conversion → Machine profile: uses profile (evidence: `app.py`)
- GPX conversion → G-code and X3G: writes X3G (evidence: `app.py`)
- G-code postprocess → G-code and X3G: writes G-code (evidence: `app.py`)
- Slicer UI → G-code and X3G: downloads X3G (evidence: `README.md`)
- Slicer UI → Print dispatch: starts print (evidence: `README.md`)
- Print dispatch → G-code and X3G: reads G-code (evidence: `app.py`)
- Print dispatch → GPX runtime: dispatches print (evidence: `app.py`)
- GPX runtime → Creator Pro: sends print (evidence: `README.md`)
- Slicer UI → Printer routes: controls printer (evidence: `README.md`)
- Printer routes → CreatorPro controller: calls methods (evidence: `app.py`)
- CreatorPro controller → USB serial: queries device (evidence: `printer.py`)
- USB serial → Creator Pro: communicates (evidence: `README.md`)
- CreatorPro controller → GPX runtime: runs movement (evidence: `printer.py`)
- Printer routes → CreatorPro controller: reads status (evidence: `app.py`)
