1 # -*- coding: utf-8 -*-
4 from .geomsmesh import geompy
6 # -----------------------------------------------------------------------------
7 # --- tri par surface de faces
9 def sortFaces(facesToSort):
11 tri des faces par surface
15 surFaces = [(geompy.BasicProperties(face)[1], i, face) for i, face in enumerate(facesToSort)]
17 facesSorted = [face for surf, i, face in surFaces]
18 return facesSorted, surFaces[0][0], surFaces[-1][0]