mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-24 13:50:49 +03:00
Fix to avoid exception for case46 (regressions)
This commit is contained in:
@@ -64,6 +64,9 @@
|
||||
#include <BOPCol_ListOfInteger.hxx>
|
||||
#include <BOPInt_Context.hxx>
|
||||
|
||||
#include <TCollection_CompareOfInteger.hxx>
|
||||
#include <TColStd_Array1OfInteger.hxx>
|
||||
#include <SortTools_QuickSortOfInteger.hxx>
|
||||
|
||||
static
|
||||
Standard_Boolean IsClosedShell(const TopoDS_Shell& aSh);
|
||||
@@ -300,8 +303,17 @@ void BOPAlgo_Builder::FillIn3DParts(BOPCol_DataMapOfShapeListOfShape& theInParts
|
||||
aSelector.SetBox(aBoxS);
|
||||
//
|
||||
aNbFP=aBBTree.Select(aSelector);
|
||||
//
|
||||
if (aNbFP) {
|
||||
const BOPCol_ListOfInteger& aLIFP=aSelector.Indices();
|
||||
//sort indices
|
||||
TColStd_Array1OfInteger anArray(1, aNbFP);
|
||||
aItLI.Initialize(aLIFP);
|
||||
for (k = 1; aItLI.More(); aItLI.Next(), ++k) {
|
||||
nFP=aItLI.Value();
|
||||
anArray(k) = nFP;
|
||||
}
|
||||
TCollection_CompareOfInteger comp;
|
||||
SortTools_QuickSortOfInteger::Sort(anArray,comp);
|
||||
//
|
||||
// 2.7. Collect faces that are IN aSolid [ aLFIN ]
|
||||
BOPCol_ListOfShape aLFP(aAlr1);
|
||||
@@ -311,9 +323,8 @@ void BOPAlgo_Builder::FillIn3DParts(BOPCol_DataMapOfShapeListOfShape& theInParts
|
||||
//
|
||||
BOPTools::MapShapes(aSD, TopAbs_EDGE, aME);
|
||||
//
|
||||
aItLI.Initialize(aLIFP);
|
||||
for (; aItLI.More(); aItLI.Next()) {
|
||||
nFP=aItLI.Value();
|
||||
for (k = 1; k <= aNbFP; ++k) {
|
||||
nFP = anArray(k);
|
||||
const BOPAlgo_ShapeBox& aSBF=aDMISB.Find(nFP);
|
||||
const TopoDS_Face& aFP=(*(TopoDS_Face*)&aSBF.Shape());
|
||||
if (aMFDone.Contains(aFP)) {
|
||||
@@ -354,6 +365,7 @@ void BOPAlgo_Builder::FillIn3DParts(BOPCol_DataMapOfShapeListOfShape& theInParts
|
||||
}
|
||||
}// for (; aItLI.More(); aItLI.Next()) {
|
||||
//
|
||||
}
|
||||
// 2.8. Store the results in theInParts, theDraftSolids
|
||||
aNbFIN=aLFIN.Extent();
|
||||
if (aNbFIN || aNbLIF) {
|
||||
|
Reference in New Issue
Block a user