# matinhafiyyan/coral-reef-skeleton-reaction-diffusion-design-methodology architecture

> Architecture diagram of the GitHub repository matinhafiyyan/coral-reef-skeleton-reaction-diffusion-design-methodology, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-05). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/matinhafiyyan/coral-reef-skeleton-reaction-diffusion-design-methodology
- Repository: https://github.com/matinhafiyyan/coral-reef-skeleton-reaction-diffusion-design-methodology

## Overview

This repository is a set of Python model generators for a printable coral structure and its matching bayonet-stud plate, with utilities to verify and visualize their fit. The main workflow is independently configure and generate the coral and plate, then optionally load their STL and parameter records into the fit checker or joint-view exporter. Coral generation includes reaction-diffusion, printable-solid construction, feature measurement and export; plate generation lays out studs, builds the fused plate, and exports it. Source excerpts show these responsibilities, but not every internal call or export step, so uncertain links are omitted.

Main entry points: [`tools/joint_fit.py`](https://github.com/matinhafiyyan/coral-reef-skeleton-reaction-diffusion-design-methodology/blob/main/tools/joint_fit.py) (Joint fit checker), [`tools/joint_views.py`](https://github.com/matinhafiyyan/coral-reef-skeleton-reaction-diffusion-design-methodology/blob/main/tools/joint_views.py) (Joint views and assembly), [`coral_reef.py`](https://github.com/matinhafiyyan/coral-reef-skeleton-reaction-diffusion-design-methodology/blob/main/coral_reef.py) (Gray-Scott simulation), [`base_plate_studs.py`](https://github.com/matinhafiyyan/coral-reef-skeleton-reaction-diffusion-design-methodology/blob/main/base_plate_studs.py) (Stud layout)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_coral["Coral generation"]
  node_reaction["Gray-Scott simulation<br/>[coral_reef.py]"]
  node_coral_solid["Printable solid<br/>[coral_reef.py]"]
  node_coral_measure["Feature sizing<br/>[coral_reef.py]"]
  node_coral_mesh["Coral mesh and export<br/>[coral_reef.py]"]
end

subgraph group_plate["Plate generation"]
  node_layout["Stud layout"]
  node_plate_mesh["Plate and studs"]
  node_plate_export["Plate export"]
end

subgraph group_joint["Joint utilities"]
  node_fit["Joint fit checker<br/>[joint_fit.py]"]
  node_views["Joint views and assembly<br/>[joint_views.py]"]
end

node_maker(("Model designer"))
node_coral_stl["Coral STL and parameters"]
node_plate_stl["Plate STL and parameters"]
node_fit_report["Fit report"]
node_view_outputs["Images and assembly"]

node_maker -->|"configures and runs"| node_reaction
node_reaction -->|"provides field"| node_coral_solid
node_coral_solid -->|"measures features"| node_coral_measure
node_coral_measure -->|"supports meshing"| node_coral_mesh
node_maker -->|"configures and runs"| node_layout
node_layout -->|"provides centres"| node_plate_mesh
node_plate_mesh -->|"exports model"| node_plate_export
node_coral_mesh -->|"produces"| node_coral_stl
node_plate_export -->|"produces"| node_plate_stl
node_maker -->|"runs optionally"| node_fit
node_coral_stl -->|"loads model and parameters"| node_fit
node_plate_stl -->|"loads model and parameters"| node_fit
node_fit -->|"prints result"| node_fit_report
node_maker -->|"runs optionally"| node_views
node_coral_stl -->|"loads coral inputs"| node_views
node_plate_stl -->|"loads plate inputs"| node_views
node_views -->|"exports views and assembly"| node_view_outputs

click node_reaction "https://github.com/matinhafiyyan/coral-reef-skeleton-reaction-diffusion-design-methodology/blob/main/coral_reef.py"
click node_coral_solid "https://github.com/matinhafiyyan/coral-reef-skeleton-reaction-diffusion-design-methodology/blob/main/coral_reef.py"
click node_coral_measure "https://github.com/matinhafiyyan/coral-reef-skeleton-reaction-diffusion-design-methodology/blob/main/coral_reef.py"
click node_coral_mesh "https://github.com/matinhafiyyan/coral-reef-skeleton-reaction-diffusion-design-methodology/blob/main/coral_reef.py"
click node_layout "https://github.com/matinhafiyyan/coral-reef-skeleton-reaction-diffusion-design-methodology/blob/main/base_plate_studs.py"
click node_plate_mesh "https://github.com/matinhafiyyan/coral-reef-skeleton-reaction-diffusion-design-methodology/blob/main/base_plate_studs.py"
click node_plate_export "https://github.com/matinhafiyyan/coral-reef-skeleton-reaction-diffusion-design-methodology/blob/main/base_plate_studs.py"
click node_fit "https://github.com/matinhafiyyan/coral-reef-skeleton-reaction-diffusion-design-methodology/blob/main/tools/joint_fit.py"
click node_views "https://github.com/matinhafiyyan/coral-reef-skeleton-reaction-diffusion-design-methodology/blob/main/tools/joint_views.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_reaction,node_coral_solid,node_coral_measure,node_coral_mesh toneBlue
class node_layout,node_plate_mesh,node_plate_export toneAmber
class node_fit,node_views toneMint
class node_maker,node_coral_stl,node_plate_stl,node_fit_report,node_view_outputs toneIndigo
```

## Components

### Coral generation

- [Gray-Scott simulation](https://github.com/matinhafiyyan/coral-reef-skeleton-reaction-diffusion-design-methodology/blob/main/coral_reef.py): `coral_reef.py`
- [Printable solid](https://github.com/matinhafiyyan/coral-reef-skeleton-reaction-diffusion-design-methodology/blob/main/coral_reef.py): `coral_reef.py`
- [Feature sizing](https://github.com/matinhafiyyan/coral-reef-skeleton-reaction-diffusion-design-methodology/blob/main/coral_reef.py): `coral_reef.py`
- [Coral mesh and export](https://github.com/matinhafiyyan/coral-reef-skeleton-reaction-diffusion-design-methodology/blob/main/coral_reef.py): `coral_reef.py`

### Plate generation

- [Stud layout](https://github.com/matinhafiyyan/coral-reef-skeleton-reaction-diffusion-design-methodology/blob/main/base_plate_studs.py): `base_plate_studs.py`
- [Plate and studs](https://github.com/matinhafiyyan/coral-reef-skeleton-reaction-diffusion-design-methodology/blob/main/base_plate_studs.py): `base_plate_studs.py`
- [Plate export](https://github.com/matinhafiyyan/coral-reef-skeleton-reaction-diffusion-design-methodology/blob/main/base_plate_studs.py): `base_plate_studs.py`

### Joint utilities

- [Joint fit checker](https://github.com/matinhafiyyan/coral-reef-skeleton-reaction-diffusion-design-methodology/blob/main/tools/joint_fit.py): `tools/joint_fit.py`
- [Joint views and assembly](https://github.com/matinhafiyyan/coral-reef-skeleton-reaction-diffusion-design-methodology/blob/main/tools/joint_views.py): `tools/joint_views.py`

### Other components

- **Model designer**
- **Coral STL and parameters**
- **Plate STL and parameters**
- **Fit report**
- **Images and assembly**

## Connections

- Model designer → Gray-Scott simulation: configures and runs (evidence: `README.md`)
- Gray-Scott simulation → Printable solid: provides field (evidence: `coral_reef.py`)
- Printable solid → Feature sizing: measures features (evidence: `coral_reef.py`)
- Feature sizing → Coral mesh and export: supports meshing (evidence: `coral_reef.py`)
- Model designer → Stud layout: configures and runs (evidence: `README.md`)
- Stud layout → Plate and studs: provides centres (evidence: `base_plate_studs.py`)
- Plate and studs → Plate export: exports model (evidence: `base_plate_studs.py`)
- Coral mesh and export → Coral STL and parameters: produces (evidence: `README.md`)
- Plate export → Plate STL and parameters: produces (evidence: `README.md`)
- Model designer → Joint fit checker: runs optionally (evidence: `README.md`)
- Coral STL and parameters → Joint fit checker: loads model and parameters (evidence: `tools/joint_fit.py`)
- Plate STL and parameters → Joint fit checker: loads model and parameters (evidence: `tools/joint_fit.py`)
- Joint fit checker → Fit report: prints result (evidence: `tools/joint_fit.py`)
- Model designer → Joint views and assembly: runs optionally (evidence: `tools/joint_views.py`)
- Coral STL and parameters → Joint views and assembly: loads coral inputs (evidence: `tools/joint_views.py`)
- Plate STL and parameters → Joint views and assembly: loads plate inputs (evidence: `tools/joint_views.py`)
- Joint views and assembly → Images and assembly: exports views and assembly (evidence: `tools/joint_views.py`)
