Skip to main content

Python bindings for Geometer CAD geometry operations

Project description

Geometer

Focused C++ geometry library, CLI, Python package, and WASM interface built on OCCT. Geometer provides generic CAD/kernel operations for STEP-to-GLB conversion, STEP HLR projection, exact planar STEP synthesis, planar contouring, and packed planar boolean work.

Documentation

Build And Validate

uv sync --group dev
cmake --preset default
cmake --build build --config Release
uv run pytest tests/L99_release -q
uv run python scripts/validate_native.py
uv run python scripts/validate_python_package.py

Native artifacts are copied to dist/native/<platform>/. Root-level dist/geometer* artifacts are intentionally not produced.

Build WASM artifacts:

python scripts/build_wasm.py

WASM artifacts are copied to:

  • dist/wasm/browser/
  • dist/wasm/node-test/
  • dist/wasm/planar-browser/

Python Package

PyPI distribution: wn-geometer

Import package: geometer

Install the current release:

python -m pip install wn-geometer==2026.6.9

Basic Python use:

from pathlib import Path
import geometer

version = geometer.version()
projection = geometer.project_step_hlr(
    Path("part.step"),
    views=[geometer.ProjectionView.top()],
)
glb_bytes = geometer.step_to_glb(Path("part.step"))
step_bytes = geometer.planar_step(
    {
        "schema": "geometry.planar_step.request.a0",
        "units": "mm",
        "bodies": [
            {
                "id": "copper",
                "thickness_mm": 0.035,
                "regions": [
                    {
                        "outer": {
                            "points": [[0, 0], [10, 0], [10, 5], [0, 5]],
                            "segments": [{"kind": "line"}] * 4,
                        }
                    }
                ],
            }
        ],
    }
)
geometer.write_planar_step(
    {
        "schema": "geometry.planar_step.request.a0",
        "units": "mm",
        "bodies": [
            {
                "id": "copper",
                "thickness_mm": 0.035,
                "fuse_regions": True,
                "regions": [
                    {
                        "outer": {
                            "points": [[0, 0], [10, 0], [10, 5], [0, 5]],
                            "segments": [{"kind": "line"}] * 4,
                        }
                    }
                ],
            }
        ],
    },
    "layer.step",
)

The package is executable-backed. Wheels bundle the platform executable under geometer/native/<platform>/, expose a geometer console command in the install environment, and call the executable through the JSON batch CLI.

CLI

geometer --version
geometer step-to-glb input.step output.glb
geometer step-project-hlr input.step output.json
geometer step-project-svg input.step output.svg --mode outline --view top
geometer planar-step planar-step-request.json output.step
geometer init-request request.json --step input.step --operation step_hlr_projection_json --output output.json
geometer run request.json response.json

Examples

  • examples/python/step_hlr_svg.py - no-GUI package example that writes HLR projection JSON, SVG, and GLB outputs.
  • examples/python/pyvista_hlr_viewer.py - PyVista/Qt STEP 3D + HLR preview.
  • examples/wasm/embedded_model_viewer.html - browser viewer using prepared GLB fixtures and the WASM HLR worker.
  • dist/wasm/demos/hlr_demo.html and dist/wasm/demos/planar_ring_solver_demo.html - one-file standalone browser demos for release review.
  • examples/cpp/ - native Dear ImGui + SDL3 + OpenGL HLR preview.

Serve browser examples from the repo root:

python -m http.server 8123 --bind 127.0.0.1

Open http://127.0.0.1:8123/examples/wasm/embedded_model_viewer.html.

The dist/wasm/demos/*.html files can also be opened directly from disk after running python scripts/build_wasm.py and the demo bake scripts.

Release

Geometer uses date-based releases per ADR 006:

  • Git tag: vYYYY-MM-DD
  • PyPI/CMake version: YYYY.M.D
  • C ABI generation: YYYYMMDD

Same-day follow-up releases append a serial to the tag and package version, for example v2026-05-24-2 and 2026.5.24.2. The C ABI generation stays at YYYYMMDD unless the C ABI generation itself changes.

Before tagging, run the L99 release gate plus native and package validation:

uv sync --group dev
uv run pytest tests/L99_release -q
uv run python scripts/validate_native.py
uv run python scripts/validate_python_package.py

The repository declares the python-native-wasm Wavenumber development standards profile. Lightweight CI runs the L99 gate on Ubuntu, Windows, and macOS. Full native/WASM rebuilds remain explicit validation steps because fresh OCCT and Emscripten dependency builds are expensive.

License

MIT. See LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

wn_geometer-2026.6.9-py3-none-win_amd64.whl (7.1 MB view details)

Uploaded Python 3Windows x86-64

wn_geometer-2026.6.9-py3-none-manylinux_2_39_x86_64.whl (13.5 MB view details)

Uploaded Python 3manylinux: glibc 2.39+ x86-64

wn_geometer-2026.6.9-py3-none-manylinux_2_39_aarch64.whl (12.9 MB view details)

Uploaded Python 3manylinux: glibc 2.39+ ARM64

wn_geometer-2026.6.9-py3-none-macosx_11_0_arm64.whl (10.6 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

File details

Details for the file wn_geometer-2026.6.9-py3-none-win_amd64.whl.

File metadata

File hashes

Hashes for wn_geometer-2026.6.9-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 2b4e6ea7737fb269187979cf16668a82455158f0bd1d0069f533dc8033f643d9
MD5 03ff7fd34ed598a60a03f5dbbfec3f67
BLAKE2b-256 4e028e43f4e8ddd6a7468c21c26fdf9ce3a811a9c8aa478fda9ceea5459dd074

See more details on using hashes here.

Provenance

The following attestation bundles were made for wn_geometer-2026.6.9-py3-none-win_amd64.whl:

Publisher: release.yml on wavenumber-eng/geometer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file wn_geometer-2026.6.9-py3-none-manylinux_2_39_x86_64.whl.

File metadata

File hashes

Hashes for wn_geometer-2026.6.9-py3-none-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 bc40cc24db9a8c7a4e2b1e80c001667dd8cbb6b197466292526a28363dad2beb
MD5 62cb2a1864d9e97c6e42c1c48357bfa1
BLAKE2b-256 ca4611bdfeec755b96cfb165c479475a2bea212a86b2c8f7c8d2ee0ee0e26516

See more details on using hashes here.

Provenance

The following attestation bundles were made for wn_geometer-2026.6.9-py3-none-manylinux_2_39_x86_64.whl:

Publisher: release.yml on wavenumber-eng/geometer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file wn_geometer-2026.6.9-py3-none-manylinux_2_39_aarch64.whl.

File metadata

File hashes

Hashes for wn_geometer-2026.6.9-py3-none-manylinux_2_39_aarch64.whl
Algorithm Hash digest
SHA256 f17cdd5fd7b5b85a8629b79ff760df96a11b46d4a7fbc006b34fc51b3ca721dd
MD5 8c433418647d42df4ae501fedbfba89c
BLAKE2b-256 3700c5c8d98752fff6e8eb53aec65dbcb94571cbc2d107100db3e9baaa9e4836

See more details on using hashes here.

Provenance

The following attestation bundles were made for wn_geometer-2026.6.9-py3-none-manylinux_2_39_aarch64.whl:

Publisher: release.yml on wavenumber-eng/geometer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file wn_geometer-2026.6.9-py3-none-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for wn_geometer-2026.6.9-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a075f228eb3f8730247dbea66742bb61f4d4b306ef985d0f690d9e4a5ad873ee
MD5 784707a813a8a56094bbf7be5427ed58
BLAKE2b-256 0cdf69f8e2021904dd5af21db4e61d33f1af29bf1267c1b299d5e9c4003d14b0

See more details on using hashes here.

Provenance

The following attestation bundles were made for wn_geometer-2026.6.9-py3-none-macosx_11_0_arm64.whl:

Publisher: release.yml on wavenumber-eng/geometer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page