mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-04 13:13:25 +03:00
0028284: Avoid classification of sub-shapes of arguments of BOPs relatively solids during Intersection phase
1. The methods PerformVZ, PerformEZ, PerformFZ and PerformZZ have been transferred from BOPAlgo_PaveFiller to BOPAlgo_CheckerSI class to perform intersection of sub-shapes with solids only in self-intersection mode. 2. The checks for solids built from the same (shared) faces have been added into methods building the result of Boolean operations - BOPAlgo_BOP::BuildRC() and BOPAlgo_BOP::BuildSolid(). 3. Since the NonDestructive mode is now natively supported by the BOPAlgo_PaveFiller the methods providing the support of this mode by CheckerSI (BOPAlgo_CheckerSI::PrepareCopy() and BOPAlgo_CheckerSI::PostTreatCopy()) are not needed and have been removed. 4. The pairs of sub-shapes with interfering bounding boxes are now sorted before real intersection to guarantee the constant order of intersection of sub-shapes and produce more stable result. The class BOPDS_PassKey has been replaced with simpler class BOPDS_Pair. 5. The class BOPDS_SubIterator has been refactored. 6. Test cases for the issue. 7. Adjustment of the test case boolean volumemaker D2.
This commit is contained in:
@@ -18,7 +18,7 @@
|
||||
#include <BOPAlgo_CheckResult.hxx>
|
||||
#include <BOPCol_ListOfShape.hxx>
|
||||
#include <BOPDS_DS.hxx>
|
||||
#include <BOPDS_MapOfPassKey.hxx>
|
||||
#include <BOPDS_MapOfPair.hxx>
|
||||
#include <BOPTest.hxx>
|
||||
#include <BOPTest_Objects.hxx>
|
||||
#include <BOPTools_AlgoTools.hxx>
|
||||
@@ -207,7 +207,7 @@ Standard_Integer bopcheck (Draw_Interpretor& di,
|
||||
TopAbs_ShapeEnum aType1, aType2;
|
||||
BOPAlgo_CheckerSI aChecker;
|
||||
BOPCol_ListOfShape aLS;
|
||||
BOPDS_MapIteratorMapOfPassKey aItMPK;
|
||||
BOPDS_MapIteratorOfMapOfPair aItMPK;
|
||||
//
|
||||
if (aLevel < (aNbInterfTypes-1)) {
|
||||
di << "Info:\nThe level of check is set to "
|
||||
@@ -239,7 +239,7 @@ Standard_Integer bopcheck (Draw_Interpretor& di,
|
||||
//
|
||||
const BOPDS_DS& aDS=*(aChecker.PDS());
|
||||
//
|
||||
const BOPDS_MapOfPassKey& aMPK=aDS.Interferences();
|
||||
const BOPDS_MapOfPair& aMPK=aDS.Interferences();
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
using namespace std;
|
||||
vector <BOPTest_Interf> aVec;
|
||||
@@ -248,8 +248,8 @@ Standard_Integer bopcheck (Draw_Interpretor& di,
|
||||
//
|
||||
aItMPK.Initialize(aMPK);
|
||||
for (; aItMPK.More(); aItMPK.Next()) {
|
||||
const BOPDS_PassKey& aPK=aItMPK.Value();
|
||||
aPK.Ids(n1, n2);
|
||||
const BOPDS_Pair& aPK=aItMPK.Value();
|
||||
aPK.Indices(n1, n2);
|
||||
if(aDS.IsNewShape(n1) || aDS.IsNewShape(n2)) {
|
||||
continue;
|
||||
}
|
||||
|
@@ -235,7 +235,6 @@ Standard_Integer bopiterator (Draw_Interpretor& di,
|
||||
return 1;
|
||||
}
|
||||
//
|
||||
Standard_Boolean bFlag;
|
||||
Standard_Integer n1, n2;
|
||||
char buf[64], aST1[10], aST2[10];
|
||||
BOPDS_Iterator aIt;
|
||||
@@ -252,12 +251,12 @@ Standard_Integer bopiterator (Draw_Interpretor& di,
|
||||
for (i = 0; i < 4; ++i) {
|
||||
GetNameByType(aT[i], aST1);
|
||||
//
|
||||
for (j = 0; j < 4; ++j) {
|
||||
for (j = i; j < 4; ++j) {
|
||||
GetNameByType(aT[j], aST2);
|
||||
//
|
||||
aIt.Initialize(aT[i], aT[j]);
|
||||
for (; aIt.More(); aIt.Next()) {
|
||||
aIt.Value(n1, n2, bFlag);
|
||||
aIt.Value(n1, n2);
|
||||
//
|
||||
Sprintf(buf, "%s/%s: (z%d z%d)\n", aST1, aST2, n1, n2);
|
||||
di << buf;
|
||||
@@ -276,7 +275,7 @@ Standard_Integer bopiterator (Draw_Interpretor& di,
|
||||
//
|
||||
aIt.Initialize(aT1, aT2);
|
||||
for (; aIt.More(); aIt.Next()) {
|
||||
aIt.Value(n1, n2, bFlag);
|
||||
aIt.Value(n1, n2);
|
||||
//
|
||||
Sprintf(buf, "%s/%s: (z%d z%d)\n", aST1, aST2, n1, n2);
|
||||
di << buf;
|
||||
|
Reference in New Issue
Block a user