Files
OCCT/src
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
..