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>
A SimpleCAD model is now a marimo notebook: a PEP 723 header with a
[tool.simplecadapi] table (id, revision, tolerance_profile, inputs), one
FTC block per cell, and the product is the top-level value whose id is the
notebook id. The notebook file is the only source of truth; .scadpkg is
only for exchange and publishing.
Runtime (simplecadapi.runtime):
- run_notebook(path, *, id=None, overrides=None, cache=True) and
sca run <notebook.py> [--id] [--set NAME=VALUE] [--no-cache] [--out]
- use(path, id=..., **overrides) composes child notebooks; notebook_id()
lets one notebook serve a part family under per-use ids
- each cell records into its own session; cells are the unit of caching,
keyed by the notebook dependency digest (deps.json)
- marimo cell executor entry point, so marimo edit runs the same way
- shapes and read-only definition mappings pickle for the cell cache
Removed: the content-addressed part cache (simplecadapi.cache,
CachePolicy, CacheReport, sca cache ...), the incremental assembly solver
and its dependency/state modules, and part-interface diffs with latest-
state persistence. Part and assembly builds and the notebook projection
now share one definition writer (build/definition.py).
Co-Authored-By: Claude Code <noreply@anthropic.com>
Benchmarking the failure path surfaced two defects:
1. Nearest-disjoint-PAIR reporting misattributed failures: two operands
not touching each other may still be transitively connected through
a third, so the ring case reported an internal 2.29 mm pair instead
of the real 7.8 mm hub-to-ring separation. Diagnosis now unions
touching operands into clusters (gap <= tol) and reports the nearest
inter-cluster pair; a single cluster that failed to fuse reports the
touch-without-overlap pair as non-manifold contact. Beyond the pair
probe cap it reports nothing rather than guess.
2. Evidence rendering was unbounded on the failure path: the render
worker allows 180s x 6 attempts, and identical agent retries re-paid
~5s each. Diagnostic renders are now downgraded single-view, deduped
per failure signature (same unmoved gap renders once per process),
and abandoned after a 15s watchdog — the error always goes out
immediately, measurements first (text axiom).
Failure-path costs after this: probes 4 ms (2 small solids) to 86 ms
(70-face plate) on top of the kernel's own failed attempt; evidence
render ~5 s once per distinct failure, ~15 ms on retries.
ErrorGuidance gains measurements / evidence / repair / inventory; every
measurement renders into the error text (text axiom), rendered evidence
images land next to the part-cache root and their paths appear in the
text. Legacy call sites emit byte-identical output while the new fields
are empty.
Boolean union/cut/intersect failures now classify at raise time:
disjoint operands report the exact min gap, closest points, closure
vector, and an operation-specific parameterized repair; edge/vertex/
tangent-only contact is distinguished from positive-volume overlap via
an intersection-volume probe. Evidence rendering is default-on for
failures (SCA_NO_DIAGNOSTIC_RENDER to disable); the test suite opts out
in conftest with dedicated render tests opting back in.
SimpleCADMessageError now keeps the display message separate from the
programmatic .message attribute (ArtifactValidationError str() had
drifted; 6 suite failures traced to match= assertions on it).
1825 passed, 5 skipped.