X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FGEOMAlgo%2FGEOMAlgo_Gluer.cxx;h=a147c90b0f82a11080a583740d067cb136cb0681;hb=72d99f0d9031406e798abd00f41079533f3cf99f;hp=bd497c1f3b9a61731968d89cc3d916aae4998777;hpb=ca429d817a18d6acc571443f6a596575dee03c2f;p=modules%2Fgeom.git diff --git a/src/GEOMAlgo/GEOMAlgo_Gluer.cxx b/src/GEOMAlgo/GEOMAlgo_Gluer.cxx index bd497c1f3..a147c90b0 100755 --- a/src/GEOMAlgo/GEOMAlgo_Gluer.cxx +++ b/src/GEOMAlgo/GEOMAlgo_Gluer.cxx @@ -1,11 +1,36 @@ +// Copyright (C) 2007-2008 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 +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// // File: GEOMAlgo_Gluer.cxx // Created: Sat Dec 04 12:45:53 2004 // Author: Peter KURNEV // - - +// #include +#include +#include + +#include +#include #include #include @@ -32,6 +57,7 @@ #include #include #include +#include #include #include @@ -57,9 +83,14 @@ #include #include -#include -#include +#include +#include #include +// + +static + void GetSubShapes(const TopoDS_Shape& aS, + TopTools_IndexedMapOfShape& aMSS); //======================================================================= //function : GEOMAlgo_Gluer @@ -72,6 +103,7 @@ GEOMAlgo_Gluer::GEOMAlgo_Gluer() myTolerance=0.0001; myTol=myTolerance; myCheckGeometry=Standard_True; + myKeepNonSolids=Standard_False; myNbAlone=0; } //======================================================================= @@ -98,6 +130,14 @@ Standard_Boolean GEOMAlgo_Gluer::CheckGeometry() const return myCheckGeometry; } //======================================================================= +//function : SetKeepNonSolids +//purpose : +//======================================================================= +void GEOMAlgo_Gluer::SetKeepNonSolids(const Standard_Boolean aFlag) +{ + myKeepNonSolids=aFlag; +} +//======================================================================= //function : AloneShapes //purpose : //======================================================================= @@ -154,11 +194,9 @@ void GEOMAlgo_Gluer::MakeVertices() { myErrorStatus=0; // - Standard_Integer j, i, aNbV, aIndex, aNbVSD; + Standard_Integer j, i, aNbV, aNbVSD; TColStd_ListIteratorOfListOfInteger aIt; - Handle(Bnd_HArray1OfBox) aHAB; - Bnd_BoundSortBox aBSB; - TopoDS_Shape aSTmp, aVF; + TopoDS_Shape aVF; TopoDS_Vertex aVnew; TopTools_IndexedMapOfShape aMV, aMVProcessed; TopTools_ListIteratorOfListOfShape aItS; @@ -167,6 +205,11 @@ void GEOMAlgo_Gluer::MakeVertices() GEOMAlgo_IndexedDataMapOfIntegerShape aMIS; GEOMAlgo_IndexedDataMapOfShapeBox aMSB; // + NMTDS_BoxBndTreeSelector aSelector; + NMTDS_BoxBndTree aBBTree; + NCollection_UBTreeFiller aTreeFiller(aBBTree); + // + // TopExp::MapShapes(myShape, TopAbs_VERTEX, aMV); aNbV=aMV.Extent(); if (!aNbV) { @@ -174,21 +217,23 @@ void GEOMAlgo_Gluer::MakeVertices() return; } // - aHAB=new Bnd_HArray1OfBox(1, aNbV); - // for (i=1; i<=aNbV; ++i) { const TopoDS_Shape& aV=aMV(i); Bnd_Box aBox; // aBox.SetGap(myTol); BRepBndLib::Add(aV, aBox); - aHAB->SetValue(i, aBox); + // + aTreeFiller.Add(i, aBox); + // aMIS.Add(i, aV); aMSB.Add(aV, aBox); } // - aBSB.Initialize(aHAB); + aTreeFiller.Fill(); // + //------------------------------ + // Chains for (i=1; i<=aNbV; ++i) { const TopoDS_Shape& aV=aMV(i); // @@ -196,31 +241,86 @@ void GEOMAlgo_Gluer::MakeVertices() continue; } // - const Bnd_Box& aBoxV=aMSB.FindFromKey(aV); - const TColStd_ListOfInteger& aLI=aBSB.Compare(aBoxV); - aNbVSD=aLI.Extent(); - if (!aNbVSD) { - myErrorStatus=3; // it must not be - return; - } + Standard_Integer aNbIP, aIP, aNbIP1, aIP1; + TopTools_ListOfShape aLVSD; + TColStd_MapOfInteger aMIP, aMIP1, aMIPC; + TColStd_MapIteratorOfMapOfInteger aIt1; // - // Images + aMIP.Add(i); + while(1) { + aNbIP=aMIP.Extent(); + aIt1.Initialize(aMIP); + for(; aIt1.More(); aIt1.Next()) { + aIP=aIt1.Key(); + if (aMIPC.Contains(aIP)) { + continue; + } + // + const TopoDS_Shape& aVP=aMIS.FindFromKey(aIP); + const Bnd_Box& aBoxVP=aMSB.FindFromKey(aVP); + // + aSelector.Clear(); + aSelector.SetBox(aBoxVP); + // + aNbVSD=aBBTree.Select(aSelector); + if (!aNbVSD) { + continue; // it must not be + } + // + const TColStd_ListOfInteger& aLI=aSelector.Indices(); + aIt.Initialize(aLI); + for (; aIt.More(); aIt.Next()) { + aIP1=aIt.Value(); + if (aMIP.Contains(aIP1)) { + continue; + } + aMIP1.Add(aIP1); + } //for (; aIt.More(); aIt.Next()) { + }//for(; aIt1.More(); aIt1.Next()) { + // + aNbIP1=aMIP1.Extent(); + if (!aNbIP1) { + break; + } + // + aIt1.Initialize(aMIP); + for(; aIt1.More(); aIt1.Next()) { + aIP=aIt1.Key(); + aMIPC.Add(aIP); + } + // + aMIP.Clear(); + aIt1.Initialize(aMIP1); + for(; aIt1.More(); aIt1.Next()) { + aIP=aIt1.Key(); + aMIP.Add(aIP); + } + aMIP1.Clear(); + }// while(1) // - TopTools_ListOfShape aLVSD; + // Fill myImages + aNbIP=aMIPC.Extent(); // - aIt.Initialize(aLI); - for (j=0; aIt.More(); aIt.Next(), ++j) { - aIndex=aIt.Value(); - const TopoDS_Shape& aVx=aMIS.FindFromKey(aIndex); - if(!j) { - aVF=aVx; + if (!aNbIP) {// no SD vertices founded + aVF=aV; + aLVSD.Append(aV); + aMVProcessed.Add(aV); + } + else { // SD vertices founded [ aMIPC ] + aIt1.Initialize(aMIPC); + for(j=0; aIt1.More(); aIt1.Next(), ++j) { + aIP=aIt1.Key(); + const TopoDS_Shape& aVP=aMIS.FindFromKey(aIP); + if (!j) { + aVF=aVP; + } + aLVSD.Append(aVP); + aMVProcessed.Add(aVP); } - aLVSD.Append(aVx); - aMVProcessed.Add(aVx); } - // myImages.Bind(aVF, aLVSD); - } + }// for (i=1; i<=aNbV; ++i) { + //------------------------------ // // Make new vertices aMV.Clear(); @@ -256,7 +356,6 @@ void GEOMAlgo_Gluer::MakeVertices() for (; aItIm.More(); aItIm.Next()) { const TopoDS_Shape& aV=aItIm.Key(); const TopTools_ListOfShape& aLVSD=aItIm.Value(); - // aItS.Initialize(aLVSD); for (; aItS.More(); aItS.Next()) { const TopoDS_Shape& aVSD=aItS.Value(); @@ -267,39 +366,45 @@ void GEOMAlgo_Gluer::MakeVertices() } } //======================================================================= -//function : MakeSolids +//function : MakeSubShapes //purpose : //======================================================================= -void GEOMAlgo_Gluer::MakeSolids() +void GEOMAlgo_Gluer::MakeSubShapes (const TopoDS_Shape& theShape, + TopTools_MapOfShape& theMS, + TopoDS_Compound& theResult) { - myErrorStatus=0; + if (theMS.Contains(theShape)) + return; // - Standard_Integer aNbS; - TopAbs_Orientation anOr; - TopoDS_Compound aCmp; - TopoDS_Solid aNewSolid; - TopTools_IndexedMapOfShape aMS; - TopExp_Explorer aExpS, aExp; BRep_Builder aBB; // - aBB.MakeCompound(aCmp); + theMS.Add(theShape); // - aNbS=aMS.Extent(); - aExpS.Init(myShape, TopAbs_SOLID); - for (; aExpS.More(); aExpS.Next()) { - const TopoDS_Solid& aSolid=TopoDS::Solid(aExpS.Current()); - if (aMS.Contains(aSolid)) { - continue; + if (theShape.ShapeType() == TopAbs_COMPOUND || + theShape.ShapeType() == TopAbs_COMPSOLID) + { + TopoDS_Iterator It (theShape, Standard_True, Standard_True); + for (; It.More(); It.Next()) + { + MakeSubShapes(It.Value(), theMS, theResult); } - aMS.Add(aSolid); + } + else if (theShape.ShapeType() == TopAbs_SOLID) + { + // build a solid + TopoDS_Solid aNewSolid; + TopExp_Explorer aExpS, aExp; // - anOr=aSolid.Orientation(); + const TopoDS_Solid& aSolid = TopoDS::Solid(theShape); + // + TopAbs_Orientation anOr = aSolid.Orientation(); // aBB.MakeSolid(aNewSolid); aNewSolid.Orientation(anOr); // aExp.Init(aSolid, TopAbs_SHELL); - for (; aExp.More(); aExp.Next()) { + for (; aExp.More(); aExp.Next()) + { const TopoDS_Shape& aShell=aExp.Current(); const TopoDS_Shape& aShellR=myOrigins.Find(aShell); aBB.Add(aNewSolid, aShellR); @@ -311,14 +416,88 @@ void GEOMAlgo_Gluer::MakeSolids() myImages.Bind(aNewSolid, aLS); myOrigins.Bind(aSolid, aNewSolid); // - aBB.Add(aCmp, aNewSolid); + aBB.Add(theResult, aNewSolid); } + else if (theShape.ShapeType() == TopAbs_WIRE) + { + if (myKeepNonSolids) + { + // just add image + if (!myOrigins.IsBound(theShape)) + { + // build wire + const TopoDS_Wire& aW=TopoDS::Wire(theShape); + // + TopoDS_Wire newWire; + aBB.MakeWire(newWire); + // + TopExp_Explorer aExpE (aW, TopAbs_EDGE); + for (; aExpE.More(); aExpE.Next()) { + const TopoDS_Edge& aE=TopoDS::Edge(aExpE.Current()); + TopoDS_Edge aER=TopoDS::Edge(myOrigins.Find(aE)); + // + aER.Orientation(TopAbs_FORWARD); + if (!BRep_Tool::Degenerated(aER)) { + // build p-curve + //if (bIsUPeriodic) { + // GEOMAlgo_Tools::RefinePCurveForEdgeOnFace(aER, aFFWD, aUMin, aUMax); + //} + //BOPTools_Tools2D::BuildPCurveForEdgeOnFace(aER, aFFWD); + // + // orient image + Standard_Boolean bIsToReverse=BOPTools_Tools3D::IsSplitToReverse1(aER, aE, myContext); + if (bIsToReverse) { + aER.Reverse(); + } + } + else { + aER.Orientation(aE.Orientation()); + } + // + aBB.Add(newWire, aER); + } + // xf + TopTools_ListOfShape aLW; + // + aLW.Append(aW); + myImages.Bind(newWire, aLW); + myOrigins.Bind(aW, newWire); + } + const TopoDS_Shape& aShapeR = myOrigins.Find(theShape); + aBB.Add(theResult, aShapeR); + } + } + else + { + if (myKeepNonSolids) + { + // just add image + const TopoDS_Shape& aShapeR = myOrigins.Find(theShape); + aBB.Add(theResult, aShapeR); + } + } +} +//======================================================================= +//function : MakeSolids +//purpose : +//======================================================================= +void GEOMAlgo_Gluer::MakeSolids() +{ + myErrorStatus=0; + // + BRep_Builder aBB; + TopoDS_Compound aCmp; + TopTools_MapOfShape aMS; + // + aBB.MakeCompound(aCmp); + // + // Add images of all initial sub-shapes in the result. + // If myKeepNonSolids==false, add only solids images. + MakeSubShapes(myShape, aMS, aCmp); // myResult=aCmp; // - aNbS=aMS.Extent(); - if (aNbS) { - Standard_Real aTol=1.e-7; + if (aMS.Extent()) { BOP_CorrectTolerances::CorrectCurveOnSurface(myResult); } } @@ -394,12 +573,13 @@ void GEOMAlgo_Gluer::MakeShapes(const TopAbs_ShapeEnum aType) { myErrorStatus=0; // + Standard_Boolean bHasNewSubShape; Standard_Integer i, aNbF, aNbSDF, iErr; TopoDS_Shape aNewShape; TopTools_IndexedMapOfShape aMF; TopTools_ListIteratorOfListOfShape aItS; - GEOMAlgo_PassKey aPKF; - GEOMAlgo_IndexedDataMapOfPassKeyListOfShape aMPKLF; + GEOMAlgo_PassKeyShape aPKF; + GEOMAlgo_IndexedDataMapOfPassKeyShapeListOfShape aMPKLF; // TopExp::MapShapes(myShape, aType, aMF); // @@ -407,7 +587,6 @@ void GEOMAlgo_Gluer::MakeShapes(const TopAbs_ShapeEnum aType) for (i=1; i<=aNbF; ++i) { const TopoDS_Shape& aS=aMF(i); // - aPKF.Clear(); if (aType==TopAbs_FACE) { const TopoDS_Face& aF=TopoDS::Face(aS); FacePassKey(aF, aPKF); @@ -442,6 +621,7 @@ void GEOMAlgo_Gluer::MakeShapes(const TopAbs_ShapeEnum aType) } // // Images/Origins + // aNbF=aMPKLF.Extent(); for (i=1; i<=aNbF; ++i) { const TopTools_ListOfShape& aLSDF=aMPKLF(i); @@ -451,19 +631,33 @@ void GEOMAlgo_Gluer::MakeShapes(const TopAbs_ShapeEnum aType) } // const TopoDS_Shape& aS1=aLSDF.First(); - if (aType==TopAbs_FACE) { - TopoDS_Face aNewFace; - // - const TopoDS_Face& aF1=TopoDS::Face(aS1); - MakeFace(aF1, aNewFace); - aNewShape=aNewFace; + // + bHasNewSubShape=Standard_True; + // prevent creation of a new shape if there are not + // new subshapes of aSS among the originals + if (aNbSDF==1) { + bHasNewSubShape=HasNewSubShape(aS1); + if (!bHasNewSubShape) { + aNewShape=aS1; + aNewShape.Orientation(TopAbs_FORWARD); + } } - else if (aType==TopAbs_EDGE) { - TopoDS_Edge aNewEdge; - // - const TopoDS_Edge& aE1=TopoDS::Edge(aS1); - MakeEdge(aE1, aNewEdge); - aNewShape=aNewEdge; + // + if (bHasNewSubShape) { + if (aType==TopAbs_FACE) { + TopoDS_Face aNewFace; + // + const TopoDS_Face& aF1=TopoDS::Face(aS1); + MakeFace(aF1, aNewFace); + aNewShape=aNewFace; + } + else if (aType==TopAbs_EDGE) { + TopoDS_Edge aNewEdge; + // + const TopoDS_Edge& aE1=TopoDS::Edge(aS1); + MakeEdge(aE1, aNewEdge); + aNewShape=aNewEdge; + } } // myImages.Bind(aNewShape, aLSDF); @@ -579,19 +773,14 @@ void GEOMAlgo_Gluer::InnerTolerance() //purpose : //======================================================================= void GEOMAlgo_Gluer::FacePassKey(const TopoDS_Face& aF, - GEOMAlgo_PassKey& aPK) + GEOMAlgo_PassKeyShape& aPK) { - Standard_Integer i, aNbE, aNbMax; + Standard_Integer i, aNbE; TopTools_ListOfShape aLE; TopTools_IndexedMapOfShape aME; // TopExp::MapShapes(aF, TopAbs_EDGE, aME); aNbE=aME.Extent(); - aNbMax=aPK.NbMax(); - if (!aNbE || aNbE>aNbMax) { - myErrorStatus=101; // temprorary - return; - } // for (i=1; i<=aNbE; ++i) { const TopoDS_Shape& aE=aME(i); @@ -602,14 +791,14 @@ void GEOMAlgo_Gluer::FacePassKey(const TopoDS_Face& aF, const TopoDS_Shape& aER=myOrigins.Find(aE); aLE.Append(aER); } - aPK.SetIds(aLE); + aPK.SetShapes(aLE); } //======================================================================= //function : EdgePassKey //purpose : //======================================================================= void GEOMAlgo_Gluer::EdgePassKey(const TopoDS_Edge& aE, - GEOMAlgo_PassKey& aPK) + GEOMAlgo_PassKeyShape& aPK) { TopoDS_Vertex aV1, aV2; // @@ -621,7 +810,7 @@ void GEOMAlgo_Gluer::EdgePassKey(const TopoDS_Edge& aE, } const TopoDS_Shape& aVR1=myOrigins.Find(aV1); const TopoDS_Shape& aVR2=myOrigins.Find(aV2); - aPK.SetIds(aVR1, aVR2); + aPK.SetShapes(aVR1, aVR2); } //======================================================================= //function : MakeVertex @@ -676,7 +865,6 @@ void GEOMAlgo_Gluer::MakeVertex(const TopTools_ListOfShape& aLV, void GEOMAlgo_Gluer::MakeEdge(const TopoDS_Edge& aE, TopoDS_Edge& aNewEdge) { - //modified by NIZNHY-PKV Thu Dec 30 11:15:23 2004 f myErrorStatus=0; // Standard_Boolean bIsDE; @@ -723,9 +911,7 @@ void GEOMAlgo_Gluer::MakeEdge(const TopoDS_Edge& aE, else { BOPTools_Tools::MakeSplitEdge(aEx, aVR1, aT1, aVR2, aT2, aNewEdge); } - //modified by NIZNHY-PKV Thu Dec 30 11:15:28 2004 t } -// //======================================================================= //function : MakeFace //purpose : @@ -766,7 +952,7 @@ void GEOMAlgo_Gluer::MakeFace(const TopoDS_Face& aF, aER=TopoDS::Edge(myOrigins.Find(aE)); // aER.Orientation(TopAbs_FORWARD); - if (!BRep_Tool::Degenerated(aER)) {//modified by NIZNHY-PKV Thu Dec 30 11:31:37 2004 ft + if (!BRep_Tool::Degenerated(aER)) { // build p-curve if (bIsUPeriodic) { GEOMAlgo_Tools::RefinePCurveForEdgeOnFace(aER, aFFWD, aUMin, aUMax); @@ -785,6 +971,13 @@ void GEOMAlgo_Gluer::MakeFace(const TopoDS_Face& aF, // aBB.Add(newWire, aER); } + // xf + TopTools_ListOfShape aLW; + // + aLW.Append(aW); + myImages.Bind(newWire, aLW); + myOrigins.Bind(aW, newWire); + // xt aBB.Add(newFace, newWire); } aNewFace=newFace; @@ -808,11 +1001,11 @@ Standard_Boolean GEOMAlgo_Gluer::IsToReverse(const TopoDS_Face& aFR, aExp.Init(aF, TopAbs_EDGE); for (; aExp.More(); aExp.Next()) { const TopoDS_Edge& aE=TopoDS::Edge(aExp.Current()); - //modified by NIZNHY-PKV Thu Dec 30 11:38:05 2004 f + // if (BRep_Tool::Degenerated(aE)) { continue; } - //modified by NIZNHY-PKV Thu Dec 30 11:38:08 2004 t + // const TopoDS_Edge& aER=TopoDS::Edge(myOrigins.Find(aE)); // aC3D=BRep_Tool::Curve(aE, aT1, aT2); @@ -835,8 +1028,112 @@ Standard_Boolean GEOMAlgo_Gluer::IsToReverse(const TopoDS_Face& aFR, } return bRet; } -// - +//======================================================================= +//function : HasNewSubShape +//purpose : +//======================================================================= +Standard_Boolean GEOMAlgo_Gluer::HasNewSubShape(const TopoDS_Shape& aS)const +{ + Standard_Boolean bRet; + Standard_Integer i, aNbSS; + TopTools_IndexedMapOfShape aMSS; + // + GetSubShapes(aS, aMSS); + // + bRet=Standard_False; + aNbSS=aMSS.Extent(); + for (i=1; i<=aNbSS; ++i) { + const TopoDS_Shape& aSS=aMSS(i); + if (aSS.ShapeType()==TopAbs_WIRE) { + continue; + } + // + bRet=!myOrigins.IsBound(aSS); + if (bRet) { + return bRet; + } + // + const TopoDS_Shape& aSSIm=myOrigins.Find(aSS); + bRet=!aSSIm.IsSame(aSS); + if (bRet) { + return bRet; + } + } + return bRet; +} +//======================================================================= +//function : GetSubShapes +//purpose : +//======================================================================= +void GetSubShapes(const TopoDS_Shape& aS, + TopTools_IndexedMapOfShape& aMSS) +{ + Standard_Integer aR; + TopAbs_ShapeEnum aType; + TopoDS_Iterator aIt; + // + aType=aS.ShapeType(); + aR=(Standard_Integer)aType+1; + if (aR>TopAbs_VERTEX) { + return; + } + // + aIt.Initialize(aS); + for (; aIt.More(); aIt.Next()) { + const TopoDS_Shape& aSS=aIt.Value(); + aMSS.Add(aSS); + GetSubShapes(aSS, aMSS); + } +} +//======================================================================= +//function : Modified +//purpose : +//======================================================================= +const TopTools_ListOfShape& GEOMAlgo_Gluer::Modified (const TopoDS_Shape& aS) +{ + TopAbs_ShapeEnum aType; + // + myGenerated.Clear(); + // + aType=aS.ShapeType(); + if (aType==TopAbs_VERTEX || + aType==TopAbs_EDGE || + aType==TopAbs_WIRE || + aType==TopAbs_FACE || + aType==TopAbs_SHELL || + aType==TopAbs_SOLID) { + if(myOrigins.IsBound(aS)) { + const TopoDS_Shape& aSnew=myOrigins.Find(aS); + if (!aSnew.IsSame(aS)) { + myGenerated.Append(aSnew); + } + } + } + // + return myGenerated; +} +//======================================================================= +//function : Generated +//purpose : +//======================================================================= +const TopTools_ListOfShape& GEOMAlgo_Gluer::Generated(const TopoDS_Shape& ) +{ + myGenerated.Clear(); + return myGenerated; +} +//======================================================================= +//function : IsDeleted +//purpose : +//======================================================================= +Standard_Boolean GEOMAlgo_Gluer::IsDeleted (const TopoDS_Shape& aS) +{ + Standard_Boolean bRet=Standard_False; + // + const TopTools_ListOfShape& aL=Modified(aS); + bRet=!aL.IsEmpty(); + // + return bRet; +} // // ErrorStatus // @@ -854,37 +1151,3 @@ Standard_Boolean GEOMAlgo_Gluer::IsToReverse(const TopoDS_Face& aFR, // // 1 - some shapes can not be glued by faces // -/* -//======================================================================= -//function : BuildResult -//purpose : -//======================================================================= -void GEOMAlgo_Gluer::BuildResult() -{ - Standard_Boolean bAdded; - TopoDS_Compound aCmp; - BRep_Builder aBB; - TopAbs_ShapeEnum aType; - TopTools_DataMapIteratorOfDataMapOfShapeListOfShape aItIm; - // - aBB.MakeCompound(aCmp); - // - bAdded=Standard_False; - aItIm.Initialize(myImages); - for (; aItIm.More(); aItIm.Next()) { - const TopoDS_Shape& aIm=aItIm.Key(); - aType=aIm.ShapeType(); - if(aType==TopAbs_SOLID) { - bAdded=Standard_True; - aBB.Add(aCmp, aIm); - } - } - myResult=aCmp; - // - if (bAdded) { - Standard_Real aTol=1.e-7; - BOP_CorrectTolerances::CorrectCurveOnSurface(myResult); - //BRepLib::SameParameter(myResult, aTol, bAdded); - } -} -*/