Commit Graph

5 Commits

Author SHA1 Message Date
Pasukhin Dmitry
4df229f2c4 Foundation Classes - Bnd package improvements (#1051)
Bug fixes:
- Bnd_Box::Add(Bnd_Box) - fix unconditional bounds merge before open direction check
- Bnd_Box::IsOut(gp_Pln) - use GetXMin()/GetXMax() accessors (include Gap) instead of raw fields
- Bnd_Box::Distance() - add void box check to avoid invalid results
- Bnd_Range::Common() - add missing return statement
- Bnd_Sphere::SquareDistances() - fix radius comparison (was comparing distance vs radius instead of squared values)
- Bnd_OBB: OBBTool::ProcessTriangle - add safety check for degenerate cross products before normalization
- Bnd_OBB: OBBTool::ProcessDiTetrahedron - fix off-by-one in bounds check (use < instead of <=)

Performance optimizations:
- Bnd_Box::IsOut(Bnd_Box) - add early return fast path for non-open boxes
- Bnd_Box2d::IsOut(Bnd_Box2d) - add early return fast path for non-open boxes

API improvements:
- Add Contains()/Intersects() semantic wrappers (inverse of IsOut) to Bnd_Box, Bnd_Box2d, Bnd_OBB, Bnd_Range
- Add Center() returning std::optional to Bnd_Box, Bnd_Box2d, Bnd_Range
- Add Min()/Max()/Get() returning std::optional to Bnd_Range
- Add Bnd_Range::Bounds struct for C++17 structured bindings via Get()
- Add Bnd_OBB::HalfSizes struct and GetHalfSizes() for structured bindings
- Add Bnd_Box2d::Distance() method
- Replace Bnd_Range::IsIntersected magic int returns with IntersectStatus enum

Code modernization:
- Add [[nodiscard]] and noexcept annotations across all Bnd classes
- Migrate Bnd_Sphere inline methods from .lxx to header, delete Bnd_Sphere.lxx
- Remove unused includes (iomanip, fstream, legacy Standard_*.hxx headers)
- Fix Bnd_Box.hxx "Ymix" typo in IsOpenYmin() comment
- Clean up DET-style comments in Bnd_Box.cxx
- Update IntPatch_WLineTool.cxx to use IntersectStatus enum
2026-02-12 23:02:36 +00:00
Pasukhin Dmitry
c020fc2fad Coding - Clang-Tidy apply with refactoring (#965)
- Replacing empty constructor/destructor implementations with `= default`
- Removing redundant `virtual` keywords from override methods
- Replacing `NULL` and `0` with `nullptr`
- Replacing C headers with C++ equivalents (`<cstdio>`, `<cstring>`, etc.)
- Marking copy constructors/assignment operators as `= delete` for non-copyable classes
- Converting `void` parameter lists to empty parameter lists
- Replacing integer literals with appropriate boolean values
2025-12-29 11:55:04 +00:00
Pasukhin Dmitry
14d4e91171 Coding - Global Refactoring OCCT as a part of 8.0.0 (#955)
- Added automated migration scripts for handle syntax, standard types, and macros
- Deprecated legacy `Standard_*` types and macros in favor of native C++ equivalents
- Introduced modern `occ` namespace with template-based type checking helpers
- Enhanced NCollection macros to support variadic arguments for complex template types- Added automated migration scripts for handle syntax, standard types, and macros
- Deprecated legacy `Standard_*` types and macros in favor of native C++ equivalents
- Introduced modern `occ` namespace with template-based type checking helpers
- Enhanced NCollection macros to support variadic arguments for complex template types
2025-12-28 14:38:06 +00:00
Dmitrii Kulikov
c479f6e000 Coding - Rework of Math global functions to stl (#833)
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.
2025-11-17 14:20:24 +00:00
Pasukhin Dmitry
5647b46a34 Configuration - Reorganize repository structure #450
Reorganizing structure to have Module/TK/Package/FILES structure.
New structure reflect the structure inside IDE.
Migrate FILES, PACKAGES, EXTRLIB to CMake version to handle changes on updates.
No changes were done to installation layout, all installation result keep as before.
The migration was done using python script, see PR, which refactor automatically the structure.
Updated doc generation to have valid path to modules, toolkits and packages.
In case of PR into new version, IR-790 can be used as a target for the previous version.
2025-03-20 00:39:26 +00:00