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