ironstream (Python bindings)
PyO3 bindings for the IronStream CAD geometry kernel — a from-scratch, zero-dependency Rust port of OpenCascade.
This is one of three consumption paths off the IronStream kernel (the other two — native Rust and a WASM/TypeScript export — live elsewhere). It mirrors the kernel's OCCT-shaped prelude, in the spirit of pyOCCT: symbols are available both flat and under OCCT-style submodules.
import ironstream as ist
box = ist.make_box(ist.Pnt(0, 0, 0), 20, 20, 20)
hole = ist.make_cylinder(5, 20)
part = ist.cut(box, hole)
print(part.volume())
with open("part.stl", "wb") as f:
f.write(ist.write_binary_stl(part.mesh()))
pyOCCT-style namespaces are also available:
from ironstream.gp import Pnt
from ironstream.prim import make_box
from ironstream.algo import cut
Layout
| Namespace | Contents |
|---|---|
ironstream.gp |
Pnt (Vec3, Point3), Ax1, Trsf |
ironstream.topods |
Vertex, Wire, Face, Solid, Compound |
ironstream.mesh |
TriMesh, BBox |
ironstream.prim |
make_box/cylinder/cone/sphere/torus/prism/revol, MeshParams |
ironstream.builder |
make_polygon, make_face, make_face_with_holes, transform |
ironstream.algo |
fuse, cut, common, fuse_all |
ironstream.io |
write_binary_stl, write_ascii_stl, write_step |
Development
Requires a Rust toolchain and maturin. The kernel is
pulled in as a local path dependency (../ironstream), so clone both repos as
siblings.
uv venv
maturin develop # builds the kernel + binding, installs into the venv
python -c "import ironstream; print(ironstream.make_box(ironstream.Pnt(0,0,0),1,1,1).volume())"
Build a distributable wheel with maturin build --release.
Pyodide / WebAssembly
The binding also builds as a Pyodide wheel (~140 KB) that runs the whole kernel in the browser — this powers the live demo on the IronStream project page:
chmod +x scripts/build_pyodide_wheel.sh
./scripts/build_pyodide_wheel.sh # -> dist/cadbuildr_ironstream-*-emscripten_*_wasm32.whl
The script pins the full toolchain (pyodide xbuildenv 0.29.4, emscripten 4.0.9, rust nightly-2025-02-01 + pyodide's wasm-eh sysroot) and documents why each pin exists. Load it in a page with:
const { loadPyodide } = await import("https://cdn.jsdelivr.net/pyodide/v0.29.4/full/pyodide.mjs");
const py = await loadPyodide({ indexURL: "https://cdn.jsdelivr.net/pyodide/v0.29.4/full/" });
await py.loadPackage("<url of the .whl>");
py.runPython(`import ironstream as ist; print(ist.make_sphere(10).volume())`);
Release files for cadbuildr.ironstream 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| cadbuildr_ironstream-0.1.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl | CPython 3.9 | abi3 | Linux glibc 2.17+ x86-64 | Details |
| cadbuildr_ironstream-0.1.0-cp39-abi3-macosx_11_0_arm64.whl | CPython 3.9 | abi3 | macOS 11.0+ ARM64 | Details |
Total release size: 787.6 kB
Release files / cadbuildr_ironstream-0.1.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | cadbuildr_ironstream-0.1.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 441.0 kB |
| Tags | CPython 3.9 Linux glibc 2.17+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
91508cf03081def5388dc2e5e2e5cb593f292f15d6d85b7ab284c50a52f2b0b8
|
|
BLAKE2b-256 checksum How to use checksums |
71542c1408d90341a3373de1890e9b2c7d0cd104539299c2037d30ddd058081e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jul 4, 2026.
Transparency logRelease files / cadbuildr_ironstream-0.1.0-cp39-abi3-macosx_11_0_arm64.whl
| Download URL | cadbuildr_ironstream-0.1.0-cp39-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 346.6 kB |
| Tags | CPython 3.9 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
734ad3ff4b2a97cdfd1f0f4342bd3e515cc5a91f58b44d7cbe5a8f314e65d026
|
|
BLAKE2b-256 checksum How to use checksums |
ac032e8ffabd5821ed55c21d09418f49d410c8c599460c918910d5e79f9c4b01
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jul 4, 2026.
Transparency log