# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+"""tri par longueur d'edges"""
+
import logging
from .geomsmesh import geompy
-# -----------------------------------------------------------------------------
-# --- tri par longueur d'edges
-
def sortEdges(edgesToSort):
- """
- tri des edges par longueur
- """
+ """tri des edges par longueur"""
logging.info('start')
- lenEdges = [(geompy.BasicProperties(edge)[0], i, edge) for i, edge in enumerate(edgesToSort)]
- lenEdges.sort()
- edgesSorted = [edge for length, i, edge in lenEdges]
- return edgesSorted, lenEdges[0][0], lenEdges[-1][0]
+ l_length = [(geompy.BasicProperties(edge)[0], i, edge) for i, edge in enumerate(edgesToSort)]
+ l_length.sort()
+ edgesSorted = [edge for length, i, edge in l_length]
+ return edgesSorted, l_length[0][0], l_length[-1][0]
# 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]