mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-03-11 22:54:33 +05:00
20 lines
497 B
Python
20 lines
497 B
Python
![]() |
# -*- coding: utf-8 -*-
|
||
|
|
||
|
import logging
|
||
|
from geomsmesh import geompy
|
||
|
|
||
|
# -----------------------------------------------------------------------------
|
||
|
# --- tri par surface de faces
|
||
|
|
||
|
def sortFaces(facesToSort):
|
||
|
"""
|
||
|
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]
|
||
|
|