Bump to OCCT 8.0.1

Four mechanical binding edits; the bound Python surface is unchanged
(sigdiff compared the 7.9.3.1 dump against 8.0.1.1's in both directions
and found no class, member or constructor arity moved), so the app needs
no change.

- NCollection_Utf8String is gone; NCollection_String is the same UTF-8
  type. Python name kept, since the app imports it.
- Standard_Failure lost its Standard_Transient RTTI when it moved to
  deriving std::exception; ExceptionType() replaced DynamicType()->Name()
  and returns the same class names the exception dispatch keys on.
- FindKey gained a size_t overload beside the int one, so the plain
  member pointer is ambiguous; overload_cast picks the int form, which
  keeps the negative-index guard.
- StdPrs moved from TKService to TKV3d, so CMakeLists links both.

The byte-identity fixtures did NOT retire, contrary to the watchlist:
all six round-trip to the same digests under the new kernel, as do the
measurement, history and mesh-count blocks, so tests/data is untouched
and the app's content-addressed BREP payloads stay valid.

Gates: binding suite 83 passed, 138/138 symbols, sigdiff clean both
directions, ASAN clean, app suite 1798 passed / 1 skipped (unchanged),
sweep over 4486 parts with anchors_digest and every status unchanged,
-m perf 16% faster on the 32-feature chain.
This commit is contained in:
2026-08-11 12:43:54 +02:00
parent fab8e93a4b
commit 153f2e4cca
13 changed files with 115 additions and 64 deletions

View File

@@ -6,7 +6,7 @@ and (for publishing) `uv`.
## The builder image
`occt/Dockerfile` compiles OCCT 7.9.3 once inside
`occt/Dockerfile` compiles OCCT 8.0.1 once inside
`quay.io/pypa/manylinux_2_28_x86_64` (both the base digest and the source
tarball's sha256 are pinned) and installs it to `/opt/occt`.
@@ -66,7 +66,15 @@ cd ../app && .venv/bin/python ../ocp/tools/gen_fixtures.py
The generator asserts stock is idempotent for each fixture before recording its
digest — otherwise the gate would compare against a moving target. Regenerate
only when deliberately re-blessing (e.g. the OCCT 8.0 bump).
only when deliberately re-blessing.
The OCCT 8.0.1 bump was expected to be such an occasion and turned out not to
be: every fixture round-tripped to the same digest under the new kernel, as did
the measurement, history and mesh-count blocks, so `tests/data/` was left
untouched. Do not assume the next bump re-blesses either — run the gate first
and let it say. Note also that the generator needs a wheel carrying more of
OCCT than this binding exposes (it is written against the stock wheel), so
regenerating is not currently possible from the app's own venv.
## Publishing

View File

@@ -236,26 +236,48 @@ were gated:
`IsDeleted` maps compared exactly, since that is the substrate the app's
topological naming is built on.
## OCCT 8.0 watchlist
## OCCT 8.0 bump — what actually moved
Recorded as each module landed, so the 10E bump is a known quantity:
Done at 8.0.1 (2026-08-11). Four edits across ~4 000 lines of binding, and the
bound Python surface came out **identical** — `sigdiff` compared 7.9.3.1's dump
against 8.0.1.1's in both directions and found no class, member or constructor
arity changed, so the drop-in contract held without the app being touched.
- `Standard_Failure` derives `std::exception`, and the `Raise`/`Throw`/
`Instance` static helpers are gone. None of them is bound, so the exception
table should port unchanged.
- `GeomLProp` is superseded by the new `GeomProp`/`BRepProp` packages, whose
results come back as structs with `IsDefined` flags instead of throwing. Only
`GeomLProp_SLProps.Normal` is bound, so this is a one-line move.
- `StdPrs_BRepFont` and `StdPrs_BRepTextBuilder` become deprecated typedefs of
`Font_BRepFont`/`Font_BRepTextBuilder`. They are real classes in 7.9.3 and are
bound as such; 8.0 makes it a rename behind the same `OCP.StdPrs` names.
- Methods that returned handles through an out-parameter return them by value.
`BRep_Tool.Surface`/`Curve` and the adaptors are the ones this binding
touches.
- The global math wrappers are deprecated in favour of `std::`. Nothing here
binds them.
- The byte-identity fixtures retire at the bump: a different kernel legitimately
writes different BREP bytes. The measurement and history blocks stay.
What broke, all of it mechanical:
- **`NCollection_Utf8String` is gone.** `NCollection_String`
(`NCollection_UtfString<char>`) is the same UTF-8 type and is what the font
API takes. The Python name is unchanged, since the app imports it.
- **`Standard_Failure` lost its `Standard_Transient` RTTI** when it moved to
deriving `std::exception`, so `DynamicType()->Name()` no longer compiles. The
virtual `ExceptionType()` replaced it and returns the same class names, which
is what the exception dispatch keys on — and what `cad_pool` marshals home.
- **The `Size()` → `size_t` migration added index overloads.** `FindKey` on the
indexed maps now has both an `int` and a `size_t` form, so a plain member
pointer is ambiguous; `nb::overload_cast<Standard_Integer>` picks the `int`
one, which keeps the negative-index guard.
- **`StdPrs` moved from TKService to TKV3d**, so `CMakeLists.txt` links both.
Three watchlist predictions were wrong, recorded here because the reasoning
behind them was plausible:
- `StdPrs_BRepFont`/`StdPrs_BRepTextBuilder` did **not** become typedefs of
`Font_BRepFont`/`Font_BRepTextBuilder`. The aliasing runs the other way — they
are still the real classes and the `Font_*` names are the typedefs.
- `GeomLProp` was **not** superseded by `GeomProp`/`BRepProp`. It became a
template (`GeomLProp_SLProps` is now an alias for
`GeomLProp_SLPropsBase<handle<Geom_Surface>>`) and kept the constructor and
accessors this binding uses, so the module compiled unchanged.
- **The byte-identity fixtures did not retire.** A different kernel was assumed
to write different BREP bytes; 8.0.1 does not. All six fixtures round-trip to
the same digests, and the measurement, history and mesh-count blocks match
too, so `tests/data/` was left alone and no re-bless happened. That also means
the app's content-addressed BREP payloads stay valid across the bump.
Unchanged as predicted: the handle model (`occt_handle.h` needed nothing, ASAN
clean), the exception *table* (the removed `Raise`/`Throw`/`Instance` helpers
were never bound), the deprecated out-parameter handle returns this binding
still uses, and the global math wrappers it never bound.
## Open questions