🕸️

topokernel Topology + Geometry Kernel in Mojo

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.

Coming Soon Free · MIT
geokernel is now part of topokernel

The geometry kernel previously published as geokernel now lives inside topokernel, so geometry and topology are developed, tested and released together.

Why It Exists

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.

Architecture

Topology layerVertex → Cluster hierarchy, adjacency and graphs, dictionaries and apertures, Euler operators, validation, serialisation
Geometry layerPrimitives and transforms, curves and NURBS surfaces, intersections, booleans, triangulation, healing, spatial indexes (formerly geokernel)
ViewerBuilt-in software rasteriser for quick 3D previews
PythonBindings in progress, aiming to let topologicpy-style code run on the Mojo kernel

What's Inside

📊

Topology Hierarchy

Vertex · Edge · Wire · Face · Shell · Cell · CellComplex · Cluster: the same hierarchy Topologic exposes, including non-manifold configurations.

🔗

Adjacency & Graphs

Walk neighbours, find shared boundaries and turn a model into a graph for spatial analysis. Export graphs to GraphML.

🏷️

Dictionaries & Apertures

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.

📐

Primitives & Transforms

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

〰️

Curves & NURBS

Lines, circles, NURBS curves and surfaces, lofting, offsetting and slicing.

🔀

Booleans & Intersections

Curve and surface intersections, distance queries, and boolean union, intersection and difference. The hard part of every solid modeller, written to be read.

🔺

Meshing & Healing

Surface triangulation, subdivision and topology healing, with BVH and k-d tree spatial indexes for fast lookups.

💾

File Formats

STEP, IFC, STL, OBJ and glTF for geometry, plus the library's own serialisation format for round-tripping full topology.

Technical Details

LanguageMojo 1.x (pure, no FFI in the kernel)
DependenciesNone beyond the Mojo toolchain
PlatformLinux x86-64 today (other platforms follow Mojo support)
ReplacesOpenCASCADE-based kernels, for projects that want a smaller, readable one
Inspired byTopologic · topologicpy
LicenseMIT
StatusIn active development; source not yet public and the API is still changing

Want a heads-up at release?

The public release of topokernel will be announced in the ModelTok newsletter.