1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +03:00

0025319: Bop Common produces strange results with same shapes.

class BOPAlgo_Builder
method
  void BOPAlgo_Builder::FillIn3DParts
    (BOPCol_DataMapOfShapeListOfShape& theInParts,
     BOPCol_DataMapOfShapeShape& theDraftSolids,
     const BOPCol_BaseAllocator&)
Sort faces before its classification relatively to the solid.

Test cases for issue CR25319

Correction of test cases for issue CR25319
This commit is contained in:
emv
2014-10-16 15:30:12 +04:00
committed by bugmaster
parent 2a2e3ecdc7
commit 4691b61a72
4 changed files with 72 additions and 3 deletions

View File

@@ -65,6 +65,7 @@
#include <BOPTools_Set.hxx>
//
#include <BOPAlgo_BuilderSolid.hxx>
#include <NCollection_Array1.hxx>
static
@@ -313,6 +314,14 @@ void BOPAlgo_Builder::FillIn3DParts
aNbFP=aBBTree.Select(aSelector);
//
const BOPCol_ListOfInteger& aLIFP=aSelector.Indices();
//sort indices
NCollection_Array1<Standard_Integer> aIVec(1, aNbFP);
aItLI.Initialize(aLIFP);
for (k = 1; aItLI.More(); aItLI.Next(), ++k) {
nFP=aItLI.Value();
aIVec(k) = nFP;
}
std::sort(aIVec.begin(), aIVec.end());
//
// 2.5. Collect faces that are IN aSolid [ aLFIN ]
BOPCol_ListOfShape aLFP(aAlr1);
@@ -322,9 +331,8 @@ void BOPAlgo_Builder::FillIn3DParts
//
BOPTools::MapShapes(aSD, TopAbs_EDGE, aME);
//
aItLI.Initialize(aLIFP);
for (; aItLI.More(); aItLI.Next()) {
nFP=aItLI.Value();
for (k = 1; k <= aNbFP; ++k) {
nFP = aIVec(k);
const BOPAlgo_ShapeBox& aSBF=aDMISB.Find(nFP);
const TopoDS_Face& aFP=(*(TopoDS_Face*)&aSBF.Shape());
if (aMF.Contains(aFP)) {