- BOPTools_Tools::UpdateVertex (aC, aT, aV);
- }
- }
-}
-/////////////
-//=======================================================================
-// function: IsPairFound
-// purpose:
-//=======================================================================
-Standard_Boolean IsPairFound(const Standard_Integer nF1,
- const Standard_Integer nF2,
- BOPTools_InterferencePool* myIntrPool,
- BOPTColStd_IndexedDataMapOfIntegerIndexedMapOfInteger& aMapWhat,
- BOPTColStd_IndexedDataMapOfIntegerIndexedMapOfInteger& aMapWith)
-{
- Standard_Boolean bIsFound;
- //
- if (!aMapWhat.Contains(nF1)) {
- TColStd_IndexedMapOfInteger aMWhat;
- FMapWhat(nF1, myIntrPool, aMWhat);
- aMapWhat.Add(nF1, aMWhat);
- }
- //
- if (!aMapWith.Contains(nF2)) {
- TColStd_IndexedMapOfInteger aMWith;
- FMapWith(nF2, myIntrPool, aMWith);
- aMapWith.Add(nF2, aMWith);
- }
- //
- const TColStd_IndexedMapOfInteger& aMWht=aMapWhat.FindFromKey(nF1);
- const TColStd_IndexedMapOfInteger& aMWit=aMapWith.FindFromKey(nF2);
- //
- bIsFound=IsFound(aMWht, aMWit);
- //
- return bIsFound;
-}
-//=======================================================================
-// function: FMapWhat
-// purpose:
-//=======================================================================
-void FMapWhat(const Standard_Integer nF,
- BOPTools_InterferencePool* myIntrPool,
- TColStd_IndexedMapOfInteger& aMapWhat)
-
-{
- Standard_Integer nE, nV;
-
-
-
- BooleanOperations_ShapesDataStructure* myDS=myIntrPool->DS();
- BooleanOperations_OnceExplorer aExp(*myDS);
- //
- // What
- aMapWhat.Add(nF);
- aExp.Init(nF, TopAbs_VERTEX);
- for (; aExp.More(); aExp.Next()) {
- nV=aExp.Current();
- aMapWhat.Add(nV);
- }
- //
- aExp.Init(nF, TopAbs_EDGE);
- for (; aExp.More(); aExp.Next()) {
- nE=aExp.Current();
- aMapWhat.Add(nE);
- }
-}
-//=======================================================================
-// function: FMapWith
-// purpose:
-//=======================================================================
-void FMapWith(const Standard_Integer nF,
- BOPTools_InterferencePool* myIntrPool,
- TColStd_IndexedMapOfInteger& aMapWith)
-{
- TColStd_IndexedMapOfInteger aMapWhat;
-
- FMapWhat(nF, myIntrPool, aMapWhat);
- //
- // With
- Standard_Integer i, aNb, anIndex, aWhat, aWith;
- BOPTools_ListIteratorOfListOfInterference anIt;
-
- const BOPTools_CArray1OfInterferenceLine& anArrIL= myIntrPool->InterferenceTable();
-
- aNb=aMapWhat.Extent();
- for (i=1; i<=aNb; i++) {
- aWhat=aMapWhat(i);
-
- const BOPTools_InterferenceLine& aWithLine=anArrIL(aWhat);
-
- const BOPTools_ListOfInterference& aLI=aWithLine.List();
- anIt.Initialize(aLI);
- for (; anIt.More(); anIt.Next()) {
- const BOPTools_Interference& anIntf=anIt.Value();
- anIndex=anIntf.Index();
- if (anIndex) {
- aWith=anIntf.With();
- aMapWith.Add(aWith);
- }
- }
- }
-}
-//=======================================================================
-// function: IsFound
-// purpose:
-//=======================================================================
-Standard_Boolean IsFound(const TColStd_IndexedMapOfInteger& aMapWhat,
- const TColStd_IndexedMapOfInteger& aMapWith)
-{
- Standard_Boolean bFlag=Standard_False;
- Standard_Integer i, aNb, aWhat;
-
- aNb=aMapWhat.Extent();
- for (i=1; i<=aNb; i++) {
- aWhat=aMapWhat(i);
- if (aMapWith.Contains(aWhat)) {
- return !bFlag;
- }
- }
- return bFlag;
-}
-/*
-//=======================================================================
-// function: PrepareSetForFace
-// purpose:
-//=======================================================================
- void NMTTools_PaveFiller::PrepareSetForFace(const Standard_Integer nF1,
- const Standard_Integer nF2,
- BOPTools_PaveSet& aPSF)
-{
- Standard_Integer nV1, nV2;
- TColStd_MapOfInteger aMap;
- BOPTools_ListOfPaveBlock aLPB1, aLPB2;
- BOPTools_ListIteratorOfListOfPaveBlock anIt;
- //
- RealSplitsFace(nF1, aLPB1);
- RealSplitsFace(nF2, aLPB2);
- //
- aLPB1.Append(aLPB2);
- //
- anIt.Initialize(aLPB1);
- for (; anIt.More(); anIt.Next()) {
- const BOPTools_PaveBlock& aPB=anIt.Value();
- const BOPTools_Pave& aPave1=aPB.Pave1();
- nV1=aPave1.Index();
- if (!aMap.Contains(nV1)) {
- aMap.Add(nV1);
- aPSF.Append(aPave1);
- }
- const BOPTools_Pave& aPave2=aPB.Pave2();
- nV2=aPave2.Index();
- if (!aMap.Contains(nV2)) {
- aMap.Add(nV2);
- aPSF.Append(aPave2);