From: msv Date: Tue, 17 Oct 2017 09:30:25 +0000 (+0300) Subject: # Undo the changes from the branch CR29144. X-Git-Url: http://git.dev.opencascade.org/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2FCR29144_2;p=occt-copy.git # Undo the changes from the branch CR29144. # Remove compilation warning. --- diff --git a/src/BOPAlgo/BOPAlgo_BuilderFace.cxx b/src/BOPAlgo/BOPAlgo_BuilderFace.cxx index 243abbf2c0..0473415133 100644 --- a/src/BOPAlgo/BOPAlgo_BuilderFace.cxx +++ b/src/BOPAlgo/BOPAlgo_BuilderFace.cxx @@ -811,13 +811,11 @@ Standard_Boolean IsInside(const TopoDS_Shape& theHole, { Standard_Boolean bRet; - TopAbs_State aState; TopExp_Explorer aExp; BOPCol_IndexedMapOfShape aME2; gp_Pnt2d aP2D; // bRet=Standard_False; - aState=TopAbs_UNKNOWN; const TopoDS_Face& aF2=(*(TopoDS_Face *)(&theF2)); // BOPTools::MapShapes(aF2, TopAbs_EDGE, aME2);//AA diff --git a/src/BOPAlgo/BOPAlgo_PaveFiller.hxx b/src/BOPAlgo/BOPAlgo_PaveFiller.hxx index ae9611afc1..bd4e512fae 100644 --- a/src/BOPAlgo/BOPAlgo_PaveFiller.hxx +++ b/src/BOPAlgo/BOPAlgo_PaveFiller.hxx @@ -493,7 +493,6 @@ protected: Standard_Boolean myIsPrimary; Standard_Boolean myAvoidBuildPCurve; BOPAlgo_GlueEnum myGlue; - NCollection_DataMap> myMapICB; private: diff --git a/src/BOPAlgo/BOPAlgo_PaveFiller_6.cxx b/src/BOPAlgo/BOPAlgo_PaveFiller_6.cxx index b7e65aec3b..37a16e2254 100644 --- a/src/BOPAlgo/BOPAlgo_PaveFiller_6.cxx +++ b/src/BOPAlgo/BOPAlgo_PaveFiller_6.cxx @@ -1045,11 +1045,22 @@ void BOPAlgo_PaveFiller::PostTreatFF iE=myDS->Append(aSI); } // - - Handle(BOPDS_PaveBlock) *pPBC = aMEPB.ChangeSeek(iE); + // update real edge tolerance according to distances in common block if any + if (aPDS->IsCommonBlock(aPBRx)) { + const Handle(BOPDS_CommonBlock)& aCB = aPDS->CommonBlock(aPBRx); + Standard_Real *pTol = aMCBTol.ChangeSeek(aCB); + if (!pTol) { + Standard_Real aTol = BOPAlgo_Tools::ComputeToleranceOfCB(aCB, aPDS, aPF.Context()); + pTol = aMCBTol.Bound(aCB, aTol); + } + // + if (aNC.Tolerance() < *pTol) { + aNC.SetTolerance(*pTol); + } + } // append new PaveBlock to aLPBC - if (!pPBC) - { + Handle(BOPDS_PaveBlock) *pPBC = aMEPB.ChangeSeek(iE); + if (!pPBC) { pPBC = aMEPB.Bound(iE, new BOPDS_PaveBlock()); BOPDS_Pave aPaveR1, aPaveR2; aPaveR1 = aPBRx->Pave1(); @@ -1062,44 +1073,13 @@ void BOPAlgo_PaveFiller::PostTreatFF (*pPBC)->SetEdge(iE); } // - if (bOld) - { + if (bOld) { (*pPBC)->SetOriginalEdge(aPB1->OriginalEdge()); aDMExEdges.ChangeFind(aPB1).Append(*pPBC); } - else - { + else { aLPBC.Append(*pPBC); } - - // update real edge tolerance according to distances in common block if any - if (aPDS->IsCommonBlock(aPBRx)) - { - const Handle(BOPDS_CommonBlock)& aCB = aPDS->CommonBlock(aPBRx); - const Standard_Integer anIdxOriE = aPB1->OriginalEdge(); - - if (pPBC && (anIdxOriE > 0)) - { - // If original edge exists - NCollection_List *aListOfPB = myMapICB.ChangeSeek(iE); - if (aListOfPB == 0) - { - aListOfPB = myMapICB.Bound(iE, NCollection_List()); - } - - aListOfPB->Append(*pPBC); - } - - Standard_Real *pTol = aMCBTol.ChangeSeek(aCB); - if (!pTol) { - Standard_Real aTol = BOPAlgo_Tools::ComputeToleranceOfCB(aCB, aPDS, aPF.Context()); - pTol = aMCBTol.Bound(aCB, aTol); - } - // - if (aNC.Tolerance() < *pTol) { - aNC.SetTolerance(*pTol); - } - } } } } @@ -2437,35 +2417,18 @@ void BOPAlgo_PaveFiller::UpdateExistingPaveBlocks anEF.SetContext(myContext); anEF.Perform(); // - const IntTools_SequenceOfCommonPrts& aCPrts = anEF.CommonParts(); - if (aCPrts.Length() == 1) - { + const IntTools_SequenceOfCommonPrts& aCPrts=anEF.CommonParts(); + if (aCPrts.Length() == 1) { Standard_Boolean bCoinc = (aCPrts(1).Type() == TopAbs_EDGE); - if (bCoinc) - { - if (bCB) - { + if (bCoinc) { + if (bCB) { aCB = myDS->CommonBlock(aPBChangeValue); - const NCollection_List *aListOfPB = myMapICB.Seek(aPBChangeValue->Edge()); - if (aListOfPB) - { - NCollection_List::Iterator anItr(*aListOfPB); - for (; anItr.More(); anItr.Next()) - { - Handle(BOPDS_PaveBlock) &aCurrPB = anItr.ChangeValue(); - aCB->AddPaveBlock(aCurrPB); - myDS->SetCommonBlock(aCurrPB, aCB); - } - } - aCB->AddFace(nF); - } - else - { + } else { aCB = new BOPDS_CommonBlock; aCB->AddPaveBlock(aPBChangeValue); - aCB->AddFace(nF); myDS->SetCommonBlock(aPBChangeValue, aCB); } + aCB->AddFace(nF); // aMPBIn.Add(aPBChangeValue); }