GeometryKit began as a companion kit for Keenan Crane's Discrete Differential Geometry course. It is now growing to serve a specific engineering need: a host-neutral, double-precision C# toolkit for understanding and preparing derived triangle meshes before they move back into a CAD, analysis, or fabrication workflow.
Current state: an early, usable foundation. GeometryKit supplies analysis and support geometry; it is not a B-Rep CAD kernel or an authoritative document model.
GeometryKit turns a triangle mesh into reliable derived information without taking ownership of the original CAD model. Its initial C# foundation provides:
- mesh health reports for invalid indices, degeneracy, boundary and non-manifold conditions;
- spatial queries for closest-point projection and ray intersections;
- discrete surface fields, including Gaussian-curvature and graph-geodesic calculations;
- fabrication-support outputs: plane-section segments and curvature-driven target edge lengths.
This makes it suitable as a portable geometry layer between a host application and mesh-based operations. A CAD host remains responsible for B-Reps, feature history, exact editing and exchange formats.
| Area | Role | Status |
|---|---|---|
src/csharp/GeometryKit |
Primary reusable .NET library | Foundation |
src/csharp/GeometryKit.Tests |
Executable workflow specifications | Foundation |
| C# DDG companion | Course implementations and examples | Reference / partial |
| C++ DDG companion | Course implementations, tests and examples | Reference / partial |
| Python and web workbench | Inspection and interactive learning tools | Supported reference |
The original DDG companion remains in the repository because it explains the mathematical lineage and provides experiments that inform GeometryKit. It is not the public API of the toolkit.
dotnet test src/csharp/GeometryKit.Tests/GeometryKit.Tests.csprojA minimal C# workflow:
using GeometryKit.Core;
using GeometryKit.Mesh;
var mesh = new TriangleMesh(vertices, triangles);
var health = MeshHealthAnalyzer.Analyse(mesh);
var index = new MeshSpatialIndex(mesh);
var point = index.ClosestPoint(queryPoint);See the GeometryKit overview for the implemented workflows, mathematical assumptions and architecture decisions.
src/csharp/GeometryKit/ Primary C# geometry toolkit
src/csharp/GeometryKit.Tests/ Tests for public GeometryKit workflows
src/csharp/ Original DDG course companion (reference implementation)
src/cpp/ Original C++ DDG course companion
src/wasm/ WASM bindings and build configuration
docs/geometrykit/ Toolkit architecture and mathematics
docs/ DDG notes, formulas, tutorials and project status
examples/ Example usage notes and Python helper script
web/ Interactive scientific workbench and legacy WASM pages
- GeometryKit overview
- GeometryKit architecture decisions
- GeometryKit mathematics
- DDG documentation index
- Implementation audit
- Stabilise the current public mesh and spatial-query API.
- Add adapters for established mesh tooling without exposing their types publicly.
- Add sparse-solver-backed heat geodesics and tolerance-aware section stitching.
- Add constrained remeshing driven by the generated sizing fields.
See CONTRIBUTING.md for build/test workflow, contribution expectations and documentation standards.
MIT (LICENSE).