Skip to content

Foundation Classes - Refactor BVH_Box to use generic vector types#858

Merged
dpasukhi merged 1 commit intoOpen-Cascade-SAS:IRfrom
dpasukhi:bvh_box_regression
Nov 26, 2025
Merged

Foundation Classes - Refactor BVH_Box to use generic vector types#858
dpasukhi merged 1 commit intoOpen-Cascade-SAS:IRfrom
dpasukhi:bvh_box_regression

Conversation

@dpasukhi
Copy link
Copy Markdown
Member

No description provided.

@dpasukhi dpasukhi added this to the Release 8.0 milestone Nov 26, 2025
@dpasukhi dpasukhi requested a review from Copilot November 26, 2025 16:23
@dpasukhi dpasukhi self-assigned this Nov 26, 2025
@dpasukhi dpasukhi added the 1. Foundation Classes Containers, system calls wrappers, smart pointers and other low level of OCCT code label Nov 26, 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 refactors BVH_Box to use generic vector types instead of hard-coded Graphic3d_Vec3d and Graphic3d_Vec4d, enabling support for both single-precision (float) and double-precision (double) transformations. This change makes the Transform and Transformed methods properly templated to work with the box's precision type T.

Key Changes:

  • Replaced Graphic3d_Vec3d and Graphic3d_Vec4d with generic BVH_VecNt and BVH::VectorType<T, 4>::Type
  • Changed Standard_Integer and Standard_Real to template type T and int for generic implementation
  • Added comprehensive test coverage for float-precision transformations

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
BVH_Box.hxx Refactored Transformed method to use generic vector types and template parameter T instead of hard-coded double-precision types
BVH_Box_Test.cxx Added 5 new test cases covering float-precision transform operations (identity, translation, scale) and edge cases

Comment thread src/FoundationClasses/TKMath/BVH/BVH_Box.hxx
Comment thread src/FoundationClasses/TKMath/BVH/BVH_Box.hxx
@github-project-automation github-project-automation bot moved this from Todo to Integration in Maintenance Nov 26, 2025
@dpasukhi dpasukhi merged commit 1663c65 into Open-Cascade-SAS:IR Nov 26, 2025
23 checks passed
@dpasukhi dpasukhi deleted the bvh_box_regression branch November 26, 2025 21:15
@github-project-automation github-project-automation bot moved this from Integration to Done in Maintenance Nov 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

1. Foundation Classes Containers, system calls wrappers, smart pointers and other low level of OCCT code

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants