# trednuk/areapropsforalibre architecture

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

- Interactive diagram: https://gitdiagram.com/trednuk/areapropsforalibre
- Repository: https://github.com/trednuk/areapropsforalibre

## Overview

This Alibre Design tool turns selected planar faces into section-property results and a visual plot. The principal workflow is face selection and boundary extraction in Alibre, JSON handoff to a CPython analysis process, then a bilingual results window with copy support. The analysis also merges multiple faces and computes geometric, plastic, torsional, and warping properties where applicable. The excerpts show the main handoffs and computations; some Alibre-side orchestration details are omitted, so those connections rely on the README.

Main entry points: [`section_analysis.py`](https://github.com/trednuk/areapropsforalibre/blob/main/section_analysis.py) (Analysis entry), [`alibre_section_properties.py`](https://github.com/trednuk/areapropsforalibre/blob/main/alibre_section_properties.py) (Analysis runner), [`results_window.py`](https://github.com/trednuk/areapropsforalibre/blob/main/results_window.py) (Results window)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_capture["Alibre capture"]
  node_runner["Analysis runner"]
  node_face_extract["Face extraction"]
  node_geometry_json["Geometry JSON"]
end

subgraph group_analysis["Section analysis"]
  node_analysis_entry["Analysis entry"]
  node_geometry_build["Geometry merge"]
  node_property_calc["Property calculation"]
  node_plot_render["Section plot"]
  node_results_json["Results JSON"]
end

subgraph group_presentation["Results presentation"]
  node_window["Results window<br/>[results_window.py]"]
  node_language_state["Language preference<br/>[results_window.py]"]
end

subgraph group_external["External runtime"]
  node_python["CPython process"]
  node_sectionproperties["sectionproperties"]
  node_shapely["Shapely"]
  node_matplotlib["Matplotlib"]
end

node_user(("Alibre user"))
node_alibre["Alibre Design"]
node_clipboard["System clipboard"]

node_user -->|"selects faces"| node_alibre
node_alibre -->|"runs script"| node_runner
node_runner -->|"extracts boundaries"| node_face_extract
node_face_extract -->|"reads face API"| node_alibre
node_face_extract -->|"writes geometry"| node_geometry_json
node_runner -->|"launches analysis"| node_python
node_geometry_json -->|"reads input"| node_analysis_entry
node_analysis_entry -->|"builds geometry"| node_geometry_build
node_geometry_build -->|"merges polygons"| node_shapely
node_analysis_entry -->|"computes properties"| node_property_calc
node_property_calc -->|"uses FEM analysis"| node_sectionproperties
node_analysis_entry -->|"renders plot"| node_plot_render
node_plot_render -->|"draws plot"| node_matplotlib
node_analysis_entry -->|"writes results"| node_results_json
node_results_json -->|"returns results"| node_runner
node_runner -->|"opens window"| node_window
node_plot_render -->|"supplies plot"| node_window
node_window -->|"reads and writes"| node_language_state
node_window -->|"copies table"| node_clipboard

click node_runner "https://github.com/trednuk/areapropsforalibre/blob/main/alibre_section_properties.py"
click node_face_extract "https://github.com/trednuk/areapropsforalibre/blob/main/alibre_section_properties.py"
click node_geometry_json "https://github.com/trednuk/areapropsforalibre/blob/main/alibre_section_properties.py"
click node_analysis_entry "https://github.com/trednuk/areapropsforalibre/blob/main/section_analysis.py"
click node_geometry_build "https://github.com/trednuk/areapropsforalibre/blob/main/section_analysis.py"
click node_property_calc "https://github.com/trednuk/areapropsforalibre/blob/main/section_analysis.py"
click node_plot_render "https://github.com/trednuk/areapropsforalibre/blob/main/section_analysis.py"
click node_results_json "https://github.com/trednuk/areapropsforalibre/blob/main/section_analysis.py"
click node_window "https://github.com/trednuk/areapropsforalibre/blob/main/results_window.py"
click node_language_state "https://github.com/trednuk/areapropsforalibre/blob/main/results_window.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_runner,node_face_extract,node_geometry_json,node_user toneBlue
class node_analysis_entry,node_geometry_build,node_property_calc,node_plot_render,node_results_json toneAmber
class node_window,node_language_state toneMint
class node_python,node_sectionproperties,node_shapely,node_matplotlib toneRose
class node_alibre,node_clipboard toneIndigo
```

## Components

### Alibre capture

- [Analysis runner](https://github.com/trednuk/areapropsforalibre/blob/main/alibre_section_properties.py): `alibre_section_properties.py`
- [Face extraction](https://github.com/trednuk/areapropsforalibre/blob/main/alibre_section_properties.py): `alibre_section_properties.py`
- [Geometry JSON](https://github.com/trednuk/areapropsforalibre/blob/main/alibre_section_properties.py): `alibre_section_properties.py`

### Section analysis

- [Analysis entry](https://github.com/trednuk/areapropsforalibre/blob/main/section_analysis.py): `section_analysis.py`
- [Geometry merge](https://github.com/trednuk/areapropsforalibre/blob/main/section_analysis.py): `section_analysis.py`
- [Property calculation](https://github.com/trednuk/areapropsforalibre/blob/main/section_analysis.py): `section_analysis.py`
- [Section plot](https://github.com/trednuk/areapropsforalibre/blob/main/section_analysis.py): `section_analysis.py`
- [Results JSON](https://github.com/trednuk/areapropsforalibre/blob/main/section_analysis.py): `section_analysis.py`

### Results presentation

- [Results window](https://github.com/trednuk/areapropsforalibre/blob/main/results_window.py): `results_window.py`
- [Language preference](https://github.com/trednuk/areapropsforalibre/blob/main/results_window.py): `results_window.py`

### External runtime

- **CPython process**
- **sectionproperties**
- **Shapely**
- **Matplotlib**

### Other components

- **Alibre user**
- **Alibre Design**
- **System clipboard**

## Connections

- Alibre user → Alibre Design: selects faces (evidence: `README.md`)
- Alibre Design → Analysis runner: runs script (evidence: `README.md`)
- Analysis runner → Face extraction: extracts boundaries (evidence: `README.md`)
- Face extraction → Alibre Design: reads face API (evidence: `alibre_section_properties.py`)
- Face extraction → Geometry JSON: writes geometry (evidence: `README.md`)
- Analysis runner → CPython process: launches analysis (evidence: `README.md`)
- Geometry JSON → Analysis entry: reads input (evidence: `section_analysis.py`)
- Analysis entry → Geometry merge: builds geometry (evidence: `section_analysis.py`)
- Geometry merge → Shapely: merges polygons (evidence: `section_analysis.py`)
- Analysis entry → Property calculation: computes properties (evidence: `section_analysis.py`)
- Property calculation → sectionproperties: uses FEM analysis (evidence: `section_analysis.py`)
- Analysis entry → Section plot: renders plot (evidence: `section_analysis.py`)
- Section plot → Matplotlib: draws plot (evidence: `section_analysis.py`)
- Analysis entry → Results JSON: writes results (evidence: `README.md`)
- Results JSON → Analysis runner: returns results (evidence: `alibre_section_properties.py`)
- Analysis runner → Results window: opens window (evidence: `alibre_section_properties.py`)
- Section plot → Results window: supplies plot (evidence: `README.md`)
- Results window → Language preference: reads and writes (evidence: `results_window.py`)
- Results window → System clipboard: copies table (evidence: `README.md`)
