Skip to main content

geometrykit

OCC-free NURBS geometry for the ifckit family: value types (Vec, Plane, Line, Arc, Polyline, Path, Curve, Surface), NURBS evaluation / tangents / normals / projection, energy-minimising patch fills with G1/G2 continuity options, plane × surface sections with pcurve tracks, and STEP/OBJ/STL writers. No OCCT, no compiled toolchain required to install.

Tests PyPI Docs

API reference: maucworks.github.io/geometrykit (pdoc, generated from the docstrings)

Install

pip install geometrykit   # Python >= 3.9, incl. Rhino 8's CPython 3.9

Binary wheels (cp39-abi3) carry the compiled Rust core (geometrykit._rust) where a platform build exists, and the public API routes to it automatically. Platforms without a matching wheel get the pure-Python/numpy mirror instead: same API, same results, slower. GEOMETRYKIT_ENGINE=npu forces the mirror; the default prefers the accelerator when importable.

Quickstart

from geometrykit import engine
from geometrykit.geometry import Curve, Surface
from geometrykit.geometry.primitives import Vec

curves = [
    Curve.from_tangents(start=Vec(0, 0, 2.4), tan_start=Vec(1, 0, 0),
                        end=Vec(8, 0, 2.8), tan_end=Vec(1, 0, 0), scale=3.0),
    Curve.from_tangents(start=Vec(8, 0, 2.8), tan_start=Vec(0, 1, 0),
                        end=Vec(8, 6, 2.9), tan_end=Vec(0, 1, 0), scale=3.0),
    Curve.from_tangents(start=Vec(0, 6, 3.2), tan_start=Vec(1, 0, 0),
                        end=Vec(8, 6, 2.9), tan_end=Vec(1, 0, 0), scale=3.0),
    Curve.from_tangents(start=Vec(0, 6, 3.2), tan_start=Vec(0, -1, 0),
                        end=Vec(0, 0, 2.4), tan_end=Vec(0, -1, 0), scale=3.0),
]
surface = Surface.patch(curves, fill="energy", nu=16, nv=16, tangency=0.75)
proj, (u, v) = surface.project(Vec(-1.0, -1.0, 3.0))
print(engine.engine(), proj, (u, v))

What is in here

  • NURBS evaluation, analytic tangents and normals, closest-point projection (kernel Newton, no OCC).
  • Energy-minimising patch fill over a boundary ring (Surface.patch(..., fill="energy")), with tangency strength and optional G2 and adaptive re-fit.
  • Plane × surface sections with parameter tracks, batch level sets, and node-exact diagrid weaving.
  • Writers: STEP (AP214 B-rep), OBJ, STL.
  • geometrykit-core on crates.io: the same kernels as a pure-Rust dependency (no bindings, no unsafe code).

Out of scope by design: B-rep booleans and tolerant topology (volumes are OCCT's domain); IFC serialisation lives in ifckit.

Development

python3 -m venv .venv && .venv/bin/pip install -e ".[dev]"
.venv/bin/python -m pytest tests/ -q
GEOMETRYKIT_ENGINE=npu .venv/bin/python -m pytest tests/ -q
GEOMETRYKIT_ENGINE=rust .venv/bin/python -m pytest tests/ -q

The oracle tier checks the kernel against OCCT and stays local (pythonocc-core is conda-only; see AGENTS.md). Every suite train runs in both engine configurations before a commit lands.

Licensing

LGPL-3.0-or-later (COPYING.LESSER, COPYING). Kernel code promoted from ifckit's geometry package carries a provenance header recording its origin.

Metadata

Release files for geometrykit 0.6.1

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

Source distribution (sdist)

Source distribution for geometrykit 0.6.1
File Size Uploaded Provenance Actions
geometrykit-0.6.1.tar.gz 190.3 kB Without provenance Details for geometrykit-0.6.1.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for geometrykit 0.6.1
File Actions
geometrykit-0.6.1-py3-none-any.whl Python 3 none any Details for geometrykit-0.6.1-py3-none-any.whl
geometrykit-0.6.1-cp39-abi3-win_amd64.whl CPython 3.9 abi3 Windows x86-64 Details for geometrykit-0.6.1-cp39-abi3-win_amd64.whl
geometrykit-0.6.1-cp39-abi3-manylinux_2_28_x86_64.whl CPython 3.9 abi3 Linux glibc 2.28+ x86-64 Details for geometrykit-0.6.1-cp39-abi3-manylinux_2_28_x86_64.whl
geometrykit-0.6.1-cp39-abi3-manylinux_2_28_aarch64.whl CPython 3.9 abi3 Linux glibc 2.28+ ARM64 Details for geometrykit-0.6.1-cp39-abi3-manylinux_2_28_aarch64.whl
geometrykit-0.6.1-cp39-abi3-macosx_11_0_x86_64.whl CPython 3.9 abi3 macOS 11.0+ x86-64 Details for geometrykit-0.6.1-cp39-abi3-macosx_11_0_x86_64.whl
geometrykit-0.6.1-cp39-abi3-macosx_11_0_arm64.whl CPython 3.9 abi3 macOS 11.0+ ARM64 Details for geometrykit-0.6.1-cp39-abi3-macosx_11_0_arm64.whl

Total release size: 2.8 MB

Release files / geometrykit-0.6.1.tar.gz

Download URL geometrykit-0.6.1.tar.gz
Size 190.3 kB
Tags Source
SHA-256 checksum
How to use checksums
93f0707870d5fcd8e788cf4e066ef9681cb1e02b29aaf42654d7b3747065dd38
BLAKE2b-256 checksum
How to use checksums
67be190457a7e859a9ddc0fe30574db9b658c6c4c2b35e03e8f783c53b487546
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.16

Release files / geometrykit-0.6.1-py3-none-any.whl

Download URL geometrykit-0.6.1-py3-none-any.whl
Size 196.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f050ff10cbb1433da96c5ceb0e6e3d067c9b6bb4906e6a8287fb88aeb5bc57a8
BLAKE2b-256 checksum
How to use checksums
61996c493459bbadcc981465597da7a5991ed89d19fe9494aea650b5cfbc0d57
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.16

Release files / geometrykit-0.6.1-cp39-abi3-win_amd64.whl

Download URL geometrykit-0.6.1-cp39-abi3-win_amd64.whl
Size 392.2 kB
Tags CPython 3.9 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
ed19c6a23cc939ad4854c7c9b9a0afcf7d0341295b1dec7f246bf4e68e1bec7e
BLAKE2b-256 checksum
How to use checksums
0b71c7cf8e7d93029e3e6244cf25db4393150b1f4a132fe09faabfd65ade84fb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.16

Release files / geometrykit-0.6.1-cp39-abi3-manylinux_2_28_x86_64.whl

Download URL geometrykit-0.6.1-cp39-abi3-manylinux_2_28_x86_64.whl
Size 515.6 kB
Tags CPython 3.9 Linux glibc 2.28+ x86-64 abi3
SHA-256 checksum
How to use checksums
9f983da9ff612b78cfbdfd58df855492f572937419b8a975b44e1c2e441f7465
BLAKE2b-256 checksum
How to use checksums
aa2aa94dc80fe536e869a31d0aee49a18a47347faa768c9d6bd7d126434fdca3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.16

Release files / geometrykit-0.6.1-cp39-abi3-manylinux_2_28_aarch64.whl

Download URL geometrykit-0.6.1-cp39-abi3-manylinux_2_28_aarch64.whl
Size 508.9 kB
Tags CPython 3.9 Linux glibc 2.28+ ARM64 abi3
SHA-256 checksum
How to use checksums
fb196468d67eb71efb6c52c180cf19bddc77702787afa856267236e7274e79b5
BLAKE2b-256 checksum
How to use checksums
fbdd8796279227a9d89f5eef1ab567babc2ba03f71db81d94fe7faef35c49b0d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.16

Release files / geometrykit-0.6.1-cp39-abi3-macosx_11_0_x86_64.whl

Download URL geometrykit-0.6.1-cp39-abi3-macosx_11_0_x86_64.whl
Size 490.4 kB
Tags CPython 3.9 abi3 macOS 11.0+ x86-64
SHA-256 checksum
How to use checksums
8f4842762e774cf2476d6a94ffd8c29694f98ecb581f578576b3c4641dc8cde1
BLAKE2b-256 checksum
How to use checksums
6982ebbc43c2c60bb9b8c803edbfc5b1fd637ffa7a5f214aaae90fee37f0a8a6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.16

Release files / geometrykit-0.6.1-cp39-abi3-macosx_11_0_arm64.whl

Download URL geometrykit-0.6.1-cp39-abi3-macosx_11_0_arm64.whl
Size 482.2 kB
Tags CPython 3.9 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
a70c5119fda3af50c7f5f54f3533cc2792a84089620e6c00e8c35f1937ef3042
BLAKE2b-256 checksum
How to use checksums
a80de5a31ca56deccf01534c1c09783dd2598557eb8975cf86beb32c00f8a78b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.16

Security for geometrykit 0.6.1

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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