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.

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.5.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.5.1
File Size Uploaded Provenance Actions
geometrykit-0.5.1.tar.gz 183.0 kB Without provenance Details for geometrykit-0.5.1.tar.gz

Built distributions (wheels)

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

Total release size: 2.5 MB

Release files / geometrykit-0.5.1.tar.gz

Download URL geometrykit-0.5.1.tar.gz
Size 183.0 kB
Tags Source
SHA-256 checksum
How to use checksums
02251913138aa844c849c717bdf4be68aed4b769dd2f8d77d5f43e4a497c0083
BLAKE2b-256 checksum
How to use checksums
60d5ed6b179f12b8a46c34c494a2d860ee024c52397c05b6630a44a9b4d392b0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.15

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

Download URL geometrykit-0.5.1-py3-none-any.whl
Size 188.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
88650971bc253e2a6f8e2c0f0232f37cec17849fe04b6de72395dd07af1a9a4b
BLAKE2b-256 checksum
How to use checksums
1f3dd1a4de7d7b56ce263fd4499cff9aa4cb836df2eb69395e7672316c341452
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.15

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

Download URL geometrykit-0.5.1-cp39-abi3-win_amd64.whl
Size 350.1 kB
Tags CPython 3.9 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
d0b7ac7a2a33c7396f1076937c3dc8758a0409903fbd0ec4500b03066b0146a8
BLAKE2b-256 checksum
How to use checksums
39c6bc147fe8956b61f468b0d9e530d2c6227244b8239e39fc3b0c16e1645095
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.15

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

Download URL geometrykit-0.5.1-cp39-abi3-manylinux_2_28_x86_64.whl
Size 466.9 kB
Tags CPython 3.9 Linux glibc 2.28+ x86-64 abi3
SHA-256 checksum
How to use checksums
bf4375bbc7e3bdd1b6f1780c2ed0ae549b58a4b188c8de3f7eefca19c8150d29
BLAKE2b-256 checksum
How to use checksums
4f83ba47d3a32bbb1a26a73d11fd553e2ed545896cc6d820e7cccfa47e3edbfa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.15

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

Download URL geometrykit-0.5.1-cp39-abi3-manylinux_2_28_aarch64.whl
Size 461.8 kB
Tags CPython 3.9 Linux glibc 2.28+ ARM64 abi3
SHA-256 checksum
How to use checksums
196138d904d51cbb19d0a19ad4864daee8e153a9a62ddb5b639dee26dfa04b66
BLAKE2b-256 checksum
How to use checksums
8886166e7b67fb3cdb74f2ef571341e5974153fd1dfe0018a7e7cfb98ad38c02
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.15

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

Download URL geometrykit-0.5.1-cp39-abi3-macosx_11_0_x86_64.whl
Size 447.6 kB
Tags CPython 3.9 abi3 macOS 11.0+ x86-64
SHA-256 checksum
How to use checksums
030a64b1bce015a79a3c3e54fb6f0548820b58b1a533d861e464b485dae1c4c8
BLAKE2b-256 checksum
How to use checksums
9bd46eae511f5b334f77ba12b7056900d6f511d9e820495677e5a9fe4812fa7b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.15

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

Download URL geometrykit-0.5.1-cp39-abi3-macosx_11_0_arm64.whl
Size 440.5 kB
Tags CPython 3.9 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
8ae73b7b4bcad0621c5e269fa11fbf5e8faa600fbae7ab1315d063e3c20fe053
BLAKE2b-256 checksum
How to use checksums
a5f3769cb5a0d5ce209e04d87a0c2ddd6dd180c4b641d51fe41c5a2682dbc83d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.15

Security for geometrykit 0.5.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