# vives-project-xp/motio architecture

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

- Interactive diagram: https://gitdiagram.com/vives-project-xp/motio
- Repository: https://github.com/vives-project-xp/motio

## Overview

Motio combines a browser simulator, a Raspberry Pi motor-control interface, and mechanical design/fabrication models for the drawing machine. The documented workflow is to configure and preview motion, calculate motor positions, send them to the Pi for step pulses, and drive three motors that combine arm and paper-plate motion into a physical drawing. The graph preserves documented simulator capabilities and separate hardware design branches. Relationships for unsampled simulator internals are left unverified; source excerpts show the laser-generator and Fusion assembly responsibilities.

Main entry points: [`Software/Simulator/js/app.js`](https://github.com/vives-project-xp/motio/blob/main/Software/Simulator/js/app.js) (Motion simulator), [`Hardware/BoxV3/lasersnij/generator/main.py`](https://github.com/vives-project-xp/motio/blob/main/Hardware/BoxV3/lasersnij/generator/main.py) (Laser generator), [`Hardware/BoxV3/lasersnij/generator/parts/box_part.py`](https://github.com/vives-project-xp/motio/blob/main/Hardware/BoxV3/lasersnij/generator/parts/box_part.py) (Box panel layout), [`Software/Simulator/js/ui.js`](https://github.com/vives-project-xp/motio/blob/main/Software/Simulator/js/ui.js) (Parameter UI)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_sim["Simulator"]
  node_simulator["Motion simulator<br/>[app.js]"]
  node_ui["Parameter UI<br/>[ui.js]"]
  node_patterns["Patterns and words<br/>[patterns.js]"]
  node_kinematics["Motion kinematics<br/>[kinematics.js]"]
  node_validation["Safety checks<br/>[validation.js]"]
  node_collision["Collision checks"]
  node_render["Preview rendering<br/>[renderers.js]"]
  node_assembly_guide["Assembly guide<br/>[assembly.js]"]
  node_bom["Parts list<br/>[bom.js]"]
end

subgraph group_control["Motor control"]
  node_pi["Pi motor interface<br/>[motio.py]"]
  node_drivers["gShield drivers"]
  node_motors["Three motors"]
  node_drawing["Paper drawing"]
end

subgraph group_design["Mechanical design"]
  node_boxdesign["Box geometry<br/>[box_design.py]"]
  node_fusion["Fusion assembly<br/>[assembly.py]"]
  node_kinematics3d["Assembly motion<br/>[kinematics.py]"]
end

subgraph group_fabrication["Fabrication"]
  node_laser["Laser generator<br/>[main.py]"]
  node_boxsheet["Box panel layout<br/>[box_part.py]"]
  node_svg["SVG export<br/>[svg_document.py]"]
  node_dxf["DXF export<br/>[dxf_document.py]"]
end

subgraph group_panel["User interface hardware"]
  node_panel["Touchscreen enclosure<br/>[montage.py]"]
  node_panelparts["Panel parts<br/>[bovenplaat.py]"]
  node_paneldims["Panel dimensions<br/>[paneel_maten.py]"]
end

node_operator(("Machine operator"))
node_browser["Browser"]

node_operator -->|"operates"| node_browser
node_browser -->|"runs"| node_simulator
node_operator -.->|"sets parameters"| node_ui
node_ui -.->|"configures"| node_simulator
node_simulator -.->|"offers"| node_patterns
node_simulator -.->|"calculates positions"| node_kinematics
node_simulator -.->|"checks safety"| node_validation
node_validation -.->|"checks collisions"| node_collision
node_simulator -.->|"previews motion"| node_render
node_simulator -.->|"shows guide"| node_assembly_guide
node_simulator -.->|"provides parts list"| node_bom
node_simulator -->|"sends motor positions"| node_pi
node_pi -->|"sends step pulses"| node_drivers
node_drivers -->|"drives"| node_motors
node_motors -->|"combine motion"| node_drawing
node_fusion -->|"uses"| node_kinematics3d
node_laser -->|"creates"| node_boxsheet
node_laser -->|"writes"| node_svg
node_laser -->|"exports"| node_dxf
node_boxsheet -->|"draws paths"| node_svg
node_boxsheet -->|"saves paths"| node_dxf
node_panel -->|"assembles"| node_panelparts
node_panelparts -->|"uses dimensions"| node_paneldims
node_boxdesign -->|"supplies box design"| node_laser

click node_simulator "https://github.com/vives-project-xp/motio/blob/main/Software/Simulator/js/app.js"
click node_ui "https://github.com/vives-project-xp/motio/blob/main/Software/Simulator/js/ui.js"
click node_patterns "https://github.com/vives-project-xp/motio/blob/main/Software/Simulator/js/patterns.js"
click node_kinematics "https://github.com/vives-project-xp/motio/blob/main/Software/Simulator/js/kinematics.js"
click node_validation "https://github.com/vives-project-xp/motio/blob/main/Software/Simulator/js/validation.js"
click node_collision "https://github.com/vives-project-xp/motio/blob/main/Software/Simulator/js/collisionDetection.js"
click node_render "https://github.com/vives-project-xp/motio/blob/main/Software/Simulator/js/renderers.js"
click node_assembly_guide "https://github.com/vives-project-xp/motio/blob/main/Software/Simulator/js/assembly.js"
click node_bom "https://github.com/vives-project-xp/motio/blob/main/Software/Simulator/js/bom.js"
click node_pi "https://github.com/vives-project-xp/motio/blob/main/Software/Pi-Interface/motio.py"
click node_boxdesign "https://github.com/vives-project-xp/motio/blob/main/Hardware/BoxV3/box_design/box_design.py"
click node_fusion "https://github.com/vives-project-xp/motio/blob/main/Hardware/BoxV3/fusion/CycloidDrawerV3/cycloid/assembly.py"
click node_kinematics3d "https://github.com/vives-project-xp/motio/blob/main/Hardware/BoxV3/fusion/CycloidDrawerV3/cycloid/geometry/kinematics.py"
click node_laser "https://github.com/vives-project-xp/motio/blob/main/Hardware/BoxV3/lasersnij/generator/main.py"
click node_boxsheet "https://github.com/vives-project-xp/motio/blob/main/Hardware/BoxV3/lasersnij/generator/parts/box_part.py"
click node_svg "https://github.com/vives-project-xp/motio/blob/main/Hardware/BoxV3/lasersnij/generator/export/svg_document.py"
click node_dxf "https://github.com/vives-project-xp/motio/blob/main/Hardware/BoxV3/lasersnij/generator/export/dxf_document.py"
click node_panel "https://github.com/vives-project-xp/motio/blob/main/Hardware/Bedieningspaneel/montage.py"
click node_panelparts "https://github.com/vives-project-xp/motio/blob/main/Hardware/Bedieningspaneel/bovenplaat.py"
click node_paneldims "https://github.com/vives-project-xp/motio/blob/main/Hardware/Bedieningspaneel/paneel_maten.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_simulator,node_ui,node_patterns,node_kinematics,node_validation,node_collision,node_render,node_assembly_guide,node_bom,node_browser toneBlue
class node_pi,node_drivers,node_motors,node_drawing toneAmber
class node_boxdesign,node_fusion,node_kinematics3d toneMint
class node_laser,node_boxsheet,node_svg,node_dxf toneRose
class node_panel,node_panelparts,node_paneldims,node_operator toneIndigo
```

## Components

### Simulator

- [Motion simulator](https://github.com/vives-project-xp/motio/blob/main/Software/Simulator/js/app.js): `Software/Simulator/js/app.js`
- [Parameter UI](https://github.com/vives-project-xp/motio/blob/main/Software/Simulator/js/ui.js): `Software/Simulator/js/ui.js`
- [Patterns and words](https://github.com/vives-project-xp/motio/blob/main/Software/Simulator/js/patterns.js): `Software/Simulator/js/patterns.js`
- [Motion kinematics](https://github.com/vives-project-xp/motio/blob/main/Software/Simulator/js/kinematics.js): `Software/Simulator/js/kinematics.js`
- [Safety checks](https://github.com/vives-project-xp/motio/blob/main/Software/Simulator/js/validation.js): `Software/Simulator/js/validation.js`
- [Collision checks](https://github.com/vives-project-xp/motio/blob/main/Software/Simulator/js/collisionDetection.js): `Software/Simulator/js/collisionDetection.js`
- [Preview rendering](https://github.com/vives-project-xp/motio/blob/main/Software/Simulator/js/renderers.js): `Software/Simulator/js/renderers.js`
- [Assembly guide](https://github.com/vives-project-xp/motio/blob/main/Software/Simulator/js/assembly.js): `Software/Simulator/js/assembly.js`
- [Parts list](https://github.com/vives-project-xp/motio/blob/main/Software/Simulator/js/bom.js): `Software/Simulator/js/bom.js`

### Motor control

- [Pi motor interface](https://github.com/vives-project-xp/motio/blob/main/Software/Pi-Interface/motio.py): `Software/Pi-Interface/motio.py`
- **gShield drivers**
- **Three motors**
- **Paper drawing**

### Mechanical design

- [Box geometry](https://github.com/vives-project-xp/motio/blob/main/Hardware/BoxV3/box_design/box_design.py): `Hardware/BoxV3/box_design/box_design.py`
- [Fusion assembly](https://github.com/vives-project-xp/motio/blob/main/Hardware/BoxV3/fusion/CycloidDrawerV3/cycloid/assembly.py): `Hardware/BoxV3/fusion/CycloidDrawerV3/cycloid/assembly.py`
- [Assembly motion](https://github.com/vives-project-xp/motio/blob/main/Hardware/BoxV3/fusion/CycloidDrawerV3/cycloid/geometry/kinematics.py): `Hardware/BoxV3/fusion/CycloidDrawerV3/cycloid/geometry/kinematics.py`

### Fabrication

- [Laser generator](https://github.com/vives-project-xp/motio/blob/main/Hardware/BoxV3/lasersnij/generator/main.py): `Hardware/BoxV3/lasersnij/generator/main.py`
- [Box panel layout](https://github.com/vives-project-xp/motio/blob/main/Hardware/BoxV3/lasersnij/generator/parts/box_part.py): `Hardware/BoxV3/lasersnij/generator/parts/box_part.py`
- [SVG export](https://github.com/vives-project-xp/motio/blob/main/Hardware/BoxV3/lasersnij/generator/export/svg_document.py): `Hardware/BoxV3/lasersnij/generator/export/svg_document.py`
- [DXF export](https://github.com/vives-project-xp/motio/blob/main/Hardware/BoxV3/lasersnij/generator/export/dxf_document.py): `Hardware/BoxV3/lasersnij/generator/export/dxf_document.py`

### User interface hardware

- [Touchscreen enclosure](https://github.com/vives-project-xp/motio/blob/main/Hardware/Bedieningspaneel/montage.py): `Hardware/Bedieningspaneel/montage.py`
- [Panel parts](https://github.com/vives-project-xp/motio/blob/main/Hardware/Bedieningspaneel/bovenplaat.py): `Hardware/Bedieningspaneel/bovenplaat.py`
- [Panel dimensions](https://github.com/vives-project-xp/motio/blob/main/Hardware/Bedieningspaneel/paneel_maten.py): `Hardware/Bedieningspaneel/paneel_maten.py`

### Other components

- **Machine operator**
- **Browser**

## Connections

- Machine operator → Browser: operates (evidence: `README.md`)
- Browser → Motion simulator: runs (evidence: `README.md`)
- Machine operator → Parameter UI: sets parameters
- Parameter UI → Motion simulator: configures
- Motion simulator → Patterns and words: offers
- Motion simulator → Motion kinematics: calculates positions
- Motion simulator → Safety checks: checks safety
- Safety checks → Collision checks: checks collisions
- Motion simulator → Preview rendering: previews motion
- Motion simulator → Assembly guide: shows guide
- Motion simulator → Parts list: provides parts list
- Motion simulator → Pi motor interface: sends motor positions (evidence: `README.md`)
- Pi motor interface → gShield drivers: sends step pulses (evidence: `README.md`)
- gShield drivers → Three motors: drives (evidence: `README.md`)
- Three motors → Paper drawing: combine motion (evidence: `README.md`)
- Fusion assembly → Assembly motion: uses (evidence: `Hardware/BoxV3/fusion/CycloidDrawerV3/cycloid/assembly.py`)
- Laser generator → Box panel layout: creates (evidence: `Hardware/BoxV3/lasersnij/generator/main.py`)
- Laser generator → SVG export: writes (evidence: `Hardware/BoxV3/lasersnij/generator/main.py`)
- Laser generator → DXF export: exports (evidence: `Hardware/BoxV3/lasersnij/generator/main.py`)
- Box panel layout → SVG export: draws paths (evidence: `Hardware/BoxV3/lasersnij/generator/parts/box_part.py`)
- Box panel layout → DXF export: saves paths (evidence: `Hardware/BoxV3/lasersnij/generator/parts/box_part.py`)
- Touchscreen enclosure → Panel parts: assembles (evidence: `Hardware/Bedieningspaneel/montage.py`)
- Panel parts → Panel dimensions: uses dimensions (evidence: `Hardware/Bedieningspaneel/bovenplaat.py`)
- Box geometry → Laser generator: supplies box design
