From 7fdc69aee07cfd7bdca665bb6e61608a01043d87 Mon Sep 17 00:00:00 2001 From: dpasukhi Date: Sat, 25 Apr 2026 12:32:02 +0100 Subject: [PATCH] Coding - Fix missed Vector type Fix type of triangle pairs in IntPatch_InterferencePolyhedron to use dynamic array --- .../TKGeomAlgo/IntPatch/IntPatch_BVHTraversal.hxx | 12 ++++++------ .../IntPatch/IntPatch_InterferencePolyhedron.cxx | 2 +- .../TKGeomAlgo/IntPatch/IntPatch_PolyhedronBVH.hxx | 6 +++--- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/ModelingAlgorithms/TKGeomAlgo/IntPatch/IntPatch_BVHTraversal.hxx b/src/ModelingAlgorithms/TKGeomAlgo/IntPatch/IntPatch_BVHTraversal.hxx index de29d0624d..b688f92fe8 100644 --- a/src/ModelingAlgorithms/TKGeomAlgo/IntPatch/IntPatch_BVHTraversal.hxx +++ b/src/ModelingAlgorithms/TKGeomAlgo/IntPatch/IntPatch_BVHTraversal.hxx @@ -15,7 +15,7 @@ #define IntPatch_BVHTraversal_HeaderFile #include -#include +#include class IntPatch_PolyhedronBVH; @@ -60,7 +60,7 @@ public: bool theSelfInterference = false); //! Returns the collected triangle pairs. - const NCollection_Vector& Pairs() const { return myPairs; } + const NCollection_DynamicArray& Pairs() const { return myPairs; } //! Clears the collected pairs. void Clear() { myPairs.Clear(); } @@ -86,10 +86,10 @@ public: //! @name BVH_PairTraverse interface implementation Standard_EXPORT virtual bool Accept(const int theIndex1, const int theIndex2) override; private: - IntPatch_PolyhedronBVH* mySet1; //!< First BVH set - IntPatch_PolyhedronBVH* mySet2; //!< Second BVH set - bool mySelfInterference; //!< Self-interference mode flag - NCollection_Vector myPairs; //!< Collected triangle pairs + IntPatch_PolyhedronBVH* mySet1; //!< First BVH set + IntPatch_PolyhedronBVH* mySet2; //!< Second BVH set + bool mySelfInterference; //!< Self-interference mode flag + NCollection_DynamicArray myPairs; //!< Collected triangle pairs }; #endif // IntPatch_BVHTraversal_HeaderFile diff --git a/src/ModelingAlgorithms/TKGeomAlgo/IntPatch/IntPatch_InterferencePolyhedron.cxx b/src/ModelingAlgorithms/TKGeomAlgo/IntPatch/IntPatch_InterferencePolyhedron.cxx index 0b62e923da..15365732b0 100644 --- a/src/ModelingAlgorithms/TKGeomAlgo/IntPatch/IntPatch_InterferencePolyhedron.cxx +++ b/src/ModelingAlgorithms/TKGeomAlgo/IntPatch/IntPatch_InterferencePolyhedron.cxx @@ -130,7 +130,7 @@ void IntPatch_InterferencePolyhedron::Interference(const IntPatch_Polyhedron& th aTraversal.Perform(aSet1, aSet2, SelfIntf); // Process each candidate pair - const NCollection_Vector& aPairs = aTraversal.Pairs(); + const NCollection_DynamicArray& aPairs = aTraversal.Pairs(); for (const auto& aPair : aPairs) { Intersect(aPair.First, theFirstPol, aPair.Second, theSecondPol); diff --git a/src/ModelingAlgorithms/TKGeomAlgo/IntPatch/IntPatch_PolyhedronBVH.hxx b/src/ModelingAlgorithms/TKGeomAlgo/IntPatch/IntPatch_PolyhedronBVH.hxx index db25c59a28..f150e82e0d 100644 --- a/src/ModelingAlgorithms/TKGeomAlgo/IntPatch/IntPatch_PolyhedronBVH.hxx +++ b/src/ModelingAlgorithms/TKGeomAlgo/IntPatch/IntPatch_PolyhedronBVH.hxx @@ -16,7 +16,7 @@ #include #include -#include +#include class IntPatch_Polyhedron; @@ -78,8 +78,8 @@ public: //! @name Additional methods bool IsInitialized() const { return myPoly != nullptr; } private: - const IntPatch_Polyhedron* myPoly; //!< Reference to the wrapped polyhedron - NCollection_Vector myIndexMap; //!< Maps current indices to original 1-based indices + const IntPatch_Polyhedron* myPoly; //!< Reference to the wrapped polyhedron + NCollection_DynamicArray myIndexMap; //!< Maps current indices to original 1-based indices }; #endif // IntPatch_PolyhedronBVH_HeaderFile