🧊

geokernel Computational Geometry in Mojo

An open-source computational geometry library written in pure Mojo. 3D primitives, transforms, intersections, booleans, meshing — built for clarity and learning, not just throughput. MIT licensed.

🐙 GitHub Free · MIT

What It Is

A geometry kernel — the layer underneath every CAD or BIM tool that owns points, lines, surfaces, intersections, and booleans. Most kernels are decades-old C++ codebases (OpenCASCADE, Parasolid, ACIS) that are powerful but heavy and hard to learn from. geokernel is a clean re-implementation in Mojo, prioritising readable algorithms and a small surface area over bottom-line performance — though Mojo's compilation model lets it stay competitive.

📐

Primitives & Transforms

Point, Vector, Line, Plane, AABB, Matrix3/4, Quaternion, Transform — the basic algebra every geometry layer needs, fully type-checked at compile time.

🔀

Booleans & Intersections

Line/line, line/surface, surface/surface intersections. Boolean union, intersection, difference. The hard part of every solid modeller, written to be read.

🔺

Meshing & Triangulation

Surface triangulation, slicing, extrusion. Build the kind of FEM-ready meshes typically locked behind commercial CAD kernels.

📚

Learning-First

Documented algorithms and small, single-responsibility files. If you've ever wanted to read how a geometry kernel actually works without first learning OpenCASCADE's 30-year archaeology, start here.

Technical Details

LanguageMojo (pure, no FFI)
ReplacesOpenCASCADE (C++) for projects that want a smaller, readable kernel
DependenciesNone at the kernel level
LicenseMIT
StatusEarly — public source, API still evolving

Read the source.

Fork it, file issues, send patches. Public repo, MIT licensed.