Salome HOME
Copyright update 2021
[modules/smesh.git] / src / Tools / blocFissure / gmu / substractSubShapes.py
index 3f819d7f4f58b80ad5fb76cd95f745da7c4577bc..84ad6b85216ca89eec52700be9fa645a3e0da408 100644 (file)
@@ -1,7 +1,25 @@
 # -*- coding: utf-8 -*-
+# Copyright (C) 2014-2021  EDF R&D
+#
+# 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, or (at your option) any later version.
+#
+# 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
+#
 
 import logging
-from geomsmesh import geompy
+from .geomsmesh import geompy
 
 # -----------------------------------------------------------------------------
 # --- substract a list of subShapes from another
@@ -17,7 +35,7 @@ def substractSubShapes(obj, subs, toRemove):
     idToremove[geompy.GetSubShapeID(obj, s)] = s
   for s in subs:
     idsub = geompy.GetSubShapeID(obj, s)
-    if idsub not in idToremove.keys():
+    if idsub not in list(idToremove.keys()):
       subList.append(s)
   logging.debug("subList=%s", subList)
   return subList