Skip to main content

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 --group dev rack run --all
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.

OCCT is generated dependency state under .deps/. Build scripts first try verified public prebuilt OCCT archives from https://artifacts.wavenumber.net before falling back to source builds. R2 credentials are only needed for producer uploads or private fallback testing.

Build WASM artifacts:

python scripts/build_wasm.py

WASM artifacts are copied to:

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

Generate the TypeSpec projections, @wavenumber/geometer ESM package, and TypeScript browser example with:

npm ci
npm run generate:contracts
npm run check:contracts

The package artifact is dist/wasm/npm/geometer/. It exposes direct and dedicated Worker WASM clients; the current repository artifact is a release input, not a claim that the package has been published to npm.

Python Package

PyPI distribution: wn-geometer

Import package: geometer

Install the current release:

python -m pip install wn-geometer==2026.8.21

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>/ and expose a geometer console command in the install environment. Existing file-oriented helpers use the JSON batch CLI; the candidate analytic API exports generated integer DTOs and a synchronous GeometerClient that uses the persistent binary serve --stdio protocol with strict packed request/result validation. This is implemented pilot evidence, not a claim that the analytic contract has been promoted or released.

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.
  • examples/wasm/model_bounds_demo.html - TypeScript/generated-client pilot that computes STEP model bounds in a dedicated Worker and visualizes them through browser WASM and Three.js.
  • dist/wasm/demos/analytic_polygon_pour_demo.html, dist/wasm/demos/hlr_demo.html, and dist/wasm/demos/planar_ring_solver_demo.html - one-file standalone browser demos for release review. Build them through python scripts/build_standalone_demos.py all.
  • 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.

Release files for wn-geometer 2026.8.21

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

Built distributions (wheels)

Table of built distributions (wheels) for wn-geometer 2026.8.21
File
wn_geometer-2026.8.21-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details
wn_geometer-2026.8.21-py3-none-manylinux_2_35_x86_64.whl Python 3 none Linux glibc 2.35+ x86-64 Details
wn_geometer-2026.8.21-py3-none-manylinux_2_35_aarch64.whl Python 3 none Linux glibc 2.35+ ARM64 Details
wn_geometer-2026.8.21-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details

Total release size: 49.2 MB

Release files / wn_geometer-2026.8.21-py3-none-win_amd64.whl

Download URL wn_geometer-2026.8.21-py3-none-win_amd64.whl
Size 7.9 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
d49f894b6c34aee69b6109dd5a54d4ae490d0f6ccc7491b651e1c39bfd51edd4
BLAKE2b-256 checksum
How to use checksums
d46cc08f2cb621cce33ae480bc36e830f4a8b241610a7ad921bca8581570802c
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 Aug 22, 2026.

Transparency log

Release files / wn_geometer-2026.8.21-py3-none-manylinux_2_35_x86_64.whl

Download URL wn_geometer-2026.8.21-py3-none-manylinux_2_35_x86_64.whl
Size 15.2 MB
Tags Linux glibc 2.35+ x86-64 Python 3
SHA-256 checksum
How to use checksums
c57b3bf18aeee125a3f0746c63b4a69d097214543e7bd1ebe2549a12a1adf07b
BLAKE2b-256 checksum
How to use checksums
56d617c6c3e77fbb146657d43b5084e8285b8ad4f03615a2565c99b6c5b90d40
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 Aug 22, 2026.

Transparency log

Release files / wn_geometer-2026.8.21-py3-none-manylinux_2_35_aarch64.whl

Download URL wn_geometer-2026.8.21-py3-none-manylinux_2_35_aarch64.whl
Size 14.5 MB
Tags Linux glibc 2.35+ ARM64 Python 3
SHA-256 checksum
How to use checksums
24bc0a05ef506ed2a096acf1c09ea959743a0ed3d24274d68b20fd0dfb236c7e
BLAKE2b-256 checksum
How to use checksums
e83d8dd8c5ca252009038bafbab4bf9f309e3dc297f71e608b97ceee367632b1
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 Aug 22, 2026.

Transparency log

Release files / wn_geometer-2026.8.21-py3-none-macosx_11_0_arm64.whl

Download URL wn_geometer-2026.8.21-py3-none-macosx_11_0_arm64.whl
Size 11.5 MB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
3ddbd8bbeb591b22814810a0c5cfa306ef511ebdb6cb85424a4fea45b6b70239
BLAKE2b-256 checksum
How to use checksums
1366c065a10cbdb915d5b2e4873729b615fbf708b5b3cec53b8dd71c6f667cd5
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 Aug 22, 2026.

Transparency log
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