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

cmake --preset default
cmake --build build --config Release
python scripts/validate_native.py
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.5.24.2

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 call it 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 simple --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/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.

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:

python -m pytest tests/L99_release -q
python scripts/validate_native.py
python scripts/validate_python_package.py

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.5.24.2-py3-none-win_amd64.whl (7.5 MB view details)

Uploaded Python 3Windows x86-64

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

Uploaded Python 3manylinux: glibc 2.39+ x86-64

File details

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

File metadata

File hashes

Hashes for wn_geometer-2026.5.24.2-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 aad61f9697fd645e9e13cdbd4b7ec97927aa2fa13da9975f5f00eea9c5d22972
MD5 16c4455577da270c09840d53021c88a7
BLAKE2b-256 fa9db9146908ddc3c4f34c7b509621cc7f3a16d0ab70681bab477b53af5b57b9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for wn_geometer-2026.5.24.2-py3-none-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 47445709ea608ff98c79c34dc910432fbcbbb5e5e8d356f03a565391011d7c7f
MD5 d191ec3bf3f537bd30c9e862899f9a18
BLAKE2b-256 42ab1df7aac77ee840abf9a77b6f92560df1993f252f75f2c1681fdd6332e367

See more details on using hashes here.

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