From: GERALD NICOLAS Date: Wed, 27 Jan 2021 15:38:18 +0000 (+0100) Subject: cosmétique X-Git-Tag: V9_7_0a1~13^2~33 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=9b4ce9dbf227329760a2e1fdc4133650e93552db;p=modules%2Fsmesh.git cosmétique --- diff --git a/src/Tools/blocFissure/gmu/sortEdges.py b/src/Tools/blocFissure/gmu/sortEdges.py index 9fc35523d..f43dbf090 100644 --- a/src/Tools/blocFissure/gmu/sortEdges.py +++ b/src/Tools/blocFissure/gmu/sortEdges.py @@ -18,20 +18,17 @@ # 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] diff --git a/src/Tools/blocFissure/gmu/sortFaces.py b/src/Tools/blocFissure/gmu/sortFaces.py index 411ecf0a5..342a95039 100644 --- a/src/Tools/blocFissure/gmu/sortFaces.py +++ b/src/Tools/blocFissure/gmu/sortFaces.py @@ -18,20 +18,17 @@ # 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] diff --git a/src/Tools/blocFissure/materielCasTests/cubeAngle.py b/src/Tools/blocFissure/materielCasTests/cubeAngle.py index 9b7556196..acecb5fb4 100644 --- a/src/Tools/blocFissure/materielCasTests/cubeAngle.py +++ b/src/Tools/blocFissure/materielCasTests/cubeAngle.py @@ -25,8 +25,6 @@ import salome salome.salome_init() -import salome_notebook - import os from blocFissure import gmu