Skip to main content

NGK

NGK is the Nales Geometry Kernel: an experiment in building a geometry kernel around generalized maps, or GMaps.

The project explores how geometric modeling operations can be represented by a combinatorial topological structure first, with geometry attached as payload data. In a GMap, shapes are decomposed into small topological elements called darts. Involutions link those darts across dimensions, so vertices, edges, faces, shells, and higher-dimensional cells are described by traversal through the map rather than by ad hoc mesh records. This makes operations such as sewing, unsewing, extrusion, and cell traversal explicit in the topology, while coordinates and geometric data stay layered on top.

This repository currently contains:

  • A Rust kernel under src/.
  • Python bindings built with Maturin.
  • WebAssembly bindings for browser experiments.
  • A React Three Fiber visualization app under visualization/.

NGK is pre-alpha software. The public API, file compatibility, and modeling coverage will change as the kernel evolves.

Python package

Install the minimal native package with:

pip install ngk

The optional OCP viewer bridge is kept out of the core dependency set. Install it when you want to display shapes through ocp_vscode:

pip install "ngk[ocp]"

The Python API follows the kernel's domain structure. ngk.modeling exposes edge, profile, face, sheet, and solid construction and operations: sweep, revolve, loft, rigid motion, blending, healing, edge splitting, and face and solid Booleans. Face Booleans and edge splits return one model together with all result handles. ngk.measurement exposes length, area, volume, centroid, and inertia. STEP text exchange is available under ngk.exchange.step.

The WASM binding exposes the same modeling, measurement, rigid-motion, and STEP text capabilities. Its browser API uses camel-case exports and omits filesystem-only STEP functions.

from ngk.geometry import Frame, Point, Vector
from ngk.modeling import booleans, solids
from ngk.viz import ocp

frame = Frame.from_xy(
    Point(0, 0, 0),
    Vector(1, 0, 0),
    Vector(0, 1, 0),
)
base = solids.block(40, 30, 20, frame=frame)
tool = solids.cylinder(8, 30)
result = booleans.cut(base, tool)

ocp.show(result)

ngk.viz.debug.show can send objects to the NGK debug viewer, but the viewer is not bundled with the wheel: start it separately from an NGK checkout before using that bridge.

The bindings are experimental and the kernel is not yet a complete build123d or OCCT replacement.

Experiments

The visualization playground is published with GitHub Pages:

https://jojain.github.io/ngk/

The NGK Sandbox is published from the same Pages site:

https://jojain.github.io/ngk/sandbox/

It displays small interactive experiments for inspecting generated geometry and topology-backed modeling operations. The app is intentionally a playground: it is useful for trying ideas, checking behavior visually, and making the kernel's internal structures easier to reason about.

Local Development

From the repository root, the Rust checks are:

cargo fmt
cargo clippy --all-targets --all-features
cargo test --all-targets --all-features

To run the visualization app locally:

cd visualization
npm install
npm run dev

See visualization/README.md for details about adding new experiments.

Python releases

Prepare the next version with the repository helper:

uv tool install --editable ./release
bump

To let the tool create the commit and annotated tag from a clean master checkout, use --release directly:

bump patch --release
git push origin master --follow-tags

The --release command changes Cargo.toml and pyproject.toml, refreshes uv.lock, commits those files, and creates vX.Y.Z; it never pushes or uploads to PyPI itself.

Architecture Notes

License

NGK is licensed under the MIT License. See LICENSE.

Metadata

Release files for ngk 0.0.11

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ngk 0.0.11
File Size Uploaded
ngk-0.0.11.tar.gz 1.5 MB Details

Built distributions (wheels)

Table of built distributions (wheels) for ngk 0.0.11
File
ngk-0.0.11-cp312-abi3-win_amd64.whl CPython 3.12 abi3 Windows x86-64 Details
ngk-0.0.11-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.12 abi3 Linux glibc 2.17+ x86-64 Details
ngk-0.0.11-cp312-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.12 abi3 Linux glibc 2.17+ ARM64 Details
ngk-0.0.11-cp312-abi3-macosx_11_0_arm64.whl CPython 3.12 abi3 macOS 11.0+ ARM64 Details
ngk-0.0.11-cp312-abi3-macosx_10_12_x86_64.whl CPython 3.12 abi3 macOS 10.12+ x86-64 Details

Total release size: 12.1 MB

Release files / ngk-0.0.11.tar.gz

Download URL ngk-0.0.11.tar.gz
Size 1.5 MB
Tags Source
SHA-256 checksum
How to use checksums
a424d225e51f328761a8f9e1c7ccdcb2b7b52495c2e9f8cee86e14403dabe98c
BLAKE2b-256 checksum
How to use checksums
a8d7f7875769b1e17d0c5c830996ff64d6e9c095233ca6d1ba15f82f7f3f600c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 12, 2026.

Transparency log

Release files / ngk-0.0.11-cp312-abi3-win_amd64.whl

Download URL ngk-0.0.11-cp312-abi3-win_amd64.whl
Size 2.2 MB
Tags CPython 3.12 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
1de5409f8f9f91201fca73ae08d09876ccbfdd487fe5b301866c8a9a97328310
BLAKE2b-256 checksum
How to use checksums
2f0c9a92c3ac8454d75816cb9226ce246c1a8886452c1e90f364bc4ebe14c4d5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 12, 2026.

Transparency log

Release files / ngk-0.0.11-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL ngk-0.0.11-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 2.2 MB
Tags CPython 3.12 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
159111fc8b76b5e45abdff47d6e9171eb2eb9de3c5375a8ccf0db7e47dbdc6cb
BLAKE2b-256 checksum
How to use checksums
46cc0d6ec142bca6f91d058024b8410d019d9e75495630b7ba76295c2c12acbd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 12, 2026.

Transparency log

Release files / ngk-0.0.11-cp312-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL ngk-0.0.11-cp312-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 2.0 MB
Tags CPython 3.12 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
e63c173e9f03d18141db506bc6038a8f4f24e34d889859d6ed772d251c4ccb87
BLAKE2b-256 checksum
How to use checksums
8c5d8adeeff3ab16d89744a3be5efb6faf1bf163cc4fdf21299dde1816904808
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 12, 2026.

Transparency log

Release files / ngk-0.0.11-cp312-abi3-macosx_11_0_arm64.whl

Download URL ngk-0.0.11-cp312-abi3-macosx_11_0_arm64.whl
Size 2.0 MB
Tags CPython 3.12 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
2192ceb9aa69433c1e635842be5f59061f01e8a6af7859f200d18a4f8558391e
BLAKE2b-256 checksum
How to use checksums
c46475711ee8d930e09965890684473232e770c2a92df43426106b2c1dc7cd39
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 12, 2026.

Transparency log

Release files / ngk-0.0.11-cp312-abi3-macosx_10_12_x86_64.whl

Download URL ngk-0.0.11-cp312-abi3-macosx_10_12_x86_64.whl
Size 2.2 MB
Tags CPython 3.12 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
03a5a0c28af2af7848d34c495f4f163ee35fd7c4b3c410549d157de6b41e864a
BLAKE2b-256 checksum
How to use checksums
f99cc80c9a86c304326d6d473b1300c2876c34a17e2a88031dd448a799696460
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 12, 2026.

Transparency log

Release history Release notifications | RSS feed

0.0.13

6 release files

0.0.12

6 release files

This release

0.0.11 This release

6 release files

0.0.9

6 release files

0.0.8

6 release files

0.0.7

6 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page