feat: the geometry engine is C++ on OpenCASCADE, one package, prebuilt 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>
This commit is contained in:
NiJingzhe
2026-10-24 02:55:35 +08:00
parent 29cbcc3958
commit 8971279494
1268 changed files with 140294 additions and 42143 deletions
+53
View File
@@ -0,0 +1,53 @@
name: ci
on:
push:
branches: [main]
pull_request:
jobs:
build-test:
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- { name: macOS arm64, os: macos-14 }
- { name: Linux x86_64, os: ubuntu-24.04 }
- { name: Linux aarch64, os: ubuntu-24.04-arm }
- { name: Windows x64, os: windows-2022 }
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with: { python-version: "3.12" }
- name: Cache static OCCT
id: occt
uses: actions/cache@v4
with:
path: ${{ runner.temp }}/occt
key: occt-V7_9_3-${{ matrix.os }}-${{ hashFiles('tools/build_occt.py') }}
- name: Install build tools
shell: bash
run: |
python -m pip install -U pip pybind11 numpy pytest ninja cmake
- name: Build OCCT (once per runner type)
if: steps.occt.outputs.cache-hit != 'true'
shell: bash
run: python tools/build_occt.py --prefix "${{ runner.temp }}/occt"
- name: Configure
shell: bash
run: >
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release
-DSCAD_WARNINGS_AS_ERRORS=ON
-DSCAD_OCCT_PREFIX="${{ runner.temp }}/occt"
-Dpybind11_DIR="$(python -m pybind11 --cmakedir)"
- name: Build
run: cmake --build build --parallel
- name: C++ tests
run: ctest --test-dir build --output-on-failure
- name: Python tests
shell: bash
env:
SCAD_BUILD_DIR: ${{ github.workspace }}/build
run: python -m pytest tests/python -q
+22
View File
@@ -0,0 +1,22 @@
name: wheels
on:
push:
tags: ["v*"]
workflow_dispatch:
jobs:
wheels:
name: wheels (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-14, ubuntu-24.04, ubuntu-24.04-arm, windows-2022]
steps:
- uses: actions/checkout@v4
- uses: pypa/cibuildwheel@v2.21
- uses: actions/upload-artifact@v4
with:
name: wheels-${{ matrix.os }}
path: wheelhouse/*.whl