Skip to content

feat: C++ geometry engine, one package, prebuilt wheels (2.2.7b1) - #59

Merged
NiJingzhe merged 4 commits into
devfrom
feat/native-backend
Oct 23, 2026
Merged

NiJingzhe merged 4 commits into
devfrom
feat/native-backend

Conversation

@NiJingzhe

Copy link
Copy Markdown
Collaborator

What

The geometry engine is now C++20 on OpenCASCADE (src/cpp), shipped inside the wheel as simplecadapi._cpp. One distribution, one import package. The public API and the previous Python test suite are unchanged: pytest test tests passes on the new engine.

  • Layout: src/cpp and src/simplecadapi side by side. simplecadapi.core, .operators.*, .ql, .std.* ... are forwarding modules that name the C++ source of each name; the Python adapter layer is simplecadapi/_glue.
  • OCP removed: cadquery-ocp, ocp-gordon, py-slvs are no longer dependencies; nothing imports OCP. shape.wrapped is the module's own binding, simplecadapi._cpp.occt.
  • Prebuilt wheels (release workflow): Linux x86_64 and aarch64 (manylinux_2_28), macOS arm64 (14+), Windows x86_64; Python 3.10-3.13; one static OCCT 7.9.3 built by src/cpp/tools/build_occt.py. Publishes to GitHub and PyPI (last step, trusted publishing or PYPI_API_TOKEN). dry_run builds and verifies everything without publishing.
  • Errors: every message the library writes is English; the tag-validation and semantic-query errors render in full with causes and fixes.
  • Version: 2.2.7b1 (second commit: version, CHANGELOG, update notes EN/zh-CN, README).

arm6 benchmark (same sources, same machine): cold build 43.8 s -> 29.1 s, nothing changed 12.8 s -> 6.0 s, import simplecadapi 1.6 s / 360 MB -> 0.2 s / 68 MB; computed volumes agree to 1e-12.

Verified locally

  • macOS arm64: pytest test tests 2114 passed, src/cpp/tests/python 460, ctest 14/14; a wheel built against the static OCCT installs in a clean venv, has no external library dependency, and passes the wheel smoke test.
  • Linux aarch64: manylinux wheel built in the cibuildwheel container (static OCCT), repaired by auditwheel, smoke test passed.
  • Python 3.10, 3.11, 3.12, 3.13: module built and full suite run.

Not verified yet

  • Linux x86_64 and Windows wheels, and the release workflow on GitHub (no run yet). The checks of this PR are the first real Linux x86_64 build of the C++ module; run the release workflow with dry_run before tagging.
  • One known numeric difference with the static OCCT: the bounding box upper bound of a point-constrained plate surface comes out 0.1% low (OCCT's AddOptimal is a heuristic optimiser); geometry, area and centre agree.

Before tagging

workflow_dispatch with dry_run, then tag v2.2.7b1. PyPI needs the trusted publisher registered for this workflow (environment pypi) or a PYPI_API_TOKEN secret.

Co-Authored-By: Claude Sonnet 5.5 noreply@anthropic.com

NiJingzhe and others added 4 commits October 24, 2026 02:55
…t wheels

The modeling API (shapes, operators, sketches, products, queries, the reactive graph) is implemented in
C++20 on OpenCASCADE (src/cpp) and ships inside the wheel as simplecadapi._cpp.  The Python layers that stay
Python (runtime, build, artifacts, editor, inspect, exporter, translators, scene) run on it unchanged; the
previous Python test suite passes on the new engine.

Layout: src/cpp and src/simplecadapi side by side, one distribution built by scikit-build-core.
simplecadapi.core, .operators.*, .ql, .std.* and the other legacy modules are real forwarding modules; the
Python adapter layer is simplecadapi/_glue.  OCP is no longer a dependency and nothing imports it.

Release: .github/workflows/release.yml builds wheels for Linux x86_64 and aarch64, macOS arm64 and Windows
x86_64 (Python 3.10-3.13) against one static OCCT, runs the test suite on the Linux wheels and publishes to
GitHub and PyPI; ci.yml caches the static OCCT for the test jobs.

Errors: every message the library writes is English; the tag-validation and semantic-query errors render in
full with possible causes and fixes.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Beta: the first release with prebuilt wheels (Linux x86_64 and aarch64, macOS arm64, Windows x86_64,
Python 3.10-3.13).  Version in pyproject.toml, the uv.lock project entry and SKILL.md; CHANGELOG, update notes
(English and 中文), README update notes.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The private repository it was restricted to no longer exists; a fork must not try to release.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
cadquery-ocp used to install VTK; without it the BREP-rendering tests failed in CI.  vtk goes into the inspect
extra (users) and the dev group (tests).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@NiJingzhe
NiJingzhe merged commit a53c3ff into dev Oct 23, 2026
6 checks passed
@NiJingzhe NiJingzhe mentioned this pull request Oct 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant