# jkuusama/liteplacer-dev architecture

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

- Interactive diagram: https://gitdiagram.com/jkuusama/liteplacer-dev
- Repository: https://github.com/jkuusama/liteplacer-dev

## Overview

LitePlacer is a Windows UI and control application for a pick-and-place machine. The principal workflow is operator interaction through the main form, camera-based viewing and algorithm configuration, then placement setup and machine movement through CNC control. The graph also preserves panelization, tape and nozzle setup, and persistent settings. MainForm.cs was not sampled, so its detailed orchestration is not inferred; edges are limited to relationships visible in excerpts or the source index.

Main entry points: [`LitePlacer/MainForm.cs`](https://github.com/jkuusama/liteplacer-dev/blob/Main/LitePlacer/MainForm.cs) (Main interface), [`LitePlacer/CNC.cs`](https://github.com/jkuusama/liteplacer-dev/blob/Main/LitePlacer/CNC.cs) (CNC motion coordinator), [`LitePlacer/VideoAlgorithmsUI.cs`](https://github.com/jkuusama/liteplacer-dev/blob/Main/LitePlacer/VideoAlgorithmsUI.cs) (Algorithm editor), [`LitePlacer/Camera.cs`](https://github.com/jkuusama/liteplacer-dev/blob/Main/LitePlacer/Camera.cs) (Camera capture and vision)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workflow["Operator workflow"]
  node_main["Main interface<br/>[MainForm.cs]"]
  node_panelize["Panelization<br/>[PanelizeForm.cs]"]
end

subgraph group_vision["Vision and algorithms"]
  node_camera["Camera capture and vision<br/>[Camera.cs]"]
  node_algorithm_editor["Algorithm editor"]
  node_algorithm_name["Algorithm naming<br/>[AlgorithmName.cs]"]
  node_algorithms["Vision algorithms"]
  node_shapes["Image geometry<br/>[Shapes.cs]"]
end

subgraph group_placement["Placement setup"]
  node_tapes["Tape feed setup<br/>[tapes.cs]"]
  node_tape_editor["Tape editor<br/>[TapeEdit.cs]"]
  node_nozzles["Nozzle calibration<br/>[Nozzle.cs]"]
  node_placement_method["Placement method selection"]
end

subgraph group_motion["Machine control"]
  node_cnc["CNC motion coordinator<br/>[CNC.cs]"]
  node_serial["Serial communications<br/>[SerialComm.cs]"]
  node_tinyg["TinyG controller<br/>[TinyGControl.cs]"]
  node_tinyg_settings["TinyG settings<br/>[TinyGSettings.cs]"]
  node_skr3["SKR3 controller<br/>[SKR3Control.cs]"]
end

subgraph group_config["Configuration"]
  node_settings["Application settings<br/>[AppSettings.cs]"]
  node_settings_model["Settings model<br/>[Settings.cs]"]
end

node_operator(("Machine operator"))

node_operator -->|"operates"| node_main
node_algorithm_editor -->|"opens dialog"| node_algorithm_name
node_algorithm_editor -->|"edits algorithms"| node_algorithms
node_camera -->|"uses geometry"| node_shapes
node_tapes -->|"finds algorithm"| node_algorithms
node_main -.->|"coordinates"| node_camera
node_main -.->|"coordinates"| node_tapes
node_main -.->|"coordinates"| node_nozzles
node_main -.->|"coordinates"| node_cnc
node_main -.->|"opens workflow"| node_panelize
node_main -.->|"opens workflow"| node_placement_method
node_tape_editor -->|"references host"| node_main
node_placement_method -->|"references host"| node_main
node_cnc -->|"dispatches commands"| node_tinyg
node_cnc -->|"dispatches commands"| node_skr3
node_cnc -->|"uses transport"| node_serial
node_tinyg -->|"uses transport"| node_serial
node_tinyg_settings -->|"updates settings"| node_settings_model
node_settings -->|"loads and saves"| node_settings_model
node_main -->|"uses settings"| node_settings

click node_main "https://github.com/jkuusama/liteplacer-dev/blob/Main/LitePlacer/MainForm.cs"
click node_panelize "https://github.com/jkuusama/liteplacer-dev/blob/Main/LitePlacer/PanelizeForm.cs"
click node_camera "https://github.com/jkuusama/liteplacer-dev/blob/Main/LitePlacer/Camera.cs"
click node_algorithm_editor "https://github.com/jkuusama/liteplacer-dev/blob/Main/LitePlacer/VideoAlgorithmsUI.cs"
click node_algorithm_name "https://github.com/jkuusama/liteplacer-dev/blob/Main/LitePlacer/AlgorithmName.cs"
click node_algorithms "https://github.com/jkuusama/liteplacer-dev/blob/Main/LitePlacer/VideoAlgorithmsCollection.cs"
click node_shapes "https://github.com/jkuusama/liteplacer-dev/blob/Main/LitePlacer/Shapes.cs"
click node_tapes "https://github.com/jkuusama/liteplacer-dev/blob/Main/LitePlacer/tapes.cs"
click node_tape_editor "https://github.com/jkuusama/liteplacer-dev/blob/Main/LitePlacer/TapeEdit.cs"
click node_nozzles "https://github.com/jkuusama/liteplacer-dev/blob/Main/LitePlacer/Nozzle.cs"
click node_placement_method "https://github.com/jkuusama/liteplacer-dev/blob/Main/LitePlacer/MethodSelectionForm.cs"
click node_cnc "https://github.com/jkuusama/liteplacer-dev/blob/Main/LitePlacer/CNC.cs"
click node_serial "https://github.com/jkuusama/liteplacer-dev/blob/Main/LitePlacer/SerialComm.cs"
click node_tinyg "https://github.com/jkuusama/liteplacer-dev/blob/Main/LitePlacer/TinyGControl.cs"
click node_tinyg_settings "https://github.com/jkuusama/liteplacer-dev/blob/Main/LitePlacer/TinyGSettings.cs"
click node_skr3 "https://github.com/jkuusama/liteplacer-dev/blob/Main/LitePlacer/SKR3Control.cs"
click node_settings "https://github.com/jkuusama/liteplacer-dev/blob/Main/LitePlacer/AppSettings.cs"
click node_settings_model "https://github.com/jkuusama/liteplacer-dev/blob/Main/LitePlacer/Settings.cs"

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_main,node_panelize toneBlue
class node_camera,node_algorithm_editor,node_algorithm_name,node_algorithms,node_shapes toneAmber
class node_tapes,node_tape_editor,node_nozzles,node_placement_method toneMint
class node_cnc,node_serial,node_tinyg,node_tinyg_settings,node_skr3 toneRose
class node_settings,node_settings_model,node_operator toneIndigo
```

## Components

### Operator workflow

- [Main interface](https://github.com/jkuusama/liteplacer-dev/blob/Main/LitePlacer/MainForm.cs): `LitePlacer/MainForm.cs`
- [Panelization](https://github.com/jkuusama/liteplacer-dev/blob/Main/LitePlacer/PanelizeForm.cs): `LitePlacer/PanelizeForm.cs`

### Vision and algorithms

- [Camera capture and vision](https://github.com/jkuusama/liteplacer-dev/blob/Main/LitePlacer/Camera.cs): `LitePlacer/Camera.cs`
- [Algorithm editor](https://github.com/jkuusama/liteplacer-dev/blob/Main/LitePlacer/VideoAlgorithmsUI.cs): `LitePlacer/VideoAlgorithmsUI.cs`
- [Algorithm naming](https://github.com/jkuusama/liteplacer-dev/blob/Main/LitePlacer/AlgorithmName.cs): `LitePlacer/AlgorithmName.cs`
- [Vision algorithms](https://github.com/jkuusama/liteplacer-dev/blob/Main/LitePlacer/VideoAlgorithmsCollection.cs): `LitePlacer/VideoAlgorithmsCollection.cs`
- [Image geometry](https://github.com/jkuusama/liteplacer-dev/blob/Main/LitePlacer/Shapes.cs): `LitePlacer/Shapes.cs`

### Placement setup

- [Tape feed setup](https://github.com/jkuusama/liteplacer-dev/blob/Main/LitePlacer/tapes.cs): `LitePlacer/tapes.cs`
- [Tape editor](https://github.com/jkuusama/liteplacer-dev/blob/Main/LitePlacer/TapeEdit.cs): `LitePlacer/TapeEdit.cs`
- [Nozzle calibration](https://github.com/jkuusama/liteplacer-dev/blob/Main/LitePlacer/Nozzle.cs): `LitePlacer/Nozzle.cs`
- [Placement method selection](https://github.com/jkuusama/liteplacer-dev/blob/Main/LitePlacer/MethodSelectionForm.cs): `LitePlacer/MethodSelectionForm.cs`

### Machine control

- [CNC motion coordinator](https://github.com/jkuusama/liteplacer-dev/blob/Main/LitePlacer/CNC.cs): `LitePlacer/CNC.cs`
- [Serial communications](https://github.com/jkuusama/liteplacer-dev/blob/Main/LitePlacer/SerialComm.cs): `LitePlacer/SerialComm.cs`
- [TinyG controller](https://github.com/jkuusama/liteplacer-dev/blob/Main/LitePlacer/TinyGControl.cs): `LitePlacer/TinyGControl.cs`
- [TinyG settings](https://github.com/jkuusama/liteplacer-dev/blob/Main/LitePlacer/TinyGSettings.cs): `LitePlacer/TinyGSettings.cs`
- [SKR3 controller](https://github.com/jkuusama/liteplacer-dev/blob/Main/LitePlacer/SKR3Control.cs): `LitePlacer/SKR3Control.cs`

### Configuration

- [Application settings](https://github.com/jkuusama/liteplacer-dev/blob/Main/LitePlacer/AppSettings.cs): `LitePlacer/AppSettings.cs`
- [Settings model](https://github.com/jkuusama/liteplacer-dev/blob/Main/LitePlacer/Settings.cs): `LitePlacer/Settings.cs`

### Other components

- **Machine operator**

## Connections

- Machine operator → Main interface: operates (evidence: `README.md`)
- Algorithm editor → Algorithm naming: opens dialog (evidence: `LitePlacer/VideoAlgorithmsUI.cs`)
- Algorithm editor → Vision algorithms: edits algorithms (evidence: `LitePlacer/VideoAlgorithmsUI.cs`)
- Camera capture and vision → Image geometry: uses geometry (evidence: `LitePlacer/Camera.cs`)
- Tape feed setup → Vision algorithms: finds algorithm (evidence: `LitePlacer/tapes.cs`)
- Main interface → Camera capture and vision: coordinates (evidence: `LitePlacer/Camera.cs`)
- Main interface → Tape feed setup: coordinates (evidence: `LitePlacer/tapes.cs`)
- Main interface → Nozzle calibration: coordinates (evidence: `LitePlacer/Nozzle.cs`)
- Main interface → CNC motion coordinator: coordinates (evidence: `LitePlacer/CNC.cs`)
- Main interface → Panelization: opens workflow (evidence: `LitePlacer/PanelizeForm.cs`)
- Main interface → Placement method selection: opens workflow (evidence: `LitePlacer/MethodSelectionForm.cs`)
- Tape editor → Main interface: references host (evidence: `LitePlacer/TapeEdit.cs`)
- Placement method selection → Main interface: references host (evidence: `LitePlacer/MethodSelectionForm.cs`)
- CNC motion coordinator → TinyG controller: dispatches commands (evidence: `LitePlacer/CNC.cs`)
- CNC motion coordinator → SKR3 controller: dispatches commands (evidence: `LitePlacer/CNC.cs`)
- CNC motion coordinator → Serial communications: uses transport (evidence: `LitePlacer/CNC.cs`)
- TinyG controller → Serial communications: uses transport (evidence: `LitePlacer/TinyGControl.cs`)
- TinyG settings → Settings model: updates settings (evidence: `LitePlacer/TinyGSettings.cs`)
- Application settings → Settings model: loads and saves (evidence: `LitePlacer/AppSettings.cs`)
- Main interface → Application settings: uses settings (evidence: `LitePlacer/AppSettings.cs`)
