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, packed planar boolean work, Fast vector HLR for STEP or indexed meshes, and browser SVG/Canvas mesh illustration.

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

Basic Python use:

from pathlib import Path
import geometer

version = geometer.version()
projection = geometer.project_step_hlr(
    Path("part.step"),
    views=[geometer.ProjectionView.top()],
    options=geometer.HlrOptions.fast_assembly_outline(),
)
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 for typed model/mesh HLR and strict packed analytic requests. The file-oriented HLR helpers and their exact/poly defaults remain supported.

CLI

geometer --version
geometer step-to-glb input.step output.glb
geometer step-project-hlr input.step output.json
geometer model-project-hlr input.step output.json --projection-algorithm fast --outline-algorithm fast-mesh-shadow
geometer mesh-project-hlr input.mesh output.json --options fast-options.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.
  • examples/wasm/illustration_demo.html - production-package consumer for mesh illustration, SVG/Canvas output, and Fast vector linework.
  • dist/wasm/demos/analytic_polygon_pour_demo.html, dist/wasm/demos/hlr_demo.html, dist/wasm/demos/illustration_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.9.4

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

Total release size: 51.7 MB

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

Download URL wn_geometer-2026.9.4-py3-none-win_amd64.whl
Size 8.4 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
05872d650f768151d41fb649788f5f7920a21ce7a36955091ff1d67823ce11d8
BLAKE2b-256 checksum
How to use checksums
ca0b16cc0007d50326ea1ec9e883a4c24eba405a9a3bebe874f9fe50b2946d1c
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 Sep 4, 2026.

Transparency log

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

Download URL wn_geometer-2026.9.4-py3-none-manylinux_2_35_x86_64.whl
Size 16.1 MB
Tags Linux glibc 2.35+ x86-64 Python 3
SHA-256 checksum
How to use checksums
3f48e58167406e4103f5af5b0e37112fdf51ece7872e861775a50e5474f73352
BLAKE2b-256 checksum
How to use checksums
fdbdb29326eac231c5b0389fb2bb85ee5c293a57ec11855da2a27edf61461355
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 Sep 4, 2026.

Transparency log

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

Download URL wn_geometer-2026.9.4-py3-none-manylinux_2_35_aarch64.whl
Size 15.3 MB
Tags Linux glibc 2.35+ ARM64 Python 3
SHA-256 checksum
How to use checksums
79d1a787524e8033bff193f5c0eb685a5696c4d9004d0dce675be0e3f672bd4f
BLAKE2b-256 checksum
How to use checksums
5af7ea5d20515e9d71c4be9488ceb436113ea9fd5f02d1a4225289649fa39b52
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 Sep 4, 2026.

Transparency log

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

Download URL wn_geometer-2026.9.4-py3-none-macosx_11_0_arm64.whl
Size 12.0 MB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
fcddf09d59cc34510eacec6fc343ec88f90f0577af140d638d5dde9c84408d47
BLAKE2b-256 checksum
How to use checksums
740b5cff3fa91c780522d2cc0f547ed9a45af8c856ecf6d2c10919b72f43beb9
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 Sep 4, 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