Coding - Fix missed Vector type

Fix type of triangle pairs in IntPatch_InterferencePolyhedron to use dynamic array
This commit is contained in:
dpasukhi
2026-04-25 12:32:02 +01:00
parent e3a34f5479
commit 7fdc69aee0
3 changed files with 10 additions and 10 deletions

View File

@@ -15,7 +15,7 @@
#define IntPatch_BVHTraversal_HeaderFile
#include <BVH_Traverse.hxx>
#include <NCollection_Vector.hxx>
#include <NCollection_DynamicArray.hxx>
class IntPatch_PolyhedronBVH;
@@ -60,7 +60,7 @@ public:
bool theSelfInterference = false);
//! Returns the collected triangle pairs.
const NCollection_Vector<TrianglePair>& Pairs() const { return myPairs; }
const NCollection_DynamicArray<TrianglePair>& 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<TrianglePair> myPairs; //!< Collected triangle pairs
IntPatch_PolyhedronBVH* mySet1; //!< First BVH set
IntPatch_PolyhedronBVH* mySet2; //!< Second BVH set
bool mySelfInterference; //!< Self-interference mode flag
NCollection_DynamicArray<TrianglePair> myPairs; //!< Collected triangle pairs
};
#endif // IntPatch_BVHTraversal_HeaderFile

View File

@@ -130,7 +130,7 @@ void IntPatch_InterferencePolyhedron::Interference(const IntPatch_Polyhedron& th
aTraversal.Perform(aSet1, aSet2, SelfIntf);
// Process each candidate pair
const NCollection_Vector<IntPatch_BVHTraversal::TrianglePair>& aPairs = aTraversal.Pairs();
const NCollection_DynamicArray<IntPatch_BVHTraversal::TrianglePair>& aPairs = aTraversal.Pairs();
for (const auto& aPair : aPairs)
{
Intersect(aPair.First, theFirstPol, aPair.Second, theSecondPol);

View File

@@ -16,7 +16,7 @@
#include <BVH_PrimitiveSet.hxx>
#include <BVH_LinearBuilder.hxx>
#include <NCollection_Vector.hxx>
#include <NCollection_DynamicArray.hxx>
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<int> myIndexMap; //!< Maps current indices to original 1-based indices
const IntPatch_Polyhedron* myPoly; //!< Reference to the wrapped polyhedron
NCollection_DynamicArray<int> myIndexMap; //!< Maps current indices to original 1-based indices
};
#endif // IntPatch_PolyhedronBVH_HeaderFile