openscad_cpp_evaluator
A C++20 port of openscad_evaluator (Python): an AST-walking
geometry engine that takes a parsed OpenSCAD AST and produces Manifold
CSG geometry, ready to export to STL/OBJ/OFF/3MF or hand off to a renderer.
Built on:
openscad_cpp_parser(git submodule) for lexing/parsing/AST/scope resolution.- Manifold v3.5.2 for the actual CSG boolean/mesh engine.
- Boost.Polygon for
roof()'s Voronoi-diagram construction. nothings/stb(header-only) forsurface()'s image loader and the built-in font provider's TrueType parsing/rasterization.
All fetched automatically via CMake FetchContent — no manual dependency installation beyond the
toolchain below.
Status
All planned phases (0–9) are complete: the full primitive/transform/boolean/modifier/control-flow
language surface, every builtin function, STL/OBJ/OFF/3MF import and export, hull()/minkowski()/
linear_extrude()/rotate_extrude()/roof()/offset()/surface()/DXF & SVG import/text(), an
opt-in content-hash geometry cache, per-call-site profiling, and a gdb-style --debug REPL. See
CLAUDE.md for the full phase-by-phase history and architecture notes.
Build
Requires:
- CMake ≥ 3.24
- A C++20 compiler (Clang, GCC, or MSVC — all three are covered by CI)
- Bison ≥ 3.8 and Flex
- macOS:
brew install bison flex(the system bison is too old; CMake auto-detects Homebrew's) - Linux:
sudo apt-get install bison flex - Windows: MSYS2's
bison/flex(pacman -S bison flex) — GitHub'swindows-latestrunner ships MSYS2 pre-installed atC:\msys64; CMake auto-detects it there too
- macOS:
GoogleTest and every other C++ dependency are fetched automatically.
git clone --recurse-submodules <this-repo>
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build -j
(Omitting -DCMAKE_BUILD_TYPE=Release builds unoptimized — pass it explicitly for anything
performance-sensitive.)
On Windows, CMake defaults to the multi-config Visual Studio generator, which ignores
CMAKE_BUILD_TYPE; pass --config Release to cmake --build (and -C Release to ctest)
instead.
Test
ctest --test-dir build --output-on-failure
Run a single binary or filter:
build/tests/oscad_eval_tests
build/tests/oscad_eval_tests --gtest_filter='FormatNumber.*'
The suite runs twice in CI — once with the bytecode VM on (the default) and once with it off
(OSCAD_BYTECODE_VM=0) — so a regression in either the compiled or interpreted expression-eval
path is caught.
CLI
build/tools/cli/openscad-cpp-evaluator <input.scad> -o <output.{stl,obj,off,3mf}> [--format stl|obj|off|3mf] [--debug]
The output format is inferred from -o's extension, or set explicitly with --format.
--debug drops into a gdb-style REPL (break/run/continue/step/next/finish/print/
backtrace/set/list/quit/help) before and during evaluation.
build/tools/cli/openscad-cpp-evaluator model.scad -o model.stl
Architecture
See CLAUDE.md for the full per-file architecture map, the Python-reference cross-check history,
and the rationale behind every non-obvious design choice (the two-pass resolve/generate CSG
pipeline, the FontProvider injection seam, the closure-detection rule, etc.).
CI
GitHub Actions builds and tests on Linux, macOS, and Windows on every push/PR (.github/workflows/ci.yml).
Release files for openscad-cpp-evaluator 1.21.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| openscad_cpp_evaluator-1.21.0.tar.gz | 1.6 MB | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| openscad_cpp_evaluator-1.21.0-cp312-abi3-win_arm64.whl | CPython 3.12 | abi3 | Windows ARM64 | Details |
| openscad_cpp_evaluator-1.21.0-cp312-abi3-win_amd64.whl | CPython 3.12 | abi3 | Windows x86-64 | Details |
| openscad_cpp_evaluator-1.21.0-cp312-abi3-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl | CPython 3.12 | abi3 | Linux glibc 2.28+ x86-64, Linux glibc 2.27+ x86-64 | Details |
| openscad_cpp_evaluator-1.21.0-cp312-abi3-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl | CPython 3.12 | abi3 | Linux glibc 2.28+ ARM64, Linux glibc 2.27+ ARM64 | Details |
| openscad_cpp_evaluator-1.21.0-cp312-abi3-macosx_13_0_x86_64.whl | CPython 3.12 | abi3 | macOS 13.0+ x86-64 | Details |
| openscad_cpp_evaluator-1.21.0-cp312-abi3-macosx_13_0_arm64.whl | CPython 3.12 | abi3 | macOS 13.0+ ARM64 | Details |
Total release size: 48.0 MB
Release files / openscad_cpp_evaluator-1.21.0.tar.gz
| Download URL | openscad_cpp_evaluator-1.21.0.tar.gz |
|---|---|
| Size | 1.6 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
96a28b5aff3ab65525557a12ac9eb2b6a00c6072be2299e18cb008cbc701fa43
|
|
BLAKE2b-256 checksum How to use checksums |
bbf2b1ed4b153b4c64c4279f0d10a2055eb8c83ec432b162d14947c46b59fa0c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / openscad_cpp_evaluator-1.21.0-cp312-abi3-win_arm64.whl
| Download URL | openscad_cpp_evaluator-1.21.0-cp312-abi3-win_arm64.whl |
|---|---|
| Size | 10.3 MB |
| Tags | CPython 3.12 Windows ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
e9d5d3f52e19c9359cb755a261ed570e2f359da7eb6a4e1cad7863d0e175607d
|
|
BLAKE2b-256 checksum How to use checksums |
365ebb212793e5415c0d019c329b7d275db1f20562cf3d54dbfa876e21e6b8ea
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / openscad_cpp_evaluator-1.21.0-cp312-abi3-win_amd64.whl
| Download URL | openscad_cpp_evaluator-1.21.0-cp312-abi3-win_amd64.whl |
|---|---|
| Size | 10.7 MB |
| Tags | CPython 3.12 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
80abb5f36b3b545b70400bb70d322ad055720da495021ceb03cc0597a7cd8222
|
|
BLAKE2b-256 checksum How to use checksums |
60ca02cca5a36f15cf8be7ba101c2e7a47aeea5ccd812188dd1d79c5e4ff1fbe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / openscad_cpp_evaluator-1.21.0-cp312-abi3-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
| Download URL | openscad_cpp_evaluator-1.21.0-cp312-abi3-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 7.2 MB |
| Tags | CPython 3.12 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
be4892bafe0f85bbce60ba02c955e33887669d260f0e7a6151c6583e5f4c3de4
|
|
BLAKE2b-256 checksum How to use checksums |
2511fe2b7bce31c29f9c6daf90fbc248f2ac42d12182da9791c556dcdf2cadf4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / openscad_cpp_evaluator-1.21.0-cp312-abi3-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
| Download URL | openscad_cpp_evaluator-1.21.0-cp312-abi3-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl |
|---|---|
| Size | 6.8 MB |
| Tags | CPython 3.12 Linux glibc 2.27+ ARM64 Linux glibc 2.28+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
c27b1284d58453277afd9101fb81ff0607a7560f6d90c18586787897a56ad274
|
|
BLAKE2b-256 checksum How to use checksums |
b78be95d46e40470166f483c9709b8421249a9d9162a12269d3a1e18d81897af
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / openscad_cpp_evaluator-1.21.0-cp312-abi3-macosx_13_0_x86_64.whl
| Download URL | openscad_cpp_evaluator-1.21.0-cp312-abi3-macosx_13_0_x86_64.whl |
|---|---|
| Size | 5.8 MB |
| Tags | CPython 3.12 abi3 macOS 13.0+ x86-64 |
|
SHA-256 checksum How to use checksums |
3a82ba015fe5c4cb0dd4d6c99abc8c1cd235ae60535d6bd4688128d23ca148c7
|
|
BLAKE2b-256 checksum How to use checksums |
80029abc3171d3c973eb0f9f6f5689a64f41435289f2e0edd125d56fd8f4269c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / openscad_cpp_evaluator-1.21.0-cp312-abi3-macosx_13_0_arm64.whl
| Download URL | openscad_cpp_evaluator-1.21.0-cp312-abi3-macosx_13_0_arm64.whl |
|---|---|
| Size | 5.5 MB |
| Tags | CPython 3.12 abi3 macOS 13.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
13bd118b59deaec2171f04021556d3246676f72cb9d0dd60f292f4954549e3ca
|
|
BLAKE2b-256 checksum How to use checksums |
590bd6e05bb9a5da393176179f80c66114c93ec2c74b45740a367ef9ed960b6a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|