X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FGeomAlgoImpl%2FGEOMAlgo_Splitter.cxx;h=7e93fc90372fae4050b301551da837005fe79b84;hb=3692e4ddfe1d709b235b6f1a8b96218ead1a45c5;hp=364834d40408dee94994d04ad16b54d7ba64d637;hpb=440f972571097934b69e41ed3f264e2cd355051e;p=modules%2Fshaper.git diff --git a/src/GeomAlgoImpl/GEOMAlgo_Splitter.cxx b/src/GeomAlgoImpl/GEOMAlgo_Splitter.cxx old mode 100755 new mode 100644 index 364834d40..7e93fc903 --- a/src/GeomAlgoImpl/GEOMAlgo_Splitter.cxx +++ b/src/GeomAlgoImpl/GEOMAlgo_Splitter.cxx @@ -1,7 +1,4 @@ -// Copyright (C) 2007-2015 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2007-2024 CEA, EDF // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public @@ -23,22 +20,16 @@ #include #include - +#include #include #include #include #include -#include -#include - -#include - - static void TreatCompound(const TopoDS_Shape& aC, - BOPCol_ListOfShape& aLSX); + NCollection_List& aLSX); //======================================================================= //function : @@ -90,7 +81,7 @@ void GEOMAlgo_Splitter::AddTool(const TopoDS_Shape& theShape) //function : Tools //purpose : //======================================================================= -const BOPCol_ListOfShape& GEOMAlgo_Splitter::Tools()const +const NCollection_List& GEOMAlgo_Splitter::Tools()const { return myTools; } @@ -143,14 +134,10 @@ void GEOMAlgo_Splitter::Clear() //======================================================================= void GEOMAlgo_Splitter::BuildResult(const TopAbs_ShapeEnum theType) { -#ifndef USE_OCCT_720 - myErrorStatus=0; -#endif - // TopAbs_ShapeEnum aType; BRep_Builder aBB; - BOPCol_MapOfShape aM; - BOPCol_ListIteratorOfListOfShape aIt, aItIm; + NCollection_Map aM; + NCollection_List::Iterator aIt, aItIm; // aIt.Initialize(myArguments); for (; aIt.More(); aIt.Next()) { @@ -158,7 +145,7 @@ void GEOMAlgo_Splitter::BuildResult(const TopAbs_ShapeEnum theType) aType=aS.ShapeType(); if (aType==theType && !myMapTools.Contains(aS)) { if (myImages.IsBound(aS)) { - const BOPCol_ListOfShape& aLSIm=myImages.Find(aS); + const NCollection_List& aLSIm=myImages.Find(aS); aItIm.Initialize(aLSIm); for (; aItIm.More(); aItIm.Next()) { const TopoDS_Shape& aSIm=aItIm.Value(); @@ -179,17 +166,21 @@ void GEOMAlgo_Splitter::BuildResult(const TopAbs_ShapeEnum theType) //function : PostTreat //purpose : //======================================================================= +#if OCC_VERSION_LARGE < 0x07070000 void GEOMAlgo_Splitter::PostTreat() +#else +void GEOMAlgo_Splitter::PostTreat(const Message_ProgressRange& theRange) +#endif { if (myLimit!=TopAbs_SHAPE) { Standard_Integer i, aNbS; BRep_Builder aBB; TopoDS_Compound aC; - BOPCol_IndexedMapOfShape aMx; + TopTools_IndexedMapOfShape aMx; // aBB.MakeCompound(aC); // - BOPTools::MapShapes(myShape, myLimit, aMx); + TopExp::MapShapes(myShape, myLimit, aMx); aNbS=aMx.Extent(); for (i=1; i<=aNbS; ++i) { const TopoDS_Shape& aS=aMx(i); @@ -198,9 +189,9 @@ void GEOMAlgo_Splitter::PostTreat() if (myLimitMode) { Standard_Integer iType, iLimit, iTypeX; TopAbs_ShapeEnum aType, aTypeX; - BOPCol_ListOfShape aLSP, aLSX; - BOPCol_ListIteratorOfListOfShape aIt, aItX, aItIm; - BOPCol_MapOfShape aM; + NCollection_List aLSP, aLSX; + NCollection_List::Iterator aIt, aItX, aItIm; + NCollection_Map aM; // iLimit=(Standard_Integer)myLimit; // @@ -238,13 +229,13 @@ void GEOMAlgo_Splitter::PostTreat() }// for (; aIt.More(); aIt.Next()) { // aMx.Clear(); - BOPTools::MapShapes(aC, aMx); + TopExp::MapShapes(aC, aMx); // 2. Add them to aC aIt.Initialize(aLSP); for (; aIt.More(); aIt.Next()) { const TopoDS_Shape& aS=aIt.Value(); if (myImages.IsBound(aS)) { - const BOPCol_ListOfShape& aLSIm=myImages.Find(aS); + const NCollection_List& aLSIm=myImages.Find(aS); aItIm.Initialize(aLSIm); for (; aItIm.More(); aItIm.Next()) { const TopoDS_Shape& aSIm=aItIm.Value(); @@ -269,7 +260,7 @@ void GEOMAlgo_Splitter::PostTreat() // Standard_Integer aNbS; TopoDS_Iterator aIt; - BOPCol_ListOfShape aLS; + NCollection_List aLS; // aIt.Initialize(myShape); for (; aIt.More(); aIt.Next()) { @@ -281,19 +272,23 @@ void GEOMAlgo_Splitter::PostTreat() myShape=aLS.First(); } // +#if OCC_VERSION_LARGE < 0x07070000 BOPAlgo_Builder::PostTreat(); +#else + BOPAlgo_Builder::PostTreat(theRange); +#endif } //======================================================================= //function : TreatCompound //purpose : //======================================================================= void TreatCompound(const TopoDS_Shape& aC1, - BOPCol_ListOfShape& aLSX) + NCollection_List& aLSX) { Standard_Integer aNbC1; TopAbs_ShapeEnum aType; - BOPCol_ListOfShape aLC, aLC1; - BOPCol_ListIteratorOfListOfShape aIt, aIt1; + NCollection_List aLC, aLC1; + NCollection_List::Iterator aIt, aIt1; TopoDS_Iterator aItC; // aLC.Append (aC1);