One pure-Mojo library for non-manifold topology and the geometry underneath it. Inspired by Topologic, with no OpenCASCADE: vertices to cell complexes on top; points, NURBS, intersections, booleans and meshing below.
The geometry kernel previously published as geokernel now lives inside topokernel, so geometry and topology are developed, tested and released together.
Topologic is a powerful C++ library for non-manifold topology (vertices, edges, faces, cells and the relationships between them) and a popular open-source choice for parametric architectural modelling. The catch: it depends on OpenCASCADE, a massive CAD kernel that makes Topologic heavy and hard to build.
topokernel reimplements both halves in Mojo: its own geometry kernel instead of OpenCASCADE, and the Topologic topology model on top of it. Same concepts, a lighter footprint, and small, single-purpose source files you can actually read.
| Topology layer | Vertex → Cluster hierarchy, adjacency and graphs, dictionaries and apertures, Euler operators, validation, serialisation |
|---|---|
| Geometry layer | Primitives and transforms, curves and NURBS surfaces, intersections, booleans, triangulation, healing, spatial indexes (formerly geokernel) |
| Viewer | Built-in software rasteriser for quick 3D previews |
| Python | Bindings in progress, aiming to let topologicpy-style code run on the Mojo kernel |
Vertex · Edge · Wire · Face · Shell · Cell · CellComplex · Cluster: the same hierarchy Topologic exposes, including non-manifold configurations.
Walk neighbours, find shared boundaries and turn a model into a graph for spatial analysis. Export graphs to GraphML.
Attach key–value data to any element (material, IFC class, custom keys), plus Topologic-style apertures and contexts for openings such as doors and windows.
Point, Vector, Line, Plane, AABB, Matrix3/4, Quaternion and Transform: the basic algebra every geometry layer needs, type-checked at compile time.
Lines, circles, NURBS curves and surfaces, lofting, offsetting and slicing.
Curve and surface intersections, distance queries, and boolean union, intersection and difference. The hard part of every solid modeller, written to be read.
Surface triangulation, subdivision and topology healing, with BVH and k-d tree spatial indexes for fast lookups.
STEP, IFC, STL, OBJ and glTF for geometry, plus the library's own serialisation format for round-tripping full topology.
| Language | Mojo 1.x (pure, no FFI in the kernel) |
|---|---|
| Dependencies | None beyond the Mojo toolchain |
| Platform | Linux x86-64 today (other platforms follow Mojo support) |
| Replaces | OpenCASCADE-based kernels, for projects that want a smaller, readable one |
| Inspired by | Topologic · topologicpy |
| License | MIT |
| Status | In active development; source not yet public and the API is still changing |
The public release of topokernel will be announced in the ModelTok newsletter.