Salome HOME
Preparation of intermediate revision
[modules/geom.git] / src / GEOMImpl / GEOMImpl_IShapesOperations.cxx
index 37d06c4ca2043d02fa50224e8401847f2b6f8525..0eff72be42edf32abe30c13291f1afba82afe87e 100644 (file)
@@ -699,12 +699,13 @@ Handle(TColStd_HSequenceOfTransient) GEOMImpl_IShapesOperations::GetGlueFaces
   }
 
   //Make a Python command
-  if(anAsciiList.Length()>0)
+  if( anAsciiList.Length() > 0 ) {
     anAsciiList.Trunc(anAsciiList.Length() - 1);
-  Handle(GEOM_Function) aFunction = theShape->GetLastFunction();
-  GEOM::TPythonDump pd (aFunction, /*append=*/true);
-  pd << "[" << anAsciiList.ToCString();
-  pd << "] = geompy.GetGlueFaces(" << theShape << ", " << theTolerance << ")";
+    Handle(GEOM_Function) aFunction = theShape->GetLastFunction();
+    GEOM::TPythonDump pd (aFunction, /*append=*/true);
+    pd << "[" << anAsciiList.ToCString();
+    pd << "] = geompy.GetGlueFaces(" << theShape << ", " << theTolerance << ")";
+  }
 
   SetErrorCode(OK);
 
@@ -940,7 +941,7 @@ Handle(TColStd_HSequenceOfInteger) GEOMImpl_IShapesOperations::SubShapeAllIDs
   } else {
     TopExp_Explorer exp (aShape, TopAbs_ShapeEnum(theShapeType));
     for (; exp.More(); exp.Next())
-      if (!exp.Current().IsSame(aShape) && mapShape.Add(exp.Current()))
+      if (mapShape.Add(exp.Current()))
        listShape.Append(exp.Current());
   }