Skip to content

Latest commit

 

History

History
68 lines (54 loc) · 2.49 KB

File metadata and controls

68 lines (54 loc) · 2.49 KB

Geometer Agent Guide

Geometer is a focused C++17 geometry library and CLI built on OpenCASCADE Technology (OCCT). It provides generic CAD/kernel operations for STEP conversion, hidden-line projection, planar contouring, browser WASM workflows, and future Python tooling.

For build setup, dependency policy, tests, and troubleshooting, read docs/developer/README.md. Treat that file as the canonical developer build guide.

For the current C++, C ABI, Python, WASM, CLI, JSON, and binary format surface, start at docs/design/README.md.

Working Rules

  • Keep geometer generic. Do not add Altium-specific, board-specific, or visualizer-specific policy to the core library.
  • Keep implementation modules small and responsibility-focused. Do not grow a catch-all geometer.cpp.
  • Prefer direct C++ value APIs in src/cpp/lib/, with stable C ABI wrappers for WASM and possible future non-C++ bindings. The public Python package currently uses the executable-backed CLI path.
  • .deps/ is generated local dependency state and must not be committed.
  • dist/ contains distributable outputs by current project policy. Prefer grouped paths (dist/native/<platform>/, dist/wasm/<target>/) for all consumers. Do not recreate root-level dist/geometer* artifacts.
  • Plans are temporary working notes only. Do not persist completed plans in the repo; once work ships, the docs of record are updated code, ADRs, requirements, and design docs.
  • Versioned releases use ADR 006 date versions: release tags use vYYYY-MM-DD, CMake/PyPI use YYYY.M.D, and the C ABI generation uses YYYYMMDD.
  • Use CMake for proper native builds and CTest for registered tests.
  • The default native preset uses Ninja.
  • Format touched C++ files with clang-format.
  • Run Ruff, clang-format checks, native validation, package validation, and the L99 release gate before tagging a release.

Build Shortcuts

Native:

cmake --preset default
cmake --build build --config Release
ctest --test-dir build -C Release --output-on-failure

WASM:

python scripts\build_wasm.py

This builds both the Node CLI WASM output and the browser-oriented modular C ABI output.

Manual OCCT rebuild:

python scripts\build_occt.py --clean
python scripts\build_occt.py

build_occt.py cleans/builds the current native platform under .deps/native/<platform>/ by default. Use --clean-source only when refreshing the shared OCCT source checkout too.