# adra-product-studio/freecad architecture

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

- Interactive diagram: https://gitdiagram.com/adra-product-studio/freecad
- Repository: https://github.com/adra-product-studio/freecad

## Overview

FreeCAD is a parametric 3D CAD modeler with a Qt-based GUI, a Python API, and an application/document model. The principal workflow is to create or open a document, build and revise geometry through parameterized features, inspect it in the GUI, and produce drawings or other domain-specific results. The README documents these capabilities, while the sampled sources show selected application, expression, GUI, FEM, and reverse-engineering behavior. Several domain links are documented capabilities but their runtime wiring was not sampled, so those edges are dashed and unverified.

Main entry points: [`src/Main/MainGui.cpp`](https://github.com/adra-product-studio/freecad/blob/main/src/Main/MainGui.cpp) (Qt application GUI), [`src/App/DocumentObject.h`](https://github.com/adra-product-studio/freecad/blob/main/src/App/DocumentObject.h) (Document objects), [`src/App/Application.cpp`](https://github.com/adra-product-studio/freecad/blob/main/src/App/Application.cpp) (Application runtime), [`src/App/Document.h`](https://github.com/adra-product-studio/freecad/blob/main/src/App/Document.h) (Documents)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_core["Application model"]
  node_application["Application runtime<br/>[Application.cpp]"]
  node_documents["Documents<br/>[Document.h]"]
  node_objects["Document objects<br/>[DocumentObject.h]"]
  node_properties["Object properties<br/>[Property.h]"]
  node_expressions["Parametric expressions"]
  node_geometry["Geometry features<br/>[GeoFeature.h]"]
  node_links["Linked objects<br/>[Link.h]"]
end

subgraph group_design["Design workbenches"]
  node_sketcher["Constrained sketches"]
  node_part["Part modeling"]
  node_partdesign["Feature modeling"]
  node_bim["BIM and architecture"]
  node_techdraw["Technical drawings"]
end

subgraph group_analysis["Engineering tools"]
  node_cam["CAM toolpaths"]
  node_fem["Finite elements"]
  node_femview["FEM result view"]
  node_reverse["Point-cloud reconstruction"]
  node_materials["Materials"]
end

subgraph group_interface["User interface"]
  node_gui["Qt application GUI<br/>[MainGui.cpp]"]
  node_scene["3D scene interaction"]
  node_arc["Arc visualization engine<br/>[ArcEngine.cpp]"]
end

node_user(("CAD user"))

node_user -.->|"uses"| node_application
node_application -->|"manages"| node_documents
node_documents -.->|"contains"| node_objects
node_objects -.->|"exposes"| node_properties
node_properties -->|"evaluates"| node_expressions
node_objects -.->|"specializes"| node_geometry
node_user -.->|"creates sketches"| node_sketcher
node_sketcher -.->|"builds features"| node_partdesign
node_user -.->|"models geometry"| node_part
node_user -.->|"designs buildings"| node_bim
node_user -.->|"creates drawings"| node_techdraw
node_user -.->|"creates toolpaths"| node_cam
node_user -.->|"runs analysis"| node_fem
node_fem -->|"displays results"| node_femview
node_user -.->|"reconstructs surfaces"| node_reverse
node_user -.->|"manages materials"| node_materials
node_user -.->|"interacts through"| node_gui
node_gui -->|"handles drops"| node_scene
node_scene -->|"sets scene graph"| node_gui
node_gui -.->|"renders arcs"| node_arc

click node_application "https://github.com/adra-product-studio/freecad/blob/main/src/App/Application.cpp"
click node_documents "https://github.com/adra-product-studio/freecad/blob/main/src/App/Document.h"
click node_objects "https://github.com/adra-product-studio/freecad/blob/main/src/App/DocumentObject.h"
click node_properties "https://github.com/adra-product-studio/freecad/blob/main/src/App/Property.h"
click node_expressions "https://github.com/adra-product-studio/freecad/blob/main/src/App/PropertyExpressionEngine.cpp"
click node_geometry "https://github.com/adra-product-studio/freecad/blob/main/src/App/GeoFeature.h"
click node_links "https://github.com/adra-product-studio/freecad/blob/main/src/App/Link.h"
click node_sketcher "https://github.com/adra-product-studio/freecad/tree/main/src/Mod/Sketcher"
click node_part "https://github.com/adra-product-studio/freecad/tree/main/src/Mod/Part"
click node_partdesign "https://github.com/adra-product-studio/freecad/tree/main/src/Mod/PartDesign"
click node_bim "https://github.com/adra-product-studio/freecad/tree/main/src/Mod/BIM"
click node_techdraw "https://github.com/adra-product-studio/freecad/tree/main/src/Mod/TechDraw"
click node_cam "https://github.com/adra-product-studio/freecad/tree/main/src/Mod/CAM"
click node_fem "https://github.com/adra-product-studio/freecad/blob/main/src/Mod/Fem/App/FemPostPipeline.cpp"
click node_femview "https://github.com/adra-product-studio/freecad/blob/main/src/Mod/Fem/Gui/ViewProviderFemPostPipeline.cpp"
click node_reverse "https://github.com/adra-product-studio/freecad/blob/main/src/Mod/ReverseEngineering/App/AppReverseEngineering.cpp"
click node_materials "https://github.com/adra-product-studio/freecad/blob/main/src/Mod/Material/App/ExternalManager.cpp"
click node_gui "https://github.com/adra-product-studio/freecad/blob/main/src/Main/MainGui.cpp"
click node_scene "https://github.com/adra-product-studio/freecad/blob/main/src/Gui/Quarter/DragDropHandler.cpp"
click node_arc "https://github.com/adra-product-studio/freecad/blob/main/src/Gui/ArcEngine.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_application,node_documents,node_objects,node_properties,node_expressions,node_geometry,node_links,node_user toneBlue
class node_sketcher,node_part,node_partdesign,node_bim,node_techdraw toneAmber
class node_cam,node_fem,node_femview,node_reverse,node_materials toneMint
class node_gui,node_scene,node_arc toneRose
```

## Components

### Application model

- [Application runtime](https://github.com/adra-product-studio/freecad/blob/main/src/App/Application.cpp): `src/App/Application.cpp`
- [Documents](https://github.com/adra-product-studio/freecad/blob/main/src/App/Document.h): `src/App/Document.h`
- [Document objects](https://github.com/adra-product-studio/freecad/blob/main/src/App/DocumentObject.h): `src/App/DocumentObject.h`
- [Object properties](https://github.com/adra-product-studio/freecad/blob/main/src/App/Property.h): `src/App/Property.h`
- [Parametric expressions](https://github.com/adra-product-studio/freecad/blob/main/src/App/PropertyExpressionEngine.cpp): `src/App/PropertyExpressionEngine.cpp`
- [Geometry features](https://github.com/adra-product-studio/freecad/blob/main/src/App/GeoFeature.h): `src/App/GeoFeature.h`
- [Linked objects](https://github.com/adra-product-studio/freecad/blob/main/src/App/Link.h): `src/App/Link.h`

### Design workbenches

- [Constrained sketches](https://github.com/adra-product-studio/freecad/tree/main/src/Mod/Sketcher): `src/Mod/Sketcher`
- [Part modeling](https://github.com/adra-product-studio/freecad/tree/main/src/Mod/Part): `src/Mod/Part`
- [Feature modeling](https://github.com/adra-product-studio/freecad/tree/main/src/Mod/PartDesign): `src/Mod/PartDesign`
- [BIM and architecture](https://github.com/adra-product-studio/freecad/tree/main/src/Mod/BIM): `src/Mod/BIM`
- [Technical drawings](https://github.com/adra-product-studio/freecad/tree/main/src/Mod/TechDraw): `src/Mod/TechDraw`

### Engineering tools

- [CAM toolpaths](https://github.com/adra-product-studio/freecad/tree/main/src/Mod/CAM): `src/Mod/CAM`
- [Finite elements](https://github.com/adra-product-studio/freecad/blob/main/src/Mod/Fem/App/FemPostPipeline.cpp): `src/Mod/Fem/App/FemPostPipeline.cpp`
- [FEM result view](https://github.com/adra-product-studio/freecad/blob/main/src/Mod/Fem/Gui/ViewProviderFemPostPipeline.cpp): `src/Mod/Fem/Gui/ViewProviderFemPostPipeline.cpp`
- [Point-cloud reconstruction](https://github.com/adra-product-studio/freecad/blob/main/src/Mod/ReverseEngineering/App/AppReverseEngineering.cpp): `src/Mod/ReverseEngineering/App/AppReverseEngineering.cpp`
- [Materials](https://github.com/adra-product-studio/freecad/blob/main/src/Mod/Material/App/ExternalManager.cpp): `src/Mod/Material/App/ExternalManager.cpp`

### User interface

- [Qt application GUI](https://github.com/adra-product-studio/freecad/blob/main/src/Main/MainGui.cpp): `src/Main/MainGui.cpp`
- [3D scene interaction](https://github.com/adra-product-studio/freecad/blob/main/src/Gui/Quarter/DragDropHandler.cpp): `src/Gui/Quarter/DragDropHandler.cpp`
- [Arc visualization engine](https://github.com/adra-product-studio/freecad/blob/main/src/Gui/ArcEngine.cpp): `src/Gui/ArcEngine.cpp`

### Other components

- **CAD user**

## Connections

- CAD user → Application runtime: uses (evidence: `README.md`)
- Application runtime → Documents: manages (evidence: `src/App/Application.cpp`)
- Documents → Document objects: contains
- Document objects → Object properties: exposes
- Object properties → Parametric expressions: evaluates (evidence: `src/App/PropertyExpressionEngine.cpp`)
- Document objects → Geometry features: specializes
- CAD user → Constrained sketches: creates sketches (evidence: `README.md`)
- Constrained sketches → Feature modeling: builds features (evidence: `README.md`)
- CAD user → Part modeling: models geometry (evidence: `README.md`)
- CAD user → BIM and architecture: designs buildings (evidence: `README.md`)
- CAD user → Technical drawings: creates drawings (evidence: `README.md`)
- CAD user → CAM toolpaths: creates toolpaths (evidence: `README.md`)
- CAD user → Finite elements: runs analysis
- Finite elements → FEM result view: displays results (evidence: `src/Mod/Fem/Gui/ViewProviderFemPostPipeline.cpp`)
- CAD user → Point-cloud reconstruction: reconstructs surfaces
- CAD user → Materials: manages materials
- CAD user → Qt application GUI: interacts through (evidence: `README.md`)
- Qt application GUI → 3D scene interaction: handles drops (evidence: `src/Gui/Quarter/DragDropHandler.cpp`)
- 3D scene interaction → Qt application GUI: sets scene graph (evidence: `src/Gui/Quarter/DragDropHandler.cpp`)
- Qt application GUI → Arc visualization engine: renders arcs
