# lopezzavc/structcore architecture

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

- Interactive diagram: https://gitdiagram.com/lopezzavc/structcore
- Repository: https://github.com/lopezzavc/structcore

## Overview

This is a structural engineering modeling and analysis application: users build or edit a structural model, assign properties and loads, then analyze and inspect results. The Qt application exposes model operations through a controller, while the engine provides model persistence, geometry, connectivity, analysis and checking; command-line tools offer a separate solve path. The README is empty, so capabilities are inferred from the source tree and sampled files; several engine subsystems are unsampled, and their internal relationships are left unasserted.

Main entry points: [`app/model_controller.cpp`](https://github.com/lopezzavc/structcore/blob/master/app/model_controller.cpp) (Model controller), [`tools/solve_cli.cpp`](https://github.com/lopezzavc/structcore/blob/master/tools/solve_cli.cpp) (Solve CLI), [`app/main.cpp`](https://github.com/lopezzavc/structcore/blob/master/app/main.cpp) (Application startup), [`engine/src/analysis.cpp`](https://github.com/lopezzavc/structcore/blob/master/engine/src/analysis.cpp) (Structural analysis)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Desktop application"]
  node_app["Application startup<br/>[main.cpp]"]
  node_controller["Model controller"]
  node_viewport["Model viewport"]
end

subgraph group_modeling["Modeling engine"]
  node_model["Structural model<br/>[model.h]"]
  node_commands["Undoable commands<br/>[model_ops.cpp]"]
  node_edit["Model editing<br/>[model_ops_edit.cpp]"]
  node_connectivity["Connectivity<br/>[connectivity.cpp]"]
  node_geometry["Frame geometry<br/>[frame_geometry.cpp]"]
  node_area_mesh["Area meshing<br/>[area_mesh.cpp]"]
  node_properties["Section properties<br/>[section_props.cpp]"]
  node_catalog[("Profile catalog")]
end

subgraph group_analysis["Analysis and checks"]
  node_solver["Structural analysis<br/>[analysis.cpp]"]
  node_design["Design checks<br/>[design_check.cpp]"]
  node_capacity["Section capacity"]
  node_model_check["Model validation<br/>[model_check.cpp]"]
end

subgraph group_io["Import and persistence"]
  node_persistence[("Model files<br/>[model_io.cpp]")]
  node_dxf["DXF import<br/>[dxf_import.cpp]"]
  node_export["Model export<br/>[export.cpp]"]
end

subgraph group_tools["Command-line tools"]
  node_solve_cli["Solve CLI<br/>[solve_cli.cpp]"]
end

node_user(("Engineer"))

node_user -->|"uses"| node_app
node_app -->|"exposes"| node_controller
node_controller -->|"executes"| node_commands
node_controller -.->|"updates"| node_model
node_controller -.->|"notifies"| node_viewport
node_solver -->|"analyzes"| node_model
node_solve_cli -->|"loads"| node_persistence
node_solve_cli -->|"runs"| node_solver

click node_app "https://github.com/lopezzavc/structcore/blob/master/app/main.cpp"
click node_controller "https://github.com/lopezzavc/structcore/blob/master/app/model_controller.cpp"
click node_viewport "https://github.com/lopezzavc/structcore/blob/master/app/model_view_item.cpp"
click node_model "https://github.com/lopezzavc/structcore/blob/master/engine/include/structcore/model.h"
click node_commands "https://github.com/lopezzavc/structcore/blob/master/engine/src/model_ops.cpp"
click node_edit "https://github.com/lopezzavc/structcore/blob/master/engine/src/model_ops_edit.cpp"
click node_connectivity "https://github.com/lopezzavc/structcore/blob/master/engine/src/connectivity.cpp"
click node_geometry "https://github.com/lopezzavc/structcore/blob/master/engine/src/frame_geometry.cpp"
click node_area_mesh "https://github.com/lopezzavc/structcore/blob/master/engine/src/area_mesh.cpp"
click node_properties "https://github.com/lopezzavc/structcore/blob/master/engine/src/section_props.cpp"
click node_catalog "https://github.com/lopezzavc/structcore/blob/master/engine/src/profile_catalog.cpp"
click node_solver "https://github.com/lopezzavc/structcore/blob/master/engine/src/analysis.cpp"
click node_design "https://github.com/lopezzavc/structcore/blob/master/engine/src/design_check.cpp"
click node_capacity "https://github.com/lopezzavc/structcore/blob/master/engine/src/section_capacity.cpp"
click node_model_check "https://github.com/lopezzavc/structcore/blob/master/engine/src/model_check.cpp"
click node_persistence "https://github.com/lopezzavc/structcore/blob/master/engine/src/model_io.cpp"
click node_dxf "https://github.com/lopezzavc/structcore/blob/master/engine/src/dxf_import.cpp"
click node_export "https://github.com/lopezzavc/structcore/blob/master/engine/src/export.cpp"
click node_solve_cli "https://github.com/lopezzavc/structcore/blob/master/tools/solve_cli.cpp"

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_app,node_controller,node_viewport toneBlue
class node_model,node_commands,node_edit,node_connectivity,node_geometry,node_area_mesh,node_properties,node_catalog toneAmber
class node_solver,node_design,node_capacity,node_model_check toneMint
class node_persistence,node_dxf,node_export toneRose
class node_solve_cli,node_user toneIndigo
```

## Components

### Desktop application

- [Application startup](https://github.com/lopezzavc/structcore/blob/master/app/main.cpp): `app/main.cpp`
- [Model controller](https://github.com/lopezzavc/structcore/blob/master/app/model_controller.cpp): `app/model_controller.cpp`
- [Model viewport](https://github.com/lopezzavc/structcore/blob/master/app/model_view_item.cpp): `app/model_view_item.cpp`

### Modeling engine

- [Structural model](https://github.com/lopezzavc/structcore/blob/master/engine/include/structcore/model.h): `engine/include/structcore/model.h`
- [Undoable commands](https://github.com/lopezzavc/structcore/blob/master/engine/src/model_ops.cpp): `engine/src/model_ops.cpp`
- [Model editing](https://github.com/lopezzavc/structcore/blob/master/engine/src/model_ops_edit.cpp): `engine/src/model_ops_edit.cpp`
- [Connectivity](https://github.com/lopezzavc/structcore/blob/master/engine/src/connectivity.cpp): `engine/src/connectivity.cpp`
- [Frame geometry](https://github.com/lopezzavc/structcore/blob/master/engine/src/frame_geometry.cpp): `engine/src/frame_geometry.cpp`
- [Area meshing](https://github.com/lopezzavc/structcore/blob/master/engine/src/area_mesh.cpp): `engine/src/area_mesh.cpp`
- [Section properties](https://github.com/lopezzavc/structcore/blob/master/engine/src/section_props.cpp): `engine/src/section_props.cpp`
- [Profile catalog](https://github.com/lopezzavc/structcore/blob/master/engine/src/profile_catalog.cpp): `engine/src/profile_catalog.cpp`

### Analysis and checks

- [Structural analysis](https://github.com/lopezzavc/structcore/blob/master/engine/src/analysis.cpp): `engine/src/analysis.cpp`
- [Design checks](https://github.com/lopezzavc/structcore/blob/master/engine/src/design_check.cpp): `engine/src/design_check.cpp`
- [Section capacity](https://github.com/lopezzavc/structcore/blob/master/engine/src/section_capacity.cpp): `engine/src/section_capacity.cpp`
- [Model validation](https://github.com/lopezzavc/structcore/blob/master/engine/src/model_check.cpp): `engine/src/model_check.cpp`

### Import and persistence

- [Model files](https://github.com/lopezzavc/structcore/blob/master/engine/src/model_io.cpp): `engine/src/model_io.cpp`
- [DXF import](https://github.com/lopezzavc/structcore/blob/master/engine/src/dxf_import.cpp): `engine/src/dxf_import.cpp`
- [Model export](https://github.com/lopezzavc/structcore/blob/master/engine/src/export.cpp): `engine/src/export.cpp`

### Command-line tools

- [Solve CLI](https://github.com/lopezzavc/structcore/blob/master/tools/solve_cli.cpp): `tools/solve_cli.cpp`

### Other components

- **Engineer**

## Connections

- Engineer → Application startup: uses
- Application startup → Model controller: exposes (evidence: `app/main.cpp`)
- Model controller → Undoable commands: executes (evidence: `app/model_controller.cpp`)
- Model controller → Structural model: updates
- Model controller → Model viewport: notifies
- Structural analysis → Structural model: analyzes
- Solve CLI → Model files: loads (evidence: `tools/solve_cli.cpp`)
- Solve CLI → Structural analysis: runs (evidence: `tools/solve_cli.cpp`)
