]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
Mantis issue 0021291: [CEA 480] Bad performance of glue function in 6.3.0 BR_Dev_For_6_3_1
authorjfa <jfa@opencascade.com>
Tue, 31 May 2011 11:02:08 +0000 (11:02 +0000)
committerjfa <jfa@opencascade.com>
Tue, 31 May 2011 11:02:08 +0000 (11:02 +0000)
src/GEOMImpl/GEOMImpl_GlueDriver.cxx

index 11ceaa1252f3208390f2f0a55860c3a849fd34b6..f974665803e6da3eef6ae0fbecf24c3a17755b0f 100644 (file)
@@ -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();