1 # -*- coding: utf-8 -*-
4 from .geomsmesh import geompy
5 from .geomsmesh import geomPublish
6 from .geomsmesh import geomPublishInFather
9 # -----------------------------------------------------------------------------
10 # --- recherche et classement des edges du tore par propagate
12 def propagateTore(tore):
14 Classement des edges du tore par une operation 'propagate'
15 @param tore partionné et coupé
16 @return (diams, circles, geners) edges dans le plan de fissure, edges demi circulaires,
17 edges selon la generatrice (liste de compounds)
22 compounds = geompy.Propagate(tore)
23 for i in range(len(compounds)):
24 #geomPublishInFather(initLog.debug, tore, compounds[i], 'edges' )
25 props = geompy.BasicProperties(compounds[i])
26 lencomp.append(props[0])
33 for i in range(len(lencomp)):
34 if (lencomp[i]- minlen)/minlen < 0.01 :
35 diams.append(compounds[i])
36 elif (maxlen - lencomp[i])/lencomp[i] < 0.2 :
37 geners.append(compounds[i])
39 circles.append(compounds[i])
41 geomPublishInFather(initLog.debug, tore, diams[0], 'diams0' )
42 geomPublishInFather(initLog.debug, tore, diams[1], 'diams1' )
43 geomPublishInFather(initLog.debug, tore, circles[0], 'circles0' )
44 geomPublishInFather(initLog.debug, tore, circles[1], 'circles1' )
45 geomPublishInFather(initLog.debug, tore, geners[0], 'geners' )
47 return diams, circles, geners