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.18

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.18

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.18
File
wn_geometer-2026.8.18-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details
wn_geometer-2026.8.18-py3-none-manylinux_2_35_x86_64.whl Python 3 none Linux glibc 2.35+ x86-64 Details
wn_geometer-2026.8.18-py3-none-manylinux_2_35_aarch64.whl Python 3 none Linux glibc 2.35+ ARM64 Details
wn_geometer-2026.8.18-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details

Total release size: 49.1 MB

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

Download URL wn_geometer-2026.8.18-py3-none-win_amd64.whl
Size 7.9 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
8e602de015af159b5cb53d6e48dba0c3087d9b0a3bedde6673e1a2156bccf414
BLAKE2b-256 checksum
How to use checksums
8c8b08c417a391c165e1603bb7d72e8f858705458da340623d87e16ce36b0a3e
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 18, 2026.

Transparency log

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

Download URL wn_geometer-2026.8.18-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
cb1c09db83267c284e45edbd279d05b298cea6823e1217d2f56832d6a3e086fd
BLAKE2b-256 checksum
How to use checksums
0dbd5984612403519c00ba1f4b10f5d3937a6787e14a0e5914235aacd2e2cf6d
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 18, 2026.

Transparency log

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

Download URL wn_geometer-2026.8.18-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
e89e46c3f434300cd5b084cc1f251c22615449505959a8db2a0d500f46907361
BLAKE2b-256 checksum
How to use checksums
ec1f176141d5831b40cbf461d04223014339f3a96b5b958bfd68f133bc04bdf9
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 18, 2026.

Transparency log

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

Download URL wn_geometer-2026.8.18-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
04ab2fe401989711185fb517bdaacd78901f1beb2c4bf91631e6659578bfc9ac
BLAKE2b-256 checksum
How to use checksums
e9af6ddd47e06cad64825390472b81c506d3c27fd4f059157a507dc80df47a60
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 18, 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