Salome HOME
cosmétique
[modules/smesh.git] / src / Tools / blocFissure / gmu / sortFaces.py
index 411ecf0a57f44773d9aed058f278c5318a3ecc01..342a95039b5fcf5530c14f4eb6bbe06d436b016f 100644 (file)
 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
 
+"""tri par surface de faces"""
+
 import logging
 from .geomsmesh import geompy
 
-# -----------------------------------------------------------------------------
-# --- tri par surface de faces
-
 def sortFaces(facesToSort):
-  """
-  tri des faces par surface
-  """
+  """tri des faces par surface"""
   logging.info('start')
 
-  surFaces = [(geompy.BasicProperties(face)[1], i, face) for i, face in enumerate(facesToSort)]
-  surFaces.sort()
-  facesSorted = [face for surf, i, face in surFaces]
-  return facesSorted, surFaces[0][0], surFaces[-1][0]
+  l_surfaces = [(geompy.BasicProperties(face)[1], i, face) for i, face in enumerate(facesToSort)]
+  l_surfaces.sort()
+  facesSorted = [face for surf, i, face in l_surfaces]
 
+  return facesSorted, l_surfaces[0][0], l_surfaces[-1][0]