From f2b2db768394adcf28218ff65f5f4027d88e8291 Mon Sep 17 00:00:00 2001 From: nbv Date: Fri, 13 Oct 2017 15:28:19 +0300 Subject: [PATCH] BndBox --- src/BOPAlgo/BOPAlgo_BuilderFace.cxx | 2 +- src/BOPAlgo/BOPAlgo_BuilderSolid.cxx | 4 ++-- src/BOPAlgo/BOPAlgo_Builder_3.cxx | 2 +- src/BOPAlgo/BOPAlgo_PaveFiller_10.cxx | 8 ++++---- src/BOPAlgo/BOPAlgo_PaveFiller_6.cxx | 6 +++--- src/BOPAlgo/BOPAlgo_PaveFiller_7.cxx | 4 ++-- src/BOPDS/BOPDS_DS.cxx | 6 +++--- src/IntTools/IntTools_Context.cxx | 2 +- 8 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/BOPAlgo/BOPAlgo_BuilderFace.cxx b/src/BOPAlgo/BOPAlgo_BuilderFace.cxx index 243abbf2c0..f44ddeb67c 100644 --- a/src/BOPAlgo/BOPAlgo_BuilderFace.cxx +++ b/src/BOPAlgo/BOPAlgo_BuilderFace.cxx @@ -593,7 +593,7 @@ void BOPAlgo_BuilderFace::PerformAreas() // 5.2. Add unused holes to the original face if (aNbHoles != aNbInOutMap) { Bnd_Box aBoxF; - BRepBndLib::Add(myFace, aBoxF); + BRepBndLib::AddOptimal(myFace, aBoxF, Standard_True, Standard_True); if (aBoxF.IsOpenXmin() || aBoxF.IsOpenXmax() || aBoxF.IsOpenYmin() || aBoxF.IsOpenYmax() || aBoxF.IsOpenZmin() || aBoxF.IsOpenZmax()) { diff --git a/src/BOPAlgo/BOPAlgo_BuilderSolid.cxx b/src/BOPAlgo/BOPAlgo_BuilderSolid.cxx index fa19419e77..94c0bec8d8 100644 --- a/src/BOPAlgo/BOPAlgo_BuilderSolid.cxx +++ b/src/BOPAlgo/BOPAlgo_BuilderSolid.cxx @@ -600,7 +600,7 @@ void BOPAlgo_BuilderSolid::PerformAreas() const TopoDS_Shape& aShell = aItLS.Value(); aSB.SetShape(aShell); // - BRepBndLib::Add(aShell, aBox); + BRepBndLib::AddOptimal(aShell, aBox, Standard_True, Standard_True); bIsHole=Standard_False; // bIsGrowth=IsGrowthShell(aShell, aMHF); @@ -834,7 +834,7 @@ void BOPAlgo_BuilderSolid::PerformInternalShapes() const BOPAlgo_FacePnt& aFP=aVFP(k); const TopoDS_Face& aF=aFP.Face(); // - BRepBndLib::Add(aF, aBox); + BRepBndLib::AddOptimal(aF, aBox, Standard_True, Standard_True); aTreeFiller.Add(k, aBox); } // diff --git a/src/BOPAlgo/BOPAlgo_Builder_3.cxx b/src/BOPAlgo/BOPAlgo_Builder_3.cxx index ca5c985ab2..c6a3bfcf3b 100644 --- a/src/BOPAlgo/BOPAlgo_Builder_3.cxx +++ b/src/BOPAlgo/BOPAlgo_Builder_3.cxx @@ -577,7 +577,7 @@ void BOPAlgo_Builder::FillIn3DParts continue; } Bnd_Box aBox; - BRepBndLib::Add(aSx, aBox); + BRepBndLib::AddOptimal(aSx, aBox, Standard_True, Standard_True); aBox.SetGap(aBox.GetGap() + Precision::Confusion()); // BOPAlgo_ShapeBox& aSB=aVSB.Append1(); diff --git a/src/BOPAlgo/BOPAlgo_PaveFiller_10.cxx b/src/BOPAlgo/BOPAlgo_PaveFiller_10.cxx index 37b683ba40..ce1c04bb05 100644 --- a/src/BOPAlgo/BOPAlgo_PaveFiller_10.cxx +++ b/src/BOPAlgo/BOPAlgo_PaveFiller_10.cxx @@ -97,7 +97,7 @@ void BOPAlgo_PaveFiller::UpdateEdgeTolerance (const Standard_Integer nE, const TopoDS_Edge& aE = *(TopoDS_Edge*)&myDS->Shape(nE); aBB.UpdateEdge(aE, aTol); Bnd_Box& aBoxE=aSIE.ChangeBox(); - BRepBndLib::Add(aE, aBoxE); + BRepBndLib::AddOptimal(aE, aBoxE, Standard_True, Standard_True); aBoxE.SetGap(aBoxE.GetGap() + Precision::Confusion()); // aIt.Initialize(aLI); @@ -113,7 +113,7 @@ void BOPAlgo_PaveFiller::UpdateEdgeTolerance (const Standard_Integer nE, aBB.UpdateVertex(aV, aTol); BOPDS_ShapeInfo& aSIV = myDS->ChangeShapeInfo(nV); Bnd_Box& aBoxV = aSIV.ChangeBox(); - BRepBndLib::Add(aV, aBoxV); + BRepBndLib::AddOptimal(aV, aBoxV, Standard_True, Standard_True); aBoxV.SetGap(aBoxV.GetGap() + Precision::Confusion()); } } @@ -141,7 +141,7 @@ Standard_Integer BOPAlgo_PaveFiller::UpdateVertex aBB.UpdateVertex(aVSD, aTolNew); BOPDS_ShapeInfo& aSIV = myDS->ChangeShapeInfo(nVNew); Bnd_Box& aBoxV = aSIV.ChangeBox(); - BRepBndLib::Add(aVSD, aBoxV); + BRepBndLib::AddOptimal(aVSD, aBoxV, Standard_True, Standard_True); aBoxV.SetGap(aBoxV.GetGap() + Precision::Confusion()); } return nVNew; @@ -165,7 +165,7 @@ Standard_Integer BOPAlgo_PaveFiller::UpdateVertex // bounding box for the new vertex BOPDS_ShapeInfo& aSIDS = myDS->ChangeShapeInfo(nVNew); Bnd_Box& aBoxDS = aSIDS.ChangeBox(); - BRepBndLib::Add(aVNew, aBoxDS); + BRepBndLib::AddOptimal(aVNew, aBoxDS, Standard_True, Standard_True); aBoxDS.SetGap(aBoxDS.GetGap() + Precision::Confusion()); // // add vertex to SD map diff --git a/src/BOPAlgo/BOPAlgo_PaveFiller_6.cxx b/src/BOPAlgo/BOPAlgo_PaveFiller_6.cxx index 37a16e2254..c3fa855981 100644 --- a/src/BOPAlgo/BOPAlgo_PaveFiller_6.cxx +++ b/src/BOPAlgo/BOPAlgo_PaveFiller_6.cxx @@ -630,7 +630,7 @@ void BOPAlgo_PaveFiller::MakeBlocks() BOPDS_ShapeInfo& aSIDS=myDS->ChangeShapeInfo(nV1); Bnd_Box& aBoxDS=aSIDS.ChangeBox(); aBoxDS = Bnd_Box(); - BRepBndLib::Add(aV, aBoxDS); + BRepBndLib::AddOptimal(aV, aBoxDS, Standard_True, Standard_True); aBoxDS.SetGap(aBoxDS.GetGap() + Precision::Confusion()); // if (aDMVLV.IsBound(nV1)) @@ -1536,7 +1536,7 @@ void BOPAlgo_PaveFiller::PutBoundPaveOnCurve(const TopoDS_Face& aF1, // BOPDS_ShapeInfo& aSIDS=myDS->ChangeShapeInfo(nVn); Bnd_Box& aBoxDS=aSIDS.ChangeBox(); - BRepBndLib::Add(aVn, aBoxDS); + BRepBndLib::AddOptimal(aVn, aBoxDS, Standard_True, Standard_True); aBoxDS.SetGap(aBoxDS.GetGap() + Precision::Confusion()); // aLVB.Append(nVn); @@ -2154,7 +2154,7 @@ void BOPAlgo_PaveFiller::PutPaveOnCurve // BOPDS_ShapeInfo& aSIDS=myDS->ChangeShapeInfo(nV); Bnd_Box& aBoxDS=aSIDS.ChangeBox(); - BRepBndLib::Add(aV, aBoxDS); + BRepBndLib::AddOptimal(aV, aBoxDS, Standard_True, Standard_True); aBoxDS.SetGap(aBoxDS.GetGap() + Precision::Confusion()); } } diff --git a/src/BOPAlgo/BOPAlgo_PaveFiller_7.cxx b/src/BOPAlgo/BOPAlgo_PaveFiller_7.cxx index 1e91f5529a..b510c9d6ce 100644 --- a/src/BOPAlgo/BOPAlgo_PaveFiller_7.cxx +++ b/src/BOPAlgo/BOPAlgo_PaveFiller_7.cxx @@ -142,7 +142,7 @@ class BOPAlgo_SplitEdge : public BOPAlgo_Algo { myV1, myT1, myV2, myT2, myESp); - BRepBndLib::Add(myESp, myBox); + BRepBndLib::AddOptimal(myESp, myBox, Standard_True, Standard_True); myBox.SetGap(myBox.GetGap() + Precision::Confusion()); } // @@ -525,7 +525,7 @@ Standard_Integer BOPAlgo_PaveFiller::SplitEdge(const Standard_Integer nE, aSI.SetShape(aSp); // Bnd_Box& aBox=aSI.ChangeBox(); - BRepBndLib::Add(aSp, aBox); + BRepBndLib::AddOptimal(aSp, aBox, Standard_True, Standard_True); aBox.SetGap(aBox.GetGap() + Precision::Confusion()); // nSp=myDS->Append(aSI); diff --git a/src/BOPDS/BOPDS_DS.cxx b/src/BOPDS/BOPDS_DS.cxx index 9ed03f53d1..28d69558ec 100644 --- a/src/BOPDS/BOPDS_DS.cxx +++ b/src/BOPDS/BOPDS_DS.cxx @@ -463,7 +463,7 @@ void BOPDS_DS::Init(const Standard_Real theFuzz) } // Bnd_Box& aBox=aSI.ChangeBox(); - BRepBndLib::Add(aE, aBox); + BRepBndLib::AddOptimal(aE, aBox, Standard_True, Standard_True); // const BOPCol_ListOfInteger& aLV=aSI.SubShapes(); aIt1.Initialize(aLV); @@ -490,7 +490,7 @@ void BOPDS_DS::Init(const Standard_Real theFuzz) const TopoDS_Shape& aS=aSI.Shape(); // Bnd_Box& aBox=aSI.ChangeBox(); - BRepBndLib::Add(aS, aBox); + BRepBndLib::AddOptimal(aS, aBox, Standard_True, Standard_True); // BOPCol_ListOfInteger& aLW=aSI.ChangeSubShapes(); aIt1.Initialize(aLW); @@ -1786,7 +1786,7 @@ void BOPDS_DS::UpdateEdgeTolerance(const Standard_Integer nE, aBB.UpdateEdge(aE, aTol); BOPDS_ShapeInfo& aSIE=ChangeShapeInfo(nE); Bnd_Box& aBoxE=aSIE.ChangeBox(); - BRepBndLib::Add(aE, aBoxE); + BRepBndLib::AddOptimal(aE, aBoxE, Standard_True, Standard_True); aBoxE.SetGap(aBoxE.GetGap() + aTolAdd); // const BOPCol_ListOfInteger& aLI = aSIE.SubShapes(); diff --git a/src/IntTools/IntTools_Context.cxx b/src/IntTools/IntTools_Context.cxx index 903a0e38f9..b7a53dd67b 100644 --- a/src/IntTools/IntTools_Context.cxx +++ b/src/IntTools/IntTools_Context.cxx @@ -199,7 +199,7 @@ Bnd_Box& IntTools_Context::BndBox(const TopoDS_Shape& aS) new (pBox) Bnd_Box(); // Bnd_Box &aBox=*pBox; - BRepBndLib::Add(aS, aBox); + BRepBndLib::AddOptimal(aS, aBox, Standard_True, Standard_True); // anAdr=(Standard_Address)pBox; myBndBoxDataMap.Bind(aS, anAdr); -- 2.39.5