Skip to content

Modeling, Bnd_Box - CornerMax incorrect realisation #664

Merged
dpasukhi merged 3 commits intoOpen-Cascade-SAS:IRfrom
dpasukhi:box_mistake
Aug 8, 2025
Merged

Modeling, Bnd_Box - CornerMax incorrect realisation #664
dpasukhi merged 3 commits intoOpen-Cascade-SAS:IRfrom
dpasukhi:box_mistake

Conversation

@dpasukhi
Copy link
Copy Markdown
Member

@dpasukhi dpasukhi commented Aug 7, 2025

Fixed CornerMax with getting valid values from Bnd_Box. Before we are extracting Min.
Added extended GTest tests.

Fixed CornerMax with getting valid values from Bnd_Box.
Before we are extracting Min.
Added extended GTest tests.
@dpasukhi dpasukhi added this to the Release 7.9.2 milestone Aug 7, 2025
@dpasukhi dpasukhi self-assigned this Aug 7, 2025
@dpasukhi dpasukhi added 2. Bug Something isn't working 1. Modeling Boolean operations, offsets, primitives, any conversion, brep builders and etc... labels Aug 7, 2025
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes a bug in the Bnd_Box::CornerMax() method where incorrect conditions were being checked for the Y and Z axes, causing the method to return min corner values instead of max corner values. The fix corrects the openness checks to use IsOpenYmax() and IsOpenZmax() instead of IsOpenYmin() and IsOpenZmin().

Key changes:

  • Fixed the logical error in CornerMax() method by correcting the openness condition checks
  • Added comprehensive GTest suite for Bnd_Box class to prevent similar regressions
  • Minor code formatting improvements in the DumpJson() method

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
src/FoundationClasses/TKMath/Bnd/Bnd_Box.cxx Fixed CornerMax method bug and improved DumpJson formatting
src/FoundationClasses/TKMath/GTests/Bnd_Box_Test.cxx Added comprehensive test suite for Bnd_Box functionality
src/FoundationClasses/TKMath/GTests/FILES.cmake Updated CMake to include new test file

Comment thread src/FoundationClasses/TKMath/GTests/Bnd_Box_Test.cxx Outdated
@dpasukhi dpasukhi changed the title Modeling, Bnd_Box - CornerMax incorrect reasliation Modeling, Bnd_Box - CornerMax incorrect realisation Aug 7, 2025
@dpasukhi dpasukhi linked an issue Aug 7, 2025 that may be closed by this pull request
@dpasukhi dpasukhi marked this pull request as ready for review August 7, 2025 10:35
@github-project-automation github-project-automation bot moved this from Todo to Integration in Maintenance Aug 8, 2025
@dpasukhi dpasukhi merged commit 687a36c into Open-Cascade-SAS:IR Aug 8, 2025
23 checks passed
@dpasukhi dpasukhi deleted the box_mistake branch August 8, 2025 09:18
@github-project-automation github-project-automation bot moved this from Integration to Done in Maintenance Aug 8, 2025
dpasukhi added a commit that referenced this pull request Sep 6, 2025
- Fixed the logical error in `CornerMax()` method by correcting the openness condition checks
- Added comprehensive GTest suite for `Bnd_Box` class to prevent similar regressions
- Minor code formatting improvements in the `DumpJson()` method
dpasukhi added a commit that referenced this pull request Sep 6, 2025
- Fixed the logical error in `CornerMax()` method by correcting the openness condition checks
- Added comprehensive GTest suite for `Bnd_Box` class to prevent similar regressions
- Minor code formatting improvements in the `DumpJson()` method
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

1. Modeling Boolean operations, offsets, primitives, any conversion, brep builders and etc... 2. Bug Something isn't working

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Typos in Bnd_Box::ConerMax method resulting in unexpected behaviour

3 participants