Replace custom HLRAlgo_PolyData::Box struct with standard Bnd_Box class
to leverage its built-in update functionality and reduce code duplication.
Changes:
- Remove HLRAlgo_PolyData::Box struct definition
- Update UpdateGlobalMinMax methods to use Bnd_Box::Update()
- Simplify bounding box computation logic using Bnd_Box methods
- Use C++17 structured bindings with Bnd_Box::Get()
- Added a default constructor to CSLib_Class2d for creating empty classifiers.
- Implemented move constructor and move assignment operator to optimize resource management.
- Updated IntTools_FClass2d and BRepTopAdaptor_FClass2d to utilize the new move semantics, eliminating unnecessary dynamic memory allocations.
- Replaced deprecated pointer-based storage with NCollection_Sequence for better memory management.
- Removed the obsolete BRepTopAdaptor_SeqOfPtr class to streamline the codebase.
BRep_Tool::CurveOnSurface expects Index >= 1, but the loop started
from ii = 0, resulting in a wasted iteration that always returned
a null pointer.
Fixes#0032371
Modernized curve/surface intersection algorithms by replacing preprocessor-based
generic programming (.gxx macros) with C++ templates (.pxx headers):
IntCurveSurface package (TKGeomAlgo):
- Introduced IntCurveSurface_Inter.pxx with callback-based template functions
for intersection algorithms, replacing IntCurveSurface_Inter.gxx
- Created IntCurveSurface_InterUtils.pxx with utility template functions for
surface decomposition, UV clamping, and quadric intersection handling
- Added IntCurveSurface_PolygonUtils.pxx for polygon construction utilities
- Added IntCurveSurface_PolyhedronUtils.pxx for polyhedron construction utilities
- Added IntCurveSurface_QuadricCurveExactInterUtils.pxx for exact quadric
intersection computations
- Converted standalone implementation files from macro instantiation (_0.cxx)
to direct template usage (.cxx)
- Removed obsolete .gxx and .lxx files
HLRBRep package (TKHLR):
- Updated HLRBRep_InterCSurf to use new IntCurveSurface template utilities
- Converted HLRBRep polygon, polyhedron, and intersection classes to use
modern template instantiation pattern
- Removed legacy macro-based instantiation files (_0.cxx)
This refactoring improves code maintainability, enables better IDE support
and debugging, and aligns with modern C++ practices while preserving
the existing API and functionality.
- Moved temporary allocator reset to the end of the iteration in BOPAlgo_PaveFiller to prevent memory accumulation.
- Introduced a separate temporary allocator for per-iteration data in BOPAlgo_FillIn3DParts, enhancing memory reclamation during processing.
- Cleared face map before resetting the allocator in BOPAlgo_Tools to ensure efficient memory usage.
- Deleted copy and move constructors and assignment operators in BRepAlgoAPI_BuilderAlgo to ensure non-copyability and non-movability, preventing potential double-free issues.
- Added comprehensive unit tests to verify the non-copyable and non-movable nature of BRepAlgoAPI_BuilderAlgo and its derived classes.
- Updated CMake files to include the new test source file for build integration.
- Updated isBSplineCurveInvalid to check for uneven parameterization speed and determine the need for ProjLib usage.
- Enhanced the logic for computing parameterization speed across knot intervals.
- Simplified the handling of B-spline curves with problematic knot spacing by directly utilizing ProjLib for projection.
- Improved overall clarity and maintainability of the code by removing redundant checks and streamlining parameter handling.
- Implemented various test cases including projections of lines, circles, and B-splines on different surface types (planes, cylinders, spheres, and toroids).
- Refactored ShapeConstruct_ProjectCurveOnSurface to improve handling of periodic surfaces and edge cases.
- Updated header files to reflect new type aliases and improved structure for better readability and maintainability.
- Added a new function `extractBSplineCurve` to streamline the extraction of B-spline curves from both trimmed and untrimmed curves.
- Refactored `isBSplineCurveInvalid` to utilize the new extraction function, improving clarity and reducing code duplication.
- Updated `generateCurvePoints` to leverage the new extraction method for better handling of B-spline curves.
- Replaced std::vector with NCollection_Vector for better memory management in isBSplineCurveInvalid.
- Enhanced rebuildBSpline function to improve knot adjustment logic while preserving curve geometry.
- Introduced a new utility class, SurfaceProjectorWithCache, to enhance the projection of points onto B-spline surfaces by caching pole positions and their UV parameters.
- Updated the intersection logic to check for non-null C2dint1 when determining periodicity of 3D curves.
- Improved robustness of the PerformIntersectionAtEnd function to prevent potential issues with null parameters.
- Added a helper function to create B-spline curves from poles and knot sequences.
- Introduced a new test case to validate ThruSections with B-spline profiles of varying pole counts.
- Ensured compatibility of closed B-spline curves during lofting operations.
- Improved test coverage for the BRepOffsetAPI_ThruSections functionality.
- 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
- Replacing preprocessor-based generic programming with C++ templates
- Converting inline implementation files (`.lxx`) to inline definitions within header files
- Removing legacy instantiation files (`_0.cxx`)
- Updating type aliases to use modern `using` declarations instead of macro-based instantiation
- Introduced a separate temporary allocator (`aTmpAllocator`) for per-iteration collections
- Reorganized collection declarations to distinguish between temporary (per-iteration) and persistent (cross-iteration) data structures
- Added allocator reset logic at the start of each iteration to reclaim memory
- Added null checks for 2D curve handles to prevent dereferencing null geometry
- Refactored `ProcessDE()` to use modern C++ idioms (auto, structured bindings, range-based iteration patterns)
- Simplified `FindPaveBlocks()` using a lambda function to reduce code duplication
- Refactored the `ReorderFaces` function to iterate through all edges at a vertex instead of assuming only two edges exist
- Replaced manual face swapping with `std::swap` for cleaner code
- Removed debug output statements and unused debug declarations
Majority of functions now simply call same functions from std namespace.
Functions that duplicate std namespace functionality are declared
deprecated.
Calls of deprecated functions are replaced with std functions calls.
- Converted generic template files to direct implementations for three packages (Extrema, MAT, TopBas/HLRAlgo)
- Removed preprocessor macro-based includes and replaced with concrete type definitions
- Updated CMake FILES lists to remove deprecated `.gxx` and `.lxx` files
- 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
- Replaced macro-based template system with C++ templates for `Bnd_B2` and `Bnd_B3` classes
- Fixed incorrect use of Y-coordinate instead of Z-coordinate in transformation methods
- Added comprehensive GTest test coverage for both 2D and 3D bounding box classes
- 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
- Standardized spacing in comment formatting (removing extra spaces after colons, between words)
- Fixed one typo in a parameter name within a comment
- Translated one French comment to English
- Corrected spelling errors in comments (e.g., "od" to "of", "thr" to "the")
- Removed unnecessary `<br>` HTML tags from comment formatting
- Normalized whitespace in comments for consistency
- Fixed terminology (e.g., "3-d" to "3D")
- Addition of `gp_Dir::D` and `gp_Dir2d::D` enums for standard directions (X, Y, Z, NX, NY, NZ)
- Constexpr/noexcept constructors for geometric primitives (circles, cones, cylinders, etc.)
- Enhanced axis placement classes with enum-based constructors
- Replacement of hardcoded direction values throughout the codebase
- Replace legacy Standard_Mutex usage across many modules with std::mutex.
- Include <mutex> where needed and remove <Standard_Mutex.hxx> includes.
- Replace Standard_Mutex::Sentry / explicit Lock/Unlock with std::lock_guard or std::unique_lock.
- Convert optional/heap mutex holders to std::unique_ptr<std::mutex> and adapt locking accordingly.
- Simplify several singleton initializations (remove manual double-checked locking where safe).
- Use thread_local for per-thread flags instead of ad-hoc mutex protection.
- Fix BVH_BuildQueue Fetch logic to preserve thread counters and wasBusy handling.
- Remove obsolete TopTools_MutexForShapeProvider sources and update FILES.cmake.
This modernizes mutex usage, reduces dependency on custom mutex types and improves clarity of locking patterns.
- Added `noexcept` to transformation and mirroring methods across all 2D geometry classes
- Added `constexpr` to trivial getters, setters, and simple computational methods where applicable
- Removed an unused variable declaration in GeomInt_IntSS_1.cxx
Make gp basic types and operations more constexpr-friendly and noexcept:
- Mark gp::Resolution as constexpr.
- Add constexpr and/or noexcept to many constructors and small access/modifier methods.
- Convert several functions to constexpr where safe to allow compile-time evaluation.
- Initialize members via initializer lists for several GTrsf/GTrsf2d/Mat/etc constructors.
- Add noexcept to transformation/serialization helpers and small utilities where appropriate.
This enables better compile-time optimizations and safer noexcept semantics across TKMath gp primitives.
- Add M_SQRT2 macro in multiple sources and replace runtime sqrt/Sqrt(2) calls with the macro
- Add SQRT_3 constexpr in IGESGraph_Color and Bnd_OBB and replace Sqrt(3) usages
- Make BSplSLib_zero a constexpr array
- Replace a few computed sqrt literals with compile-time constants for clarity and consistency
Second iteration of fixing regressions.
Fixed issue with loops and incorrect shell created.
#584 affected some tests which were not updated on time.
Now all test cases are passed.
When an edge (BRepMeshData_Edge) has multiple PCurve curves (IMeshData_PCurve) with different orientations, the index array is filled for only one PCurve curve.
This would cause problems later, so a fix was made to fill index arrays for curves with another orientation.
- Refactored helper functions with clearer naming and improved parameter handling
- Added null safety checks to prevent crashes when edge lookup fails in face topology
- Removed debug code and simplified variable declarations for better maintainability
Refactor shell construction algorithm for improved performance:
- Add GetConnectedFaceGroups function using DFS to identify topologically
connected face groups before shell construction
- Replace O(nˆ3) iterations with pre-built connectivity maps (FaceEdgesMap,
EdgeFacesMap) using STL unordered_map with custom allocators for O(1) lookup.
- Process only the largest connected component first, significantly reducing
time complexity for large face sets
- Removal of self-referencing includes where files include themselves
- Elimination of duplicate include statements within the same file
- Cleanup of redundant includes in conditional compilation blocks
- Adding CI validation for validation PRs
- Added systematic Boolean operation test coverage using Google Test framework
- Implemented test utilities for shape creation, transformation, and validation
- Migrated existing Draw-based Boolean tests to C++ GTests for better automation
Used regex in src folder:
^//[\s\n\r\t]*[-=]{2,}[=]*[\n\r]*//[\s\n\r\t]*[a-z]+[\s\n\r\t]*:[\s\n\r\t]*[a-z0-9_:\t\s]*[\s\n\r\t]*//[\s\n\r\t]*[a-z]+[\s\n\r\t]*:[\s\n\r\t]*[a-z0-9_\s\t./-><]{0,22}//[\s\n\r\t]*[-=]{3,}[=]*
- Introduced `StackOfFrames` class to manage processing frames iteratively instead of recursively
- Modified `killTrianglesAroundVertex` method to collect victim nodes in a provided container rather than recursively processing them
- Replaced recursive depth-first traversal with iterative processing using the new stack-based approach