From 06928fa47ecd4459744e6065c5add0f1c7a3836b Mon Sep 17 00:00:00 2001 From: jfa Date: Tue, 31 May 2011 11:02:08 +0000 Subject: [PATCH] Mantis issue 0021291: [CEA 480] Bad performance of glue function in 6.3.0 --- src/GEOMImpl/GEOMImpl_GlueDriver.cxx | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/src/GEOMImpl/GEOMImpl_GlueDriver.cxx b/src/GEOMImpl/GEOMImpl_GlueDriver.cxx index 11ceaa125..f97466580 100644 --- a/src/GEOMImpl/GEOMImpl_GlueDriver.cxx +++ b/src/GEOMImpl/GEOMImpl_GlueDriver.cxx @@ -449,21 +449,23 @@ TopoDS_Shape GEOMImpl_GlueDriver::GlueWithWarnings (const TopoDS_Shape& theShape return aRes; } - // 3. Fill shapes to glue aMSG - TopTools_DataMapOfShapeListOfShape aMSG; - const TopTools_DataMapOfShapeListOfShape& aMSD = aGA.ShapesDetected(); - TopTools_DataMapIteratorOfDataMapOfShapeListOfShape aItMSD; - aItMSD.Initialize(aMSD); - for (; aItMSD.More(); aItMSD.Next()) { - const TopoDS_Shape& aSx = aItMSD.Key(); - const TopTools_ListOfShape& aLSD = aItMSD.Value(); - if (aSx.ShapeType() == theShapeType) { - aMSG.Bind(aSx, aLSD); + if (theShapeType != TopAbs_FACE) { + // 3. Fill shapes to glue aMSG + TopTools_DataMapOfShapeListOfShape aMSG; + const TopTools_DataMapOfShapeListOfShape& aMSD = aGA.ShapesDetected(); + TopTools_DataMapIteratorOfDataMapOfShapeListOfShape aItMSD; + aItMSD.Initialize(aMSD); + for (; aItMSD.More(); aItMSD.Next()) { + const TopoDS_Shape& aSx = aItMSD.Key(); + const TopTools_ListOfShape& aLSD = aItMSD.Value(); + if (aSx.ShapeType() == theShapeType) { + aMSG.Bind(aSx, aLSD); + } } - } - // 4. Set shapes to glue. If the operator is absent, the whole gluing will be done - aGA.SetShapesToGlue(aMSG); + // 4. Set shapes to glue. If the operator is absent, the whole gluing will be done + aGA.SetShapesToGlue(aMSG); + } // 5. Gluing aGA.Perform(); -- 2.39.2