Open CASCADE Technology 8.0.0 Release Candidate 4 #1097
dpasukhi
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Open Cascade is delighted to announce the release of Open CASCADE Technology version 8.0.0 Release Candidate 4 to the public.
Overview
Version 8.0.0-rc4 is a candidate release incorporating 111 improvements and bug fixes compared to version 8.0.0-rc3, bringing the total improvements since version 7.9.0 to over 400 changes.
This release focuses on:
EvalD*API with POD result structs replaces old virtualD0/D1/D2/D3methods, elementary geometry evaluation devirtualized viastd::variantdispatch, new EvalRep descriptor system decouples geometry identity from evaluation strategy, all 29 leaf Geom/Geom2d classes markedfinalTopoDS_TShapehierarchy replaces linked-list child storage with contiguous arrays, bit-packs shape state intouint16_t, devirtualizesShapeType(), and introduces index-based iterationStandard_Failureinherits fromstd::exception, error handlers usethread_localstorage eliminating global mutex contention, reference counting uses optimized memory ordering, mesh plugin system replaced with registry-based factoryNCollection_FlatDataMap/FlatMap), insertion-order-preserving maps (NCollection_OrderedMap/OrderedDataMap), header-only KD-Tree for spatial queries, C++17 structured binding support viaItems()views, unified map API withContained/TryEmplace/TryBindadm/scripts/migration_800/for migrating external projects to 8.0.0 APIsWhat is a Release Candidate
A Release Candidate is a tag on the master branch that has completed all test rounds and is stable to use. Release candidates progress in parallel with maintenance releases, with the difference that maintenance releases remain binary compatible with minor releases and cannot include most improvements. The cycle for a release candidate is planned to be 5-10 weeks, while maintenance releases occur once per quarter.
What's New in OCCT 8.0.0-rc4
Foundation Classes
High-Performance Collections
New
NCollection_FlatDataMapandNCollection_FlatMap#1015: Cache-friendly open-addressing hash containers with Robin Hood hashing:Standard_Transientreference counting with explicit memory ordering (followingstd::shared_ptrpattern), deprecatedStandard_Mutexin favor ofstd::mutexNew
NCollection_KDTree#1073: Header-only static balanced KD-Tree for efficient spatial point queries:gp_Pnt,gp_Pnt2d,gp_XYZ,gp_XYout-of-the-boxNew
NCollection_OrderedMapandNCollection_OrderedDataMap#1072: Insertion-order-preserving hash containers using intrusive doubly-linked list:NCollection_IndexedMapwhich requires O(n) swap-and-shrink)Try and Emplace methods for NCollection maps* #1022: Non-throwing lookup operations and in-place construction:
Emplace methods for NCollection containers #1035: In-place construction support for
NCollection_List(EmplaceAppend,EmplacePrepend,EmplaceBefore,EmplaceAfter),NCollection_Sequence,NCollection_DynamicArray,NCollection_Array1, andNCollection_Array2Items() views with C++17 structured bindings #1038: Key-value pair iteration for NCollection map classes:
Added
Items()for DataMap, FlatDataMap, IndexedDataMap andIndexedItems()for IndexedMap and IndexedDataMapNCollection_List optimization #1040:
std::initializer_listconstructor, improved const-correctness, optimized move constructor,Exchange()methodUnified map API and collection performance optimizations #1065: API unification and performance improvements across NCollection:
Contained()added to all map types returningstd::optional<std::reference_wrapper<T>>,TryEmplace/TryBindparity across all map typesReallocate()for use as growable stackTColStd_PackedMapOfInteger refactoring #1023: Improved implementation of specialized integer set
Keep deprecated NCollection aliases #1026: Deprecated package type aliases (
TColStd_*,TopTools_*) kept for backward compatibility with deprecation warningsException Handling Revolution
Standard_Failure inherits from std::exception #984: Bridges OCCT's exception system with standard C++:
catch (const std::exception&)blocksocc::handletostd::shared_ptrwhat()method implements std::exception interfaceExceptionType()virtual method for exception class identificationRaise(),Instance(),Throw()static methods - usethrowinsteadThread-local error handler stack #980: Replaced global mutex-protected stack with
thread_localstorage:Catches(),LastCaughtError()methodsOCC_CATCH_SIGNALSmacro with newRaise()re-throw methodUse throw instead of legacy Standard_Failure::Raise #983: Migrated codebase to modern C++ exception throwing
Math and Solver Enhancements
Cache-friendly matrix multiplication #1015: Changed
math_Matrix::Multiply()from i-j-k to i-k-j loop order for row-major storage with significant speedup for large matricesSIMD-friendly vector norm #1015: 4-way loop unrolling for
math_VectorBase::Norm()/Norm2()with pairwise partial sum combinationOptimized atomic reference counting #1015:
Standard_Transientuses explicit memory ordering (memory_order_relaxedfor increment,memory_order_releasefor decrement with acquire fence only at zero)Laguerre polynomial solver and Newton API refactoring #1086: New
MathPoly_Laguerrefor general polynomial root finding with Laguerre + deflation, including Quintic/Sextic/Octic helpers. Refactored specialized Newton solvers (2D/3D/4D) to unified fixed-size APICoordinate-wise polishing for PSO and DE solvers #1088: Brent-based coordinate-wise polishing phase improving component-level precision from ~1e-4 to 1e-8+ for separable functions. New
BrentAlongCoordinateinMathUtils_LineSearch, newMathUtils_RandomutilityPLib polynomial evaluation optimization #953
MathRoot and MathSys enhancements #954: New mathematical utilities
math_DirectPolynomialRoots refactoring #937
TKMath modernization with new packages #944
math_Vector Resize functionality #957
Bnd Package Improvements
Bnd package improvements #1051: Multiple bug fixes (
Bnd_Box::Add,IsOut,Distance;Bnd_Range::Common;Bnd_Sphere::SquareDistances;Bnd_OBBdegenerate cases), performance optimizations (early return fast paths forIsOut), and API improvements (Contains()/Intersects()wrappers,Center()/Min()/Max()/Get()returningstd::optional,IntersectStatusenum). Added[[nodiscard]]andnoexceptannotationsBVH Box and Rays improvements #882
String Enhancements
UsefullLength()which was treating individual UTF-8 continuation bytes as non-graphic, causing premature truncation of strings ending with non-ASCII charactersConvert Package Refactoring
NCollection_Arraymembers throughout the Convert package. Deprecated single-element accessors in favor of batch const-reference accessorsOther Foundation Improvements
Modeling Data
BSpline/Bezier Memory Optimization
BSpline/Bezier classes refactored to direct array members #1056: Replaced handle-based
NCollection_HArray1/HArray2members with directNCollection_Array1/Array2value members in all Geom BSpline and Bezier classes (curves and surfaces). Eliminates heap indirection and reference counting overhead. Bug fixes forGeom_BSplineCurve::IsEqualskipping knot comparison,Geom_BSplineSurface::SetUNotPeriodic/SetVNotPeriodicwrong constructor,Geom_BezierSurface::Increaseself-referencingInitAlways-populated weights and direct array access #1058: BSpline/Bezier weights arrays are now always populated (non-rational geometry uses non-owning view over static unit-weights buffer, zero allocation). New
WeightsArray()accessor always returns valid reference. Bug fix inHermit.cxx: fixed long-standing typoPole0 < 3that should bePole0 < Pole3Optimize BSplCLib interpolation and blend evaluation #1082: Four categories of hot-path optimization: (1) static initialization for GeomFill convertor matrices that were recomputed on every call, (2) stack allocation for small matrices/arrays to avoid heap allocation, (3) raw pointer access in hot loops replacing multi-layer accessor chains with bounds checks, (4) eliminated redundant recomputation with cached solver instances and
NbPoles()results. Also fixes undefined behavior inBSplCLib::NbPolesGeometry Evaluation Overhaul
EvalRep descriptors and dispatch for Geom/Geom2d #1089: New extensible evaluation dispatch architecture that decouples geometry identity from evaluation strategy. Per-object
Set/Get/ClearEvalRep API with support for full, derivative-bounded, and parameter-mapped descriptors. Enables alternate evaluation paths -- e.g., an offset surface can carry its equivalent non-offset surface as an EvalRep, bypassing the expensive offset evaluation path. MigratedGeom_OffsetSurfaceequivalent-surface path as proof-of-conceptRedesigned evaluation hierarchy with EvalD0/D1/D2/D3 API #1064, #1094: Fundamental redesign of the geometry evaluation dispatch hierarchy across all 32 Geom/Geom2d curve and surface classes. New
EvalD0/EvalD1/EvalD2/EvalD3/EvalDNvirtual methods serve as the primary dispatch points, returning new POD result structs (Geom_CurveD1/D2/D3,Geom_SurfD1/D2/D3,Geom2d_CurveD1/D2/D3). OldD0/D1/D2/D3/DNmethods retained as non-virtual inline backward-compatible wrappers. The final API uses direct struct returns with exception-based error handling (chosen overstd::optionalwrapping for evaluation hot-path performance)Devirtualize adaptor dispatch, mark leaf Geom classes final #1063: Eliminates virtual method dispatch on the geometry evaluation hot path by storing
gp_*primitives directly instd::variantinside adaptor classes and dispatching via switch/enum toElCLib/ElSLibstatic methods. Marks all 29 concrete leaf classes asfinalinGeom_*andGeom2d_*hierarchies, enabling compiler devirtualization. Bug fix:ShallowCopyinGeomAdaptor_Curve/Surfacenow correctly copies elementary types in the variantGeom2dGridEval package for batch 2D curve evaluation #1079: New package mirroring
GeomGridEvalfor 3D, providing batch evaluation of 2D curves with specialized evaluators for conics (analytical) and BSpline/Bezier (cache-based)Optimize adaptor Bezier cache and grid eval threshold #1084: Removed redundant
IsCacheValid()checks for Bezier curves/surfaces (single span, always valid), lowered cache threshold for more aggressive cache-based evaluationTShape Hierarchy Optimization
NCollection_List(linked list) toNCollection_DynamicArray(contiguous memory) with type-specific default bucket sizes (e.g., TEdge=2 for vertices, TWire=8 for edges)ShapeType()now non-virtual - embedded in compactuint16_t myStatebit-packed field (4 bits for type, 8 bits for flags)TopoDS_TShapeDispatchforstd::visit-style devirtualized type dispatchTopAbs::Compose(),Reverse(),Complement()moved inline to headerTopoDS_Iteratorrefactored from list-based to index-based iterationOther Modeling Data Improvements
Modeling Algorithms
Geometry Evaluation Optimization
TopLoc_Locationcomposition overhead in edge pcurve lookup, added fast-path exits inTopLoc_Location::Predivided()for identity and equal-location cases, cached face surface/location inBRepGProp_FaceAlgorithm Refactoring
Bug Fixes
theOutMinIdxcould exceed upper bound andtheOutMaxIdxcould be less than lower boundShape Healing
Mesh
Registry-based factory pattern replacing plugin system #1033: Major architecture change:
BRepMesh_DiscretAlgoFactoryabstract base with static registryBRepMesh_IncrementalMeshFactoryfor "FastDiscret" algorithmXBRepMesh_Factoryfor "XBRepMesh" extended meshingBRepMesh_PluginMacro.hxx,BRepMesh_PluginEntryType.hxx,BRepMesh_FactoryError.hxxmpsetfunctionname,mpgetfunctionname,mperrorFixed point-in-polygon check for CCW polygons in BRepMesh_Delaun #920
Visualization
Remove obsolete UNLIT shading optimization #1069: Removed implicit optimization in
OpenGl_Aspectsthat forced UNLIT shading when material had no reflection properties. This was breaking PBR materials, interior color handling, and texture modulation. Legacy code now explicitly setsSetShadingModel(Unlit)Avoid redundant shape copies in AIS_ColoredShape::dispatchColors #1068: Deferred
EmptyCopied()andBRep_Builder::Add()to avoid redundant shape construction; compound built only when requiredData Exchange
Build and Configuration
Testing
XCAFDoc_Test.cxxto correct locationCoding Quality
Global Refactoring
Interface_ParamSet::Append(), upcast pointer arithmetic bug indelabella.cpp, signed integer overflow inAdvApp2Var_MathBase. Also fixed pure virtual call during destruction inNCollection_SparseArrayBaseby replacing virtual dispatch with function pointers, eliminating the vtable entirelyCode Cleanup
Temporary Changes
Documentation
Migration Guide
OCCT 8.0.0 includes a comprehensive set of automated migration scripts in
adm/scripts/migration_800/to help external projects adapt to the new API. These scripts require Python 3.6+ with no external dependencies.Automated Migration Toolkit
The migration scripts can be run all at once or individually. Each script supports
--dry-runto preview changes before applying.Full Automated Migration (Recommended)
The full migration runs 12 phases in order:
migrate_handles.pyHandle(Class)toocc::handle<Class>,Handle(T)::DownCast()toocc::down_cast<T>()migrate_standard_types.pyStandard_Boolean/Integer/Realtobool/int/double,Standard_True/Falsetotrue/falsemigrate_macros.pyStandard_OVERRIDEtooverride,Standard_NODISCARDto[[nodiscard]], etc.cleanup_define_handle.pyDEFINE_STANDARD_HANDLEmacroscleanup_deprecated_typedefs.pycollect_typedefs.pyreplace_typedefs.pyTColStd_*/TopTools_*withNCollection_*<T>remove_typedef_headers.pycleanup_forwarding_headers.pycleanup_unused_typedefs.pycleanup_access_specifiers.pyAfter all phases,
verify_migration.pyruns automatically to report any remaining legacy patterns.Individual Scripts for Targeted Migration
Each script can be run independently for granular control:
Handle Migration
Standard_* Type Migration
Full type mapping:
Standard_BooleanboolStandard_Byteuint8_tStandard_IntegerintStandard_Sizesize_tStandard_RealdoubleStandard_Addressvoid*Standard_ShortRealfloatStandard_CStringconst char*Standard_CharactercharStandard_ExtCharacterchar16_tStandard_True/Falsetrue/falseStandard_Timestd::time_tStandard_* Macro Migration
Standard_OVERRIDEoverrideStandard_NODISCARD[[nodiscard]]Standard_FALLTHROUGH[[fallthrough]];Standard_NoexceptnoexceptStandard_DELETE= deleteStandard_THREADLOCALthread_localStandard_ATOMIC(T)std::atomic<T>NCollection Typedef Migration
# Step 1: Use pre-generated JSON from OCCT (or collect from source) python3 adm/scripts/migration_800/replace_typedefs.py --dry-run \ --input adm/scripts/migration_800/collected_typedefs.json /path/to/your/srcPre-generated JSON files are included in
adm/scripts/migration_800/so external projects do not need to re-scan the OCCT source:collected_typedefs.json- NCollection typedef mappingscollected_deprecated_typedefs.json- Deprecated typedef patterns and replacementsException Raise Migration
H-Collection Macro Migration
Converts
DEFINE_HARRAY1,DEFINE_HARRAY2, andDEFINE_HSEQUENCEmacros to the newNCollection_HArray1/HArray2/HSequencetemplate classes.Verification
After migration, verify completeness:
Manual Migration Notes
The following API changes require manual attention beyond what the automated scripts handle.
Exception Handling
OCCT exceptions now inherit from
std::exceptionand can be caught using standard C++ exception handling:The
GetMessageString()method is deprecated; usewhat()instead.NCollection_Map API Changes
Seek()/ChangeSeek()have been removed fromNCollection_Map. UseContained()instead:BSpline/Bezier Weights Migration
The nullable
Weights()pattern has been replaced with always-validWeightsArray():Copy-out accessor overloads are deprecated in favor of const-reference returning versions:
Convert Package Migration
Single-element accessors are deprecated in favor of batch const-reference accessors:
Visualization: UNLIT Shading
The implicit optimization that forced UNLIT shading when material had no reflection properties has been removed. If relying on zero-material properties for UNLIT shading, explicitly set the shading model:
Mesh Plugin System Migration
The legacy
DISCRETPLUGIN/DISCRETALGOsymbol-based plugin system has been replaced with a registry-based factory:Bnd Package API Changes
Bnd_Range::IsIntersectedmagic int returns replaced withIntersectStatusenum:Geom Classes Marked Final
All 29 concrete leaf classes in
Geom_*andGeom2d_*hierarchies are now markedfinal. If your code inherits from these concrete classes (e.g.,Geom_BSplineCurve,Geom_Plane), this will cause a compilation error. Inherit from the abstract base classes instead (e.g.,Geom_BoundedCurve,Geom_ElementarySurface).Removed Functionality
Standard_Failure::Raise()static methodthrow Standard_Failure()Standard_ErrorHandler::Catches()Standard_ErrorHandler::LastCaughtError()NCollection_Map::Seek()/ChangeSeek()Contained()returningstd::optionalBRepMesh_PluginMacro.hxxBRepMesh_DiscretAlgoFactoryBRepMesh_PluginEntryType.hxxBRepMesh_FactoryError.hxxmpsetfunctionname,mpgetfunctionname,mperrorBUC60720QABugs_PresentableObjectNCollection_SparseArrayBasevtableDeprecated Functionality
TColStd_*,TopTools_*, etc.)NCollection_*<T>templatesStandard_Failure::GetMessageString()what()(std::exception interface)Weights()patternWeightsArray()(always valid)Performance Improvements Summary
Acknowledgments
We thank all contributors who helped make this release possible through their code contributions, bug reports, and testing.
New Contributors
OSD_Host.cxx#902Full Changelog: V8_0_0_rc3...V8_0_0_rc4
This discussion was created from the release V8_0_0_rc4.
Beta Was this translation helpful? Give feedback.
All reactions