# labspiral/sirius2 architecture

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

- Interactive diagram: https://gitdiagram.com/labspiral/sirius2
- Repository: https://github.com/labspiral/sirius2

## Overview

SIRIUS2 is a Windows .NET library and editor ecosystem for scanner/laser marking, with optional machine-vision inspection. The main workflow is to create an entity-based job, customize its behavior with C# scripts, then mark it through an RTC scanner while controlling laser output. Separate capabilities cover field correction, calibration, power compensation, remote control, and vision acquisition/inspection. The repository tree and README establish these product areas; sampled source is limited to bundled script examples, so internal library call structure is not shown.

Main entry points: [`bin`](https://github.com/labspiral/sirius2/tree/main/bin) (SIRIUS2 runtime), [`demos/vision_camera`](https://github.com/labspiral/sirius2/tree/main/demos/vision_camera) (Camera acquisition), [`demos/editor_marker`](https://github.com/labspiral/sirius2/tree/main/demos/editor_marker) (Marker execution), [`demos/editor_ui`](https://github.com/labspiral/sirius2/tree/main/demos/editor_ui) (SIRIUS2 editor)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_authoring["Job authoring"]
  node_editor["SIRIUS2 editor"]
  node_entities["Job entities"]
  node_scripts["C&#35; scripts"]
end

subgraph group_marking["Marking control"]
  node_runtime["SIRIUS2 runtime"]
  node_marker["Marker execution"]
  node_field["Field correction"]
  node_calibration["3D calibration"]
  node_powermap["Power mapping"]
end

subgraph group_vision["Vision inspection"]
  node_visionui["Vision interface"]
  node_cameras["Camera acquisition"]
  node_inspection["Image inspection"]
  node_stitch["Image stitching"]
end

subgraph group_integration["External integration"]
  node_scanner{{"RTC controllers"}}
  node_laser["Laser control"]
  node_remote["Remote control"]
  node_visionengine{{"Vision engines"}}
  node_powermeter["Power meters"]
end

node_operator(("Operator"))

node_operator -->|"authors job"| node_editor
node_editor -->|"creates entities"| node_entities
node_entities -->|"marked as job"| node_marker
node_marker -->|"uses runtime"| node_runtime
node_runtime -->|"drives controller"| node_scanner
node_runtime -->|"controls output"| node_laser
node_operator -->|"customizes behavior"| node_scripts
node_scripts -->|"extends marking"| node_marker
node_runtime -->|"applies correction"| node_field
node_operator -->|"calibrates field"| node_calibration
node_runtime -->|"compensates power"| node_powermap
node_powermap -->|"uses measurements"| node_powermeter
node_operator -->|"sends commands"| node_remote
node_operator -->|"configures inspection"| node_visionui
node_visionui -->|"acquires images"| node_cameras
node_cameras -->|"supplies images"| node_inspection
node_inspection -.->|"uses engine"| node_visionengine
node_cameras -->|"supports stitching"| node_stitch
node_runtime -->|"integrates scanner capture"| node_stitch

click node_editor "https://github.com/labspiral/sirius2/tree/main/demos/editor_ui"
click node_entities "https://github.com/labspiral/sirius2/tree/main/bin"
click node_scripts "https://github.com/labspiral/sirius2/tree/main/bin/script"
click node_runtime "https://github.com/labspiral/sirius2/tree/main/bin"
click node_marker "https://github.com/labspiral/sirius2/tree/main/demos/editor_marker"
click node_field "https://github.com/labspiral/sirius2/tree/main/bin/correction"
click node_calibration "https://github.com/labspiral/sirius2/tree/main/bin/recipe"
click node_powermap "https://github.com/labspiral/sirius2/tree/main/bin/powermap"
click node_scanner "https://github.com/labspiral/sirius2/tree/main/bin"
click node_laser "https://github.com/labspiral/sirius2/tree/main/demos/laserpower"
click node_remote "https://github.com/labspiral/sirius2/tree/main/demos/editor_remote"
click node_visionui "https://github.com/labspiral/sirius2/tree/main/demos/vision_ui"
click node_cameras "https://github.com/labspiral/sirius2/tree/main/demos/vision_camera"
click node_inspection "https://github.com/labspiral/sirius2/tree/main/demos/vision_basic"
click node_stitch "https://github.com/labspiral/sirius2/tree/main/demos/vision_stitch"
click node_visionengine "https://github.com/labspiral/sirius2/tree/main/bin"
click node_powermeter "https://github.com/labspiral/sirius2/tree/main/demos/powermeter"

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_editor,node_entities,node_scripts toneBlue
class node_runtime,node_marker,node_field,node_calibration,node_powermap toneAmber
class node_visionui,node_cameras,node_inspection,node_stitch toneMint
class node_scanner,node_laser,node_remote,node_visionengine,node_powermeter toneRose
class node_operator toneIndigo
```

## Components

### Job authoring

- [SIRIUS2 editor](https://github.com/labspiral/sirius2/tree/main/demos/editor_ui): `demos/editor_ui`
- [Job entities](https://github.com/labspiral/sirius2/tree/main/bin): `bin`
- [C# scripts](https://github.com/labspiral/sirius2/tree/main/bin/script): `bin/script`

### Marking control

- [SIRIUS2 runtime](https://github.com/labspiral/sirius2/tree/main/bin): `bin`
- [Marker execution](https://github.com/labspiral/sirius2/tree/main/demos/editor_marker): `demos/editor_marker`
- [Field correction](https://github.com/labspiral/sirius2/tree/main/bin/correction): `bin/correction`
- [3D calibration](https://github.com/labspiral/sirius2/tree/main/bin/recipe): `bin/recipe`
- [Power mapping](https://github.com/labspiral/sirius2/tree/main/bin/powermap): `bin/powermap`

### Vision inspection

- [Vision interface](https://github.com/labspiral/sirius2/tree/main/demos/vision_ui): `demos/vision_ui`
- [Camera acquisition](https://github.com/labspiral/sirius2/tree/main/demos/vision_camera): `demos/vision_camera`
- [Image inspection](https://github.com/labspiral/sirius2/tree/main/demos/vision_basic): `demos/vision_basic`
- [Image stitching](https://github.com/labspiral/sirius2/tree/main/demos/vision_stitch): `demos/vision_stitch`

### External integration

- [RTC controllers](https://github.com/labspiral/sirius2/tree/main/bin): `bin`
- [Laser control](https://github.com/labspiral/sirius2/tree/main/demos/laserpower): `demos/laserpower`
- [Remote control](https://github.com/labspiral/sirius2/tree/main/demos/editor_remote): `demos/editor_remote`
- [Vision engines](https://github.com/labspiral/sirius2/tree/main/bin): `bin`
- [Power meters](https://github.com/labspiral/sirius2/tree/main/demos/powermeter): `demos/powermeter`

### Other components

- **Operator**

## Connections

- Operator → SIRIUS2 editor: authors job (evidence: `README.md`)
- SIRIUS2 editor → Job entities: creates entities (evidence: `README.md`)
- Job entities → Marker execution: marked as job (evidence: `README.md`)
- Marker execution → SIRIUS2 runtime: uses runtime (evidence: `README.md`)
- SIRIUS2 runtime → RTC controllers: drives controller (evidence: `README.md`)
- SIRIUS2 runtime → Laser control: controls output (evidence: `README.md`)
- Operator → C# scripts: customizes behavior (evidence: `README.md`)
- C# scripts → Marker execution: extends marking (evidence: `bin/script/default.cs`)
- SIRIUS2 runtime → Field correction: applies correction (evidence: `README.md`)
- Operator → 3D calibration: calibrates field (evidence: `README.md`)
- SIRIUS2 runtime → Power mapping: compensates power (evidence: `README.md`)
- Power mapping → Power meters: uses measurements (evidence: `README.md`)
- Operator → Remote control: sends commands (evidence: `README.md`)
- Operator → Vision interface: configures inspection (evidence: `README.md`)
- Vision interface → Camera acquisition: acquires images (evidence: `README.md`)
- Camera acquisition → Image inspection: supplies images (evidence: `README.md`)
- Image inspection → Vision engines: uses engine (evidence: `README.md`)
- Camera acquisition → Image stitching: supports stitching (evidence: `README.md`)
- SIRIUS2 runtime → Image stitching: integrates scanner capture (evidence: `README.md`)
