]> OCCT Git - occt.git/commit
Foundation Classes - Optimize and fix Bnd package (#839)
authorPasukhin Dmitry <dpasukhi@opencascade.com>
Tue, 25 Nov 2025 19:29:53 +0000 (19:29 +0000)
committerGitHub <noreply@github.com>
Tue, 25 Nov 2025 19:29:53 +0000 (19:29 +0000)
commitc5120a28c80ea00da2fd1c621e8b95981c0eb22f
tree42898ec8d16db2ea8d27a6aea9bed0583e44189d
parenta6e68c7e70a175605fa0779add068143c7bc8ed2
Foundation Classes - Optimize and fix Bnd package (#839)

- Fixed multiple bugs including uninitialized variables (zmin/zmax in IsOut(gp_Lin)), incorrect type usage (Standard_Integer → Standard_Boolean), and improper gap handling
- Optimized performance-critical methods through branchless operations, early exits, and cached computations
- Modernized codebase with C++17 features including constexpr constructors, noexcept specifications, and [[nodiscard]] attributes
- Refactor Bnd_Box and Bnd_Box2d classes to introduce GetXMin, GetXMax, GetYMin, GetYMax, and GetZMin,
  GetZMax methods for improved clarity and encapsulation.
- Add Limits struct to represent box limits in both classes.
src/FoundationClasses/TKMath/Bnd/Bnd_Box.cxx
src/FoundationClasses/TKMath/Bnd/Bnd_Box.hxx
src/FoundationClasses/TKMath/Bnd/Bnd_Box2d.cxx
src/FoundationClasses/TKMath/Bnd/Bnd_Box2d.hxx
src/FoundationClasses/TKMath/GTests/Bnd_Box_Test.cxx