# bhatthiman/noja architecture

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

- Interactive diagram: https://gitdiagram.com/bhatthiman/noja
- Repository: https://github.com/bhatthiman/noja

## Overview

NoJA is currently a command-line tool for validating engineering CSV inputs and generating shell-to-nozzle CAD geometry; the README describes finite-element evaluation as the broader goal, but the documented working capability is geometry generation. The workflow validates inputs, creates a timestamped run folder, copies the job CSV, builds the shell/nozzle model, and exports STEP and BREP files. Materials are checked for required columns, but the shown runtime does not use material properties or perform stress analysis. RF-pad geometry is represented as an optional model feature; source excerpts do not show its exact dispatch logic.

Main entry points: [`run.py`](https://github.com/bhatthiman/noja/blob/main/run.py) (Run command), [`geometry.py`](https://github.com/bhatthiman/noja/blob/main/geometry.py) (Fused CAD model), [`input.py`](https://github.com/bhatthiman/noja/blob/main/input.py) (Input validation), [`config.py`](https://github.com/bhatthiman/noja/blob/main/config.py) (Path and geometry settings)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workflow["Run workflow"]
  node_cli["Run command<br/>[run.py]"]
  node_runfolder["Timestamped run folder"]
  node_exports["STEP / BREP exports"]
end

subgraph group_inputs["Input handling"]
  node_jobcsv["Job CSV"]
  node_materialscsv["Materials CSV<br/>[materials.csv]"]
  node_validation["Input validation<br/>[input.py]"]
  node_jobreader["Job parameter reader<br/>[input.py]"]
  node_configuration["Path and geometry settings<br/>[config.py]"]
end

subgraph group_cad["CAD geometry"]
  node_parameterization["Geometry parameters<br/>[geometry.py]"]
  node_shell["Shell solid<br/>[geometry.py]"]
  node_nozzle["Nozzle solid<br/>[geometry.py]"]
  node_rfpad["Reinforcement pad<br/>[geometry.py]"]
  node_model["Fused CAD model<br/>[geometry.py]"]
  node_exporter["CAD exporter<br/>[geometry.py]"]
end

node_engineer(("Engineer"))

node_engineer -->|"runs"| node_cli
node_cli -->|"validates via"| node_validation
node_validation -->|"checks columns"| node_materialscsv
node_validation -->|"checks sections"| node_jobcsv
node_cli -->|"creates"| node_runfolder
node_cli -->|"copies"| node_jobcsv
node_cli -->|"calls"| node_exporter
node_exporter -->|"builds"| node_model
node_model -->|"gets dimensions"| node_parameterization
node_parameterization -->|"reads parameters"| node_jobreader
node_jobreader -->|"reads"| node_jobcsv
node_parameterization -->|"uses defaults"| node_configuration
node_model -->|"builds"| node_shell
node_model -->|"builds"| node_nozzle
node_model -.->|"may build"| node_rfpad
node_exporter -->|"writes"| node_exports
node_cli -->|"uses paths"| node_configuration

click node_cli "https://github.com/bhatthiman/noja/blob/main/run.py"
click node_materialscsv "https://github.com/bhatthiman/noja/blob/main/materials/materials.csv"
click node_validation "https://github.com/bhatthiman/noja/blob/main/input.py"
click node_jobreader "https://github.com/bhatthiman/noja/blob/main/input.py"
click node_configuration "https://github.com/bhatthiman/noja/blob/main/config.py"
click node_parameterization "https://github.com/bhatthiman/noja/blob/main/geometry.py"
click node_shell "https://github.com/bhatthiman/noja/blob/main/geometry.py"
click node_nozzle "https://github.com/bhatthiman/noja/blob/main/geometry.py"
click node_rfpad "https://github.com/bhatthiman/noja/blob/main/geometry.py"
click node_model "https://github.com/bhatthiman/noja/blob/main/geometry.py"
click node_exporter "https://github.com/bhatthiman/noja/blob/main/geometry.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_cli,node_runfolder,node_exports toneBlue
class node_jobcsv,node_materialscsv,node_validation,node_jobreader,node_configuration toneAmber
class node_parameterization,node_shell,node_nozzle,node_rfpad,node_model,node_exporter toneMint
class node_engineer toneIndigo
```

## Components

### Run workflow

- [Run command](https://github.com/bhatthiman/noja/blob/main/run.py): `run.py`
- **Timestamped run folder**
- **STEP / BREP exports**

### Input handling

- **Job CSV**
- [Materials CSV](https://github.com/bhatthiman/noja/blob/main/materials/materials.csv): `materials/materials.csv`
- [Input validation](https://github.com/bhatthiman/noja/blob/main/input.py): `input.py`
- [Job parameter reader](https://github.com/bhatthiman/noja/blob/main/input.py): `input.py`
- [Path and geometry settings](https://github.com/bhatthiman/noja/blob/main/config.py): `config.py`

### CAD geometry

- [Geometry parameters](https://github.com/bhatthiman/noja/blob/main/geometry.py): `geometry.py`
- [Shell solid](https://github.com/bhatthiman/noja/blob/main/geometry.py): `geometry.py`
- [Nozzle solid](https://github.com/bhatthiman/noja/blob/main/geometry.py): `geometry.py`
- [Reinforcement pad](https://github.com/bhatthiman/noja/blob/main/geometry.py): `geometry.py`
- [Fused CAD model](https://github.com/bhatthiman/noja/blob/main/geometry.py): `geometry.py`
- [CAD exporter](https://github.com/bhatthiman/noja/blob/main/geometry.py): `geometry.py`

### Other components

- **Engineer**

## Connections

- Engineer → Run command: runs (evidence: `README.md`)
- Run command → Input validation: validates via (evidence: `run.py`)
- Input validation → Materials CSV: checks columns (evidence: `input.py`)
- Input validation → Job CSV: checks sections (evidence: `input.py`)
- Run command → Timestamped run folder: creates (evidence: `run.py`)
- Run command → Job CSV: copies (evidence: `run.py`)
- Run command → CAD exporter: calls (evidence: `run.py`)
- CAD exporter → Fused CAD model: builds (evidence: `geometry.py`)
- Fused CAD model → Geometry parameters: gets dimensions (evidence: `geometry.py`)
- Geometry parameters → Job parameter reader: reads parameters (evidence: `geometry.py`)
- Job parameter reader → Job CSV: reads (evidence: `input.py`)
- Geometry parameters → Path and geometry settings: uses defaults (evidence: `geometry.py`)
- Fused CAD model → Shell solid: builds (evidence: `geometry.py`)
- Fused CAD model → Nozzle solid: builds (evidence: `geometry.py`)
- Fused CAD model → Reinforcement pad: may build (evidence: `geometry.py`)
- CAD exporter → STEP / BREP exports: writes (evidence: `geometry.py`)
- Run command → Path and geometry settings: uses paths (evidence: `run.py`)
