mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-12-26 09:20:34 +05:00
cosmétique
This commit is contained in:
parent
a9dfed39c8
commit
9b4ce9dbf2
@ -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]
|
||||
|
@ -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]
|
||||
|
@ -25,8 +25,6 @@ import salome
|
||||
|
||||
salome.salome_init()
|
||||
|
||||
import salome_notebook
|
||||
|
||||
import os
|
||||
from blocFissure import gmu
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user