Salome HOME
Merge branch 'master' into gni/evolution
[modules/smesh.git] / src / Tools / blocFissure / gmu / construitPartitionsPeauFissure.py
index 7a15f746620a732b352c561e26ac5b10c679266b..76fba540942a3a1aa0f477dab451278f9591f37f 100644 (file)
@@ -1,5 +1,5 @@
 # -*- coding: utf-8 -*-
-# Copyright (C) 2014-2019  CEA/DEN, EDF R&D
+# 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
@@ -34,31 +34,31 @@ from .checkDecoupePartition import checkDecoupePartition
   #     liste de partitions face externe - fissure : partitionPeauFissFond (None quand pas d'intersection)
 
 def construitPartitionsPeauFissure(facesDefaut, fissPipe):
-  """
-  partition peau défaut - face de fissure prolongée - wire de fond de fissure prolongée.
+  """partition peau défaut - face de fissure prolongée - wire de fond de fissure prolongée.
+
   Il peut y avoir plusieurs faces externes, dont certaines sont découpées par la fissure.
   @param facesDefaut liste de faces externes
   @param fissPipe    partition face de fissure etendue par pipe prolongé
   @return partitionsPeauFissFond : liste de partitions face externe - fissure (None quand pas d'intersection)
   """
-  
+
   logging.info('start')
-  partitionsPeauFissFond = []
+  partitionsPeauFissFond = list()
   ipart = 0
-  for filling in facesDefaut: 
-    part = geompy.MakePartition([fissPipe, filling], [], [], [], geompy.ShapeType["FACE"], 0, [], 0)
+  for filling in facesDefaut:
+    part = geompy.MakePartition([fissPipe, filling], list(), list(), list(), geompy.ShapeType["FACE"], 0, list(), 0)
     isPart = checkDecoupePartition([fissPipe, filling], part)
     if isPart: # on recrée la partition avec toutes les faces filling en outil pour avoir une face de fissure correcte
       otherFD = [fd for fd in facesDefaut if fd != filling]
-      if len(otherFD) > 0:
-        fissPipePart = geompy.MakePartition([fissPipe], otherFD, [], [], geompy.ShapeType["FACE"], 0, [], 0)
+      if otherFD:
+        fissPipePart = geompy.MakePartition([fissPipe], otherFD, list(), list(), geompy.ShapeType["FACE"], 0, list(), 0)
       else:
         fissPipePart = fissPipe
-      part = geompy.MakePartition([fissPipePart, filling], [], [], [], geompy.ShapeType["FACE"], 0, [], 0)
+      part = geompy.MakePartition([fissPipePart, filling], list(), list(), list(), geompy.ShapeType["FACE"], 0, list(), 0)
       partitionsPeauFissFond.append(part)
       geomPublish(initLog.debug, part, 'partitionPeauFissFond%d'%ipart )
     else:
       partitionsPeauFissFond.append(None)
-    ipart = ipart +1
+    ipart += 1
 
-  return partitionsPeauFissFond
\ No newline at end of file
+  return partitionsPeauFissFond