# leap71/leap71_shapekernel architecture

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

- Interactive diagram: https://gitdiagram.com/leap71/leap71_shapekernel
- Repository: https://github.com/leap71/leap71_shapekernel

## Overview

ShapeKernel is a geometry-modeling library that bridges PicoGK operations and application-specific computational engineering models. The principal workflow is to define shapes and their spatial/parametric inputs, combine or transform geometry, produce voxel or lattice representations, then export or preview results. The tree and README establish those capabilities; sampled source confirms shape meshing, frame and modulation support, lattice construction, and viewer output. The central Sh functions and several geometry operations were not sampled, so their internal call wiring is left unspecified.

Main entry points: [`ShapeKernel/BaseShapes`](https://github.com/leap71/leap71_shapekernel/tree/main/ShapeKernel/BaseShapes) (Base shapes), [`ShapeKernel/Functions/ShBasicFunctions.cs`](https://github.com/leap71/leap71_shapekernel/blob/main/ShapeKernel/Functions/ShBasicFunctions.cs) (Shape API), [`ShapeKernel/Functions/ShLatticeFunctions.cs`](https://github.com/leap71/leap71_shapekernel/blob/main/ShapeKernel/Functions/ShLatticeFunctions.cs) (Lattice functions), [`ShapeKernel/Visualizations/ShPreviewFunctions_I.cs`](https://github.com/leap71/leap71_shapekernel/blob/main/ShapeKernel/Visualizations/ShPreviewFunctions_I.cs) (Preview functions)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_shape["Shape modeling"]
  node_shapes["Base shapes"]
  node_lattices["Lattice shapes<br/>[LatticeManifold.cs]"]
end

subgraph group_param["Parametric inputs"]
  node_frames["Frames"]
  node_splines["Splines"]
  node_modulation["Modulation"]
end

subgraph group_ops["Geometry operations"]
  node_shapi["Shape API"]
  node_combined["Boolean and offset"]
  node_implicit["Implicit utilities<br/>[ImplicitUtility.cs]"]
  node_voxel["Voxel functions"]
  node_latticeapi["Lattice functions"]
  node_utilities["Geometry utilities"]
end

subgraph group_output["Output and visualization"]
  node_export["Export functions"]
  node_preview["Preview functions"]
  node_visuals["Visualization tools"]
end

node_engineer(("CEM engineer"))
node_pico{{"PicoGK"}}

node_engineer -->|"defines geometry"| node_shapi
node_shapi -->|"creates shapes"| node_shapes
node_shapes -->|"uses frames"| node_frames
node_shapes -->|"uses profiles"| node_modulation
node_frames -->|"reparameterizes paths"| node_splines
node_engineer -->|"requests operations"| node_combined
node_combined -->|"boolean and offset"| node_pico
node_shapi -->|"uses implicit tools"| node_implicit
node_engineer -->|"requests voxelization"| node_voxel
node_voxel -->|"produces voxels"| node_pico
node_engineer -->|"defines lattice"| node_latticeapi
node_latticeapi -->|"builds lattice shapes"| node_lattices
node_latticeapi -->|"creates lattice"| node_pico
node_engineer -->|"requests export"| node_export
node_export -->|"exports geometry"| node_pico
node_engineer -->|"requests preview"| node_preview
node_preview -->|"adds viewer objects"| node_pico
node_preview -->|"uses visualization"| node_visuals
node_shapes -->|"uses geometry helpers"| node_utilities

click node_shapes "https://github.com/leap71/leap71_shapekernel/tree/main/ShapeKernel/BaseShapes"
click node_frames "https://github.com/leap71/leap71_shapekernel/tree/main/ShapeKernel/Frames"
click node_splines "https://github.com/leap71/leap71_shapekernel/tree/main/ShapeKernel/Splines"
click node_modulation "https://github.com/leap71/leap71_shapekernel/tree/main/ShapeKernel/Modulations"
click node_shapi "https://github.com/leap71/leap71_shapekernel/blob/main/ShapeKernel/Functions/ShBasicFunctions.cs"
click node_combined "https://github.com/leap71/leap71_shapekernel/blob/main/ShapeKernel/Functions/ShCombinedFunctions.cs"
click node_implicit "https://github.com/leap71/leap71_shapekernel/blob/main/ShapeKernel/Utilities/ImplicitUtility.cs"
click node_voxel "https://github.com/leap71/leap71_shapekernel/blob/main/ShapeKernel/Functions/ShVoxelFunctions.cs"
click node_latticeapi "https://github.com/leap71/leap71_shapekernel/blob/main/ShapeKernel/Functions/ShLatticeFunctions.cs"
click node_lattices "https://github.com/leap71/leap71_shapekernel/blob/main/ShapeKernel/BaseShapes/LatticeManifold.cs"
click node_export "https://github.com/leap71/leap71_shapekernel/blob/main/ShapeKernel/Functions/ShExportFunctions.cs"
click node_preview "https://github.com/leap71/leap71_shapekernel/blob/main/ShapeKernel/Visualizations/ShPreviewFunctions_I.cs"
click node_visuals "https://github.com/leap71/leap71_shapekernel/tree/main/ShapeKernel/Visualizations"
click node_utilities "https://github.com/leap71/leap71_shapekernel/tree/main/ShapeKernel/Utilities"

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_shapes,node_lattices toneBlue
class node_frames,node_splines,node_modulation toneAmber
class node_shapi,node_combined,node_implicit,node_voxel,node_latticeapi,node_utilities toneMint
class node_export,node_preview,node_visuals toneRose
class node_engineer,node_pico toneIndigo
```

## Components

### Shape modeling

- [Base shapes](https://github.com/leap71/leap71_shapekernel/tree/main/ShapeKernel/BaseShapes): `ShapeKernel/BaseShapes`
- [Lattice shapes](https://github.com/leap71/leap71_shapekernel/blob/main/ShapeKernel/BaseShapes/LatticeManifold.cs): `ShapeKernel/BaseShapes/LatticeManifold.cs`

### Parametric inputs

- [Frames](https://github.com/leap71/leap71_shapekernel/tree/main/ShapeKernel/Frames): `ShapeKernel/Frames`
- [Splines](https://github.com/leap71/leap71_shapekernel/tree/main/ShapeKernel/Splines): `ShapeKernel/Splines`
- [Modulation](https://github.com/leap71/leap71_shapekernel/tree/main/ShapeKernel/Modulations): `ShapeKernel/Modulations`

### Geometry operations

- [Shape API](https://github.com/leap71/leap71_shapekernel/blob/main/ShapeKernel/Functions/ShBasicFunctions.cs): `ShapeKernel/Functions/ShBasicFunctions.cs`
- [Boolean and offset](https://github.com/leap71/leap71_shapekernel/blob/main/ShapeKernel/Functions/ShCombinedFunctions.cs): `ShapeKernel/Functions/ShCombinedFunctions.cs`
- [Implicit utilities](https://github.com/leap71/leap71_shapekernel/blob/main/ShapeKernel/Utilities/ImplicitUtility.cs): `ShapeKernel/Utilities/ImplicitUtility.cs`
- [Voxel functions](https://github.com/leap71/leap71_shapekernel/blob/main/ShapeKernel/Functions/ShVoxelFunctions.cs): `ShapeKernel/Functions/ShVoxelFunctions.cs`
- [Lattice functions](https://github.com/leap71/leap71_shapekernel/blob/main/ShapeKernel/Functions/ShLatticeFunctions.cs): `ShapeKernel/Functions/ShLatticeFunctions.cs`
- [Geometry utilities](https://github.com/leap71/leap71_shapekernel/tree/main/ShapeKernel/Utilities): `ShapeKernel/Utilities`

### Output and visualization

- [Export functions](https://github.com/leap71/leap71_shapekernel/blob/main/ShapeKernel/Functions/ShExportFunctions.cs): `ShapeKernel/Functions/ShExportFunctions.cs`
- [Preview functions](https://github.com/leap71/leap71_shapekernel/blob/main/ShapeKernel/Visualizations/ShPreviewFunctions_I.cs): `ShapeKernel/Visualizations/ShPreviewFunctions_I.cs`
- [Visualization tools](https://github.com/leap71/leap71_shapekernel/tree/main/ShapeKernel/Visualizations): `ShapeKernel/Visualizations`

### Other components

- **CEM engineer**
- **PicoGK**

## Connections

- CEM engineer → Shape API: defines geometry
- Shape API → Base shapes: creates shapes
- Base shapes → Frames: uses frames
- Base shapes → Modulation: uses profiles
- Frames → Splines: reparameterizes paths
- CEM engineer → Boolean and offset: requests operations
- Boolean and offset → PicoGK: boolean and offset
- Shape API → Implicit utilities: uses implicit tools
- CEM engineer → Voxel functions: requests voxelization
- Voxel functions → PicoGK: produces voxels
- CEM engineer → Lattice functions: defines lattice
- Lattice functions → Lattice shapes: builds lattice shapes
- Lattice functions → PicoGK: creates lattice
- CEM engineer → Export functions: requests export
- Export functions → PicoGK: exports geometry
- CEM engineer → Preview functions: requests preview
- Preview functions → PicoGK: adds viewer objects
- Preview functions → Visualization tools: uses visualization
- Base shapes → Geometry utilities: uses geometry helpers
