Refactored Standard_ErrorHandler to use thread_local storage for the error handler stack
instead of a global list protected by mutex. This eliminates locking overhead entirely
since each thread only accesses its own error handlers.
Changes:
- Replaced global mutex-protected stack with thread_local Top pointer
- Simplified FindHandler() to directly return the thread-local Top
- Removed Catches() and LastCaughtError() methods (no longer needed)
- Added Raise() method for re-throwing caught exceptions
- Removed obsolete member variables: myStatus, myThread
- Deleted unused headers: Standard_HandlerStatus.hxx, Standard_JmpBuf.hxx, Standard_PErrorHandler.hxx
- Updated OCC_CATCH_SIGNALS macro to use new Raise() method
- Moved tcl samples to resource folder.
- Clean up cmake from samples related settings.
- Removed CSharp samples from the repository.
- Removed MFC samples from the repository.
- Removed Qt samples from the repository.
- Removed Inspector samples from the repository.
- Removed glwin samples from the repository.
- Removed webgl samples from the repository.
- Removed xaml samples from the repository.
- Removed Java samples from the repository.
This commit completes the refactoring of geometry evaluator classes, replacing polymorphic Handle-based evaluators with inline template utilities and std::variant-based data storage in adaptor classes.
Key changes:
1. Removed GeomEvaluator and Geom2dEvaluator packages:
- Deleted GeomEvaluator_Curve, GeomEvaluator_Surface base classes
- Deleted GeomEvaluator_OffsetCurve, GeomEvaluator_OffsetSurface
- Deleted GeomEvaluator_SurfaceOfExtrusion, GeomEvaluator_SurfaceOfRevolution
- Deleted Geom2dEvaluator_Curve, Geom2dEvaluator_OffsetCurve
2. Added private utility headers (.pxx files) with inline template functions:
- Geom_OffsetCurveUtils.pxx - offset curve evaluation
- Geom_OffsetSurfaceUtils.pxx - offset surface evaluation
- Geom_ExtrusionUtils.pxx - surface of extrusion evaluation
- Geom_RevolutionUtils.pxx - surface of revolution evaluation
- Geom2d_OffsetCurveUtils.pxx - 2D offset curve evaluation
3. Refactored GeomAdaptor_Curve:
- Moved BezierData and BSplineData structs inside the class
- Added std::variant<monostate, OffsetData, BezierData, BSplineData> for type-specific evaluation data
- Removed separate myBSplineCurve and myCurveCache members
- Updated all evaluation methods to use variant-based access
4. Refactored GeomAdaptor_Surface:
- Changed ExtrusionData and RevolutionData to use Handle(Adaptor3d_Curve) instead of Handle(GeomAdaptor_Curve) for flexibility
- Changed RevolutionData to store gp_Ax1 instead of separate AxisLoc/AxisDir
- Updated OffsetData to store Handle(Geom_OffsetSurface) for osculating surface queries instead of creating new Geom_OsculatingSurface
5. Updated Geom_OsculatingSurface:
- Renamed UOscSurf/VOscSurf methods to UOsculatingSurface/VOsculatingSurface for consistency with Geom_OffsetSurface public API
6. Fixed specialized adaptor classes:
- GeomAdaptor_SurfaceOfLinearExtrusion - removed evaluator, uses variant
- GeomAdaptor_SurfaceOfRevolution - removed evaluator, uses variant
- Geom2dAdaptor_Curve - updated to use variant-based data
- Adaptor2d_OffsetCurve - updated to use Geom2d_OffsetCurveUtils
7. Fixed Geom_SurfaceOfRevolution:
- Updated utility calls to use gp_Ax1 parameter instead of separate XYZ
8. Added missing includes in dependent files:
- Adaptor3d_HSurfaceTool.cxx - added GeomAdaptor_Curve.hxx
- GeomAdaptor.cxx - added Adaptor3d_Surface.hxx, GeomAbs_SurfaceType.hxx
- Extrema_GenExtPS.cxx - added Adaptor3d_Curve/Surface.hxx, GeomAbs_IsoType.hxx
- TopOpeBRepTool_GEOMETRY.cxx - added Geom2dAdaptor_Curve.hxx
- BRepAdaptor_Curve2d.cxx - updated ShallowCopy for variant
Benefits:
- Reduced virtual function call overhead in hot evaluation paths
- Better code locality with inline template functions
- Simplified class hierarchy without abstract evaluator base classes
- More efficient memory layout with variant instead of polymorphic handles
- Consistent method naming across related classes
Modernized and refactored the polynomial root-finding implementation
with improved numerical stability and modern C++ practices.
Key changes:
1. Implementation refactoring (math_DirectPolynomialRoots.cxx):
- Extracted helper functions into anonymous namespace for better encapsulation
- Introduced ScaledCoefficients struct for coefficient scaling operations
- Added separate functions for cubic root cases (three real, one real, multiple)
- Replaced deprecated OCCT math functions with std:: equivalents
(std::abs, std::sqrt, std::pow, std::log, std::cos, std::sin, std::atan, std::max)
- Improved code documentation with algorithm references
2. Header modernization (math_DirectPolynomialRoots.hxx):
- Added comprehensive Doxygen documentation for all public methods
- Renamed private members to follow OCCT conventions (myDone, myRoots, etc.)
- Moved inline implementations from .lxx file directly into header
- Removed math_DirectPolynomialRoots.lxx file (merged into .hxx)
3. Test improvements:
- Added test fixture class for math_DirectPolynomialRoots with helper methods
- Extended test coverage with numerical stability tests
- Added regression tests for problematic quartic cases
- Added Geom2dGcc_Circ2d3Tan tests for BUC60622 regression case
4. Minor fixes:
- Removed unused #include <iostream> from test file
- Updated FILES.cmake to remove deleted .lxx file
- Fixed test case expected values in bug28626_2
Extract derivative calculation logic from GeomEvaluator and
Geom2dEvaluator classes into dedicated utility headers:
- Geom_OffsetSurfaceUtils.pxx for 3D offset surface derivatives
- Geom_OffsetCurveUtils.pxx for 3D offset curve derivatives
- Geom2d_OffsetCurveUtils.pxx for 2D offset curve derivatives
- Geom_ExtrusionUtils.pxx for extrusion surface calculations
- Geom_RevolutionUtils.pxx for revolution surface calculations
Utility functions provide unified handling of singular and non-singular
cases with osculating surface support for higher-order derivatives.
Buffer management uses NCollection_LocalArray for stack-safe allocation
with heap fallback when sizes exceed expected limits.
Test case expectations updated to reflect improved calculation accuracy.
- Fixed CheckMixedContinuity to detect actual mixed concavity
(both convex and concave regions) instead of any G1/non-G1 transitions
- Added null edge and PCurve checks in RefEdgeInter to prevent crashes
- Added GTests for BRepOffset_MakeOffset covering various loft scenarios
- Fix negative modulo in torus bounding box computation
- Fix hyperbola extrema loop early break condition
- Fix OpenMin/OpenMax direction sign for infinite bounds
- Remove dead code in cone bounding computation
- Replace sqrt/log with more efficient computations in hyperbola bounds
- General code cleanup and modernization
- Deletion of 20 legacy DRAW test files (.tcl format) from tests/bugs/ directories
- Addition of 15 new GTest C++ test files across multiple modules
- Removal of corresponding QA command implementations from TKQADraw
- Removed 37 DRAW test scripts from `tests/bugs/` directories
- Added 31 new GTest C++ test files in appropriate `GTests/` directories
- Removed corresponding QAcommands implementations from QABugs source files
- Updated CMake FILES.cmake files to include new test files
- Introduced a centralized `normalizeAngle()` function in both ElSLib.cxx and ElCLib.cxx with special handling for values near zero and the 2π seam
- Replaced multiple instances of inline angle normalization code with calls to the new function
- Migrated the OCC24945 bug test from Draw Harness to GTest framework
- Updated expected test values to reflect the improved normalization behavior
- Complete removal of old Draw Harness test infrastructure for NCollection classes
- Addition of new GTest files testing STL algorithm compatibility (min, max, replace, sort, reverse)
- Migration of OSD_Path and Handle operation tests to GTest format
- Replaces legacy DRAW command-based tests with modern GTest framework
- Removes the `OCC28887` DRAW command and associated test files
- Adds comprehensive unit test coverage for `Standard_ArrayStreamBuffer` functionality
- Added null safety checks in the ClearRts function and IntUnifyFaces method
- Refactored ClearRts to use a more concise implementation with null handling
- Added a test case to verify the fix works with tessellated geometry
- Changes type declarations from specific measure types to `Handle(Standard_Transient)` for broader compatibility
- Adds runtime type checking and conversion logic to extract measure values from both supported types
- Includes comprehensive unit tests to validate the new functionality
Minor refactoring of RelocatePCurvesToNewUorigin().
RelocatePCurvesToNewUorigin() can no longer stuck in infinite loop if it found the edge that is not present in theVEmap.
Test bug_gh544 is added to check the fix.
- Removed OSD_PerfMeter.h and integrated its functionality directly into OSD_PerfMeter.hxx.
- Updated OSD_PerfMeter to manage stopwatches through a singleton StopwatchStorage class.
- Enhanced meter initialization and management to support shared meters by name.
- Implemented methods for starting, stopping, and printing elapsed time for performance meters.
- Added OSD_PerfMeter_Test.cxx to implement unit tests for OSD_PerfMeter functionality.
- Test bug23237 is delete as it refers to removed code.
Add possibility to export scaling factor into the STEP file as a cartesian_transformation_operator_3d.
Add flag for turning on/off (on by default) this behavior.
Found via `codespell -q 3 -S "*.fr" -L aadd,abnd,abord,acces,acount,adn,afile,aline,alo,alocation,alog,als,anc,ane,anid,anormal,anout,ans,anumber,aother,aparent,apoints,aprogram,asender,asign,asnd,ba,bbuild,bloc,bord,bu,caf,cas,childrens,childs,classe,clen,commun,cylindre,discret,don,dout,dum,ede,enew,entite,entites,extrem,fo,fonction,geometrie,guid,hilight,hilights,hist,identic,ii,indx,inout,invalide,ist,iterm,llength,lod,maked,mape,mke,modeling,methode,mye,myu,nam,nd,nin,normale,normales,ons,parametre,parametres,periode,pinter,pres,projet,remplace,reste,resul,secont,serie,siz,shs,slin,som,somme,syntaxe,sur,te,thei,theis,ther,theres,thes,thev,thex,thet,tol,transfert,unhilight,unhilights,va,vas,verifie,vertexes,weight`
Extend ShapeUpgrade_UnifySameDomain algorithm working on cases,
where SurfaceOfRevolution or SurfaceOfLinearExtrusion was made on basis of TrimmedCurve.
Original issue: 0033328
Old surface is not removed after translation or rotation with geometry copying
Removed unnecessary condition that was added by an earlier fix.
Added a test case.
Original issue: 0033591
Found via `codespell -q 3 -S "*.fr" -L aadd,abnd,abord,acount,adn,afile,aline,alo,alocation,alog,als,anc,ane,anid,anormal,anout,ans,anumber,aother,aparent,apoints,aprogram,asender,asign,asnd,ba,bbuild,bloc,bord,bu,caf,cas,childrens,childs,classe,clen,commun,cylindre,don,dout,dum,ede,entites,fo,fonction,guid,hist,identic,ii,indx,inout,invalide,ist,iterm,llength,lod,mape,modeling,methode,mye,myu,nam,nd,nin,normale,normales,ons,parametre,parametres,periode,pres,reste,resul,secont,serie,shs,slin,som,somme,syntaxe,sur,te,thei,theis,ther,theres,thes,thev,thex,thet,tol,transfert,va,vas,verifie,vertexes,weight`
Mutex is added to XSControl_WorkSession to prevent data races
during reading and writing.
Tests are added to check the behavior of STEP readers/writers in
multithreading environment.
GNU compiler have some optimization leads to multiple definitions
of static global objects.
In case of static linking there are no possible issues, but in case of plug-in
application can have multiple definitions of single object.
This reverts commit c479c4f6d8.
The problem related with no changes on the ShapeHealing stage.
ReShape do not propagated well for all scenarios.
The test case update is not relevant.
DCAF require VISUALIZATION for correct work.
In some scenario DRAWEXE can generate a dublicates of the
internal static singletons. This means each dynamic library
will have their own instance of the static singleton.
Update all direct library loading to use the DCAF plugin
mechanism. This will ensure that the DCAF plugin is loaded
only once and that the correct instance is used.
Originally issue is reproduced only Linux with dlopen with "RTLD_LAZY".
Can be resolved additionally adding "RTLD_LAZY | RTLD_GLOBAL" for dlopen
Fixed exception in RWStepShape_RWEdgeCurve::Check() thrown when trying
to access step entity in Interface_EntityIterator with zero entities.
Fixed a crash in StepToTopoDS_TranslateFace::Init() caused by
dereferencing nullptr.
RWStepShape_RWEdgeCurve and RWStepShape_RWEdgeCurve are refactored.
Test bug33665 is added to check the fixed behavior.
Removed unnecessary tolerance increase for Line\Line intersection.
Tolerance increasing logic for some specific curve types
was added with #26619.
Original fix had no test for Line/Line case and
theoretically was added as a possible issue.
After research Line/Line case doesn't need a special tolerance case.
The reason of current problem lies inside projection algorithm
Function_SetUVBounds() for projection of circle onto sphere produces shifted bounds.
Incorrect checking of placement on summit of the sphere was fixed.
Changed condition for combination of WLines into one.
WLine would be excluded from consideration for merging, if one of its middle points between vertices is out of domain (does not lie on both surfaces).