mirror of
https://github.com/Open-Cascade-SAS/OCCT.git
synced 2026-05-10 17:40:24 +08:00
Replace std::optional return types with direct returns and exception-based error handling in Geom/Geom2d/Surface EvalD0/D1/D2/D3/DN methods to avoid performance overhead of std::optional wrapping on the hot evaluation path. Changes: - EvalD* methods now return result structs directly instead of std::optional<T>, throwing Geom_UndefinedValue/Geom_UndefinedDerivative on failure - D0/D1/D2/D3/DN inline wrappers simplified to unpack direct returns instead of checking optional validity - TryEval* helper functions in EvalRepUtils converted from std::optional<T> returns to bool + output parameter pattern - Adaptor classes (Adaptor3d_Curve/Surface, Adaptor2d_Curve2d, GeomAdaptor_Curve/Surface, Geom2dAdaptor_Curve) simplified by removing try-catch wrappers around evaluation calls - Removed dead #include <optional> from 5 header files - Updated GTests to match new direct-return API