# manuelmrosa/sheetnest architecture

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

- Interactive diagram: https://gitdiagram.com/manuelmrosa/sheetnest
- Repository: https://github.com/manuelmrosa/sheetnest

## Overview

SheetNest is a Windows sheet-metal nesting application: users import 2D or unfolded 3D parts, specify quantities and stock, generate and refine layouts, then export cutting files and reports. The graph combines README-described product capabilities with relationships visible in sampled source and the SOURCE INDEX. Several UI and reporting links are documented rather than source-verified; those use README evidence, and unsampled implementation details are not inferred.

Main entry points: [`DeepNestLib.Core/Placement/SheetPlacement.cs`](https://github.com/manuelmrosa/sheetnest/blob/main/DeepNestLib.Core/Placement/SheetPlacement.cs) (Sheet layouts), [`DeepNestSharp.Domain/ViewModels/NestProjectViewModel.cs`](https://github.com/manuelmrosa/sheetnest/blob/main/DeepNestSharp.Domain/ViewModels/NestProjectViewModel.cs) (Project and stock), [`DeepNestLib.Core/SvgNest.cs`](https://github.com/manuelmrosa/sheetnest/blob/main/DeepNestLib.Core/SvgNest.cs) (Nest orchestration), [`DeepNestLib.Core/IO/DxfParser.cs`](https://github.com/manuelmrosa/sheetnest/blob/main/DeepNestLib.Core/IO/DxfParser.cs) (DXF import)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Project and UI"]
  node_app["Desktop app<br/>[App.xaml.cs]"]
  node_project["Project and stock"]
  node_recovery["Autosave recovery<br/>[Autosave.cs]"]
  node_editing["Manual layout editing"]
end

subgraph group_import["Part import"]
  node_dxf["DXF import<br/>[DxfParser.cs]"]
  node_step["3D unfolding"]
  node_parts["Part geometry<br/>[NoFitPolygon.cs]"]
end

subgraph group_nest["Nesting engine"]
  node_orchestrator["Nest orchestration<br/>[SvgNest.cs]"]
  node_genetic["Genetic search<br/>[Procreant.cs]"]
  node_placement["Placement worker"]
  node_nfp["No-fit geometry<br/>[NfpHelper.cs]"]
  node_minkowski["Minkowski operations<br/>[MinkowskiSum.cs]"]
  node_raster["Raster nesting"]
end

subgraph group_output["Layouts and output"]
  node_result["Nest results<br/>[NestResult.cs]"]
  node_layout["Sheet layouts<br/>[SheetPlacement.cs]"]
  node_common["Common-line cutting"]
  node_export["DXF export<br/>[DxfExporter.cs]"]
  node_report["PDF report<br/>[NestReportPdf.cs]"]
end

node_user(("Fabricator"))

node_user -->|"uses"| node_app
node_app -->|"opens"| node_project
node_project -.->|"saves recovery"| node_recovery
node_user -->|"imports drawings"| node_dxf
node_user -->|"imports 3D"| node_step
node_step -->|"joins parsed details"| node_dxf
node_dxf -->|"creates geometry"| node_parts
node_project -.->|"starts nesting"| node_orchestrator
node_orchestrator -->|"initializes search"| node_genetic
node_orchestrator -->|"creates service"| node_minkowski
node_genetic -->|"evaluates layouts"| node_placement
node_placement -->|"requests candidates"| node_nfp
node_nfp -->|"computes polygons"| node_minkowski
node_project -.->|"can run alternate nest"| node_raster
node_orchestrator -.->|"collects results"| node_result
node_result -.->|"provides layouts"| node_layout
node_user -->|"refines layout"| node_editing
node_editing -.->|"updates placements"| node_layout
node_layout -.->|"resolves shared cuts"| node_common
node_user -->|"exports cut files"| node_export
node_layout -->|"writes DXF"| node_export
node_user -->|"requests report"| node_report
node_layout -.->|"documents layout"| node_report

click node_app "https://github.com/manuelmrosa/sheetnest/blob/main/DeepNestSharp/App.xaml.cs"
click node_project "https://github.com/manuelmrosa/sheetnest/blob/main/DeepNestSharp.Domain/ViewModels/NestProjectViewModel.cs"
click node_recovery "https://github.com/manuelmrosa/sheetnest/blob/main/DeepNestSharp/Autosave.cs"
click node_dxf "https://github.com/manuelmrosa/sheetnest/blob/main/DeepNestLib.Core/IO/DxfParser.cs"
click node_step "https://github.com/manuelmrosa/sheetnest/blob/main/DeepNestLib.Core/IO/StepUnfoldService.cs"
click node_parts "https://github.com/manuelmrosa/sheetnest/blob/main/DeepNestLib.Core/NoFitPolygon.cs"
click node_orchestrator "https://github.com/manuelmrosa/sheetnest/blob/main/DeepNestLib.Core/SvgNest.cs"
click node_genetic "https://github.com/manuelmrosa/sheetnest/blob/main/DeepNestLib.Core/GeneticAlgorithm/Procreant.cs"
click node_placement "https://github.com/manuelmrosa/sheetnest/blob/main/DeepNestLib.Core/Placement/PartPlacementWorker.cs"
click node_nfp "https://github.com/manuelmrosa/sheetnest/blob/main/DeepNestLib.Core/Placement/NfpHelper.cs"
click node_minkowski "https://github.com/manuelmrosa/sheetnest/blob/main/DeepNestLib.Core/Placement/MinkowskiSum.cs"
click node_raster "https://github.com/manuelmrosa/sheetnest/blob/main/DeepNestSharp/RasterNest/SparrowNestService.cs"
click node_result "https://github.com/manuelmrosa/sheetnest/blob/main/DeepNestLib.Core/Placement/NestResult.cs"
click node_layout "https://github.com/manuelmrosa/sheetnest/blob/main/DeepNestLib.Core/Placement/SheetPlacement.cs"
click node_editing "https://github.com/manuelmrosa/sheetnest/blob/main/DeepNestSharp.Domain/ViewModels/SheetPlacementViewModel.cs"
click node_common "https://github.com/manuelmrosa/sheetnest/blob/main/DeepNestLib.Core/Placement/CommonLineGeometryResolver.cs"
click node_export "https://github.com/manuelmrosa/sheetnest/blob/main/DeepNestLib.Core/IO/DxfExporter.cs"
click node_report "https://github.com/manuelmrosa/sheetnest/blob/main/DeepNestSharp/Reports/NestReportPdf.cs"

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_project,node_recovery,node_editing toneBlue
class node_dxf,node_step,node_parts toneAmber
class node_orchestrator,node_genetic,node_placement,node_nfp,node_minkowski,node_raster toneMint
class node_result,node_layout,node_common,node_export,node_report toneRose
class node_user toneIndigo
```

## Components

### Project and UI

- [Desktop app](https://github.com/manuelmrosa/sheetnest/blob/main/DeepNestSharp/App.xaml.cs): `DeepNestSharp/App.xaml.cs`
- [Project and stock](https://github.com/manuelmrosa/sheetnest/blob/main/DeepNestSharp.Domain/ViewModels/NestProjectViewModel.cs): `DeepNestSharp.Domain/ViewModels/NestProjectViewModel.cs`
- [Autosave recovery](https://github.com/manuelmrosa/sheetnest/blob/main/DeepNestSharp/Autosave.cs): `DeepNestSharp/Autosave.cs`
- [Manual layout editing](https://github.com/manuelmrosa/sheetnest/blob/main/DeepNestSharp.Domain/ViewModels/SheetPlacementViewModel.cs): `DeepNestSharp.Domain/ViewModels/SheetPlacementViewModel.cs`

### Part import

- [DXF import](https://github.com/manuelmrosa/sheetnest/blob/main/DeepNestLib.Core/IO/DxfParser.cs): `DeepNestLib.Core/IO/DxfParser.cs`
- [3D unfolding](https://github.com/manuelmrosa/sheetnest/blob/main/DeepNestLib.Core/IO/StepUnfoldService.cs): `DeepNestLib.Core/IO/StepUnfoldService.cs`
- [Part geometry](https://github.com/manuelmrosa/sheetnest/blob/main/DeepNestLib.Core/NoFitPolygon.cs): `DeepNestLib.Core/NoFitPolygon.cs`

### Nesting engine

- [Nest orchestration](https://github.com/manuelmrosa/sheetnest/blob/main/DeepNestLib.Core/SvgNest.cs): `DeepNestLib.Core/SvgNest.cs`
- [Genetic search](https://github.com/manuelmrosa/sheetnest/blob/main/DeepNestLib.Core/GeneticAlgorithm/Procreant.cs): `DeepNestLib.Core/GeneticAlgorithm/Procreant.cs`
- [Placement worker](https://github.com/manuelmrosa/sheetnest/blob/main/DeepNestLib.Core/Placement/PartPlacementWorker.cs): `DeepNestLib.Core/Placement/PartPlacementWorker.cs`
- [No-fit geometry](https://github.com/manuelmrosa/sheetnest/blob/main/DeepNestLib.Core/Placement/NfpHelper.cs): `DeepNestLib.Core/Placement/NfpHelper.cs`
- [Minkowski operations](https://github.com/manuelmrosa/sheetnest/blob/main/DeepNestLib.Core/Placement/MinkowskiSum.cs): `DeepNestLib.Core/Placement/MinkowskiSum.cs`
- [Raster nesting](https://github.com/manuelmrosa/sheetnest/blob/main/DeepNestSharp/RasterNest/SparrowNestService.cs): `DeepNestSharp/RasterNest/SparrowNestService.cs`

### Layouts and output

- [Nest results](https://github.com/manuelmrosa/sheetnest/blob/main/DeepNestLib.Core/Placement/NestResult.cs): `DeepNestLib.Core/Placement/NestResult.cs`
- [Sheet layouts](https://github.com/manuelmrosa/sheetnest/blob/main/DeepNestLib.Core/Placement/SheetPlacement.cs): `DeepNestLib.Core/Placement/SheetPlacement.cs`
- [Common-line cutting](https://github.com/manuelmrosa/sheetnest/blob/main/DeepNestLib.Core/Placement/CommonLineGeometryResolver.cs): `DeepNestLib.Core/Placement/CommonLineGeometryResolver.cs`
- [DXF export](https://github.com/manuelmrosa/sheetnest/blob/main/DeepNestLib.Core/IO/DxfExporter.cs): `DeepNestLib.Core/IO/DxfExporter.cs`
- [PDF report](https://github.com/manuelmrosa/sheetnest/blob/main/DeepNestSharp/Reports/NestReportPdf.cs): `DeepNestSharp/Reports/NestReportPdf.cs`

### Other components

- **Fabricator**

## Connections

- Fabricator → Desktop app: uses
- Desktop app → Project and stock: opens (evidence: `DeepNestSharp/App.xaml.cs`)
- Project and stock → Autosave recovery: saves recovery
- Fabricator → DXF import: imports drawings
- Fabricator → 3D unfolding: imports 3D
- 3D unfolding → DXF import: joins parsed details (evidence: `DeepNestLib.Core/IO/StepUnfoldService.cs`)
- DXF import → Part geometry: creates geometry (evidence: `DeepNestLib.Core/NoFitPolygon.cs`)
- Project and stock → Nest orchestration: starts nesting
- Nest orchestration → Genetic search: initializes search (evidence: `DeepNestLib.Core/SvgNest.cs`)
- Nest orchestration → Minkowski operations: creates service (evidence: `DeepNestLib.Core/SvgNest.cs`)
- Genetic search → Placement worker: evaluates layouts
- Placement worker → No-fit geometry: requests candidates (evidence: `DeepNestLib.Core/Placement/PartPlacementWorker.cs`)
- No-fit geometry → Minkowski operations: computes polygons (evidence: `DeepNestLib.Core/Placement/NfpHelper.cs`)
- Project and stock → Raster nesting: can run alternate nest
- Nest orchestration → Nest results: collects results (evidence: `DeepNestLib.Core/SvgNest.cs`)
- Nest results → Sheet layouts: provides layouts
- Fabricator → Manual layout editing: refines layout
- Manual layout editing → Sheet layouts: updates placements
- Sheet layouts → Common-line cutting: resolves shared cuts
- Fabricator → DXF export: exports cut files
- Sheet layouts → DXF export: writes DXF (evidence: `DeepNestLib.Core/Placement/SheetPlacement.cs`)
- Fabricator → PDF report: requests report
- Sheet layouts → PDF report: documents layout
