- logging.info("Pour le cas n°%d", nro_cas)
-
- # --- option de maillage selon le rayon de courbure du fond de fissure
- lenEdgeFondExt = 0
- for edff in edgesFondFiss:
- lenEdgeFondExt += geompy.BasicProperties(edff)[0]
-
- disfond = list()
- for filling in facesDefaut:
- disfond.append(geompy.MinDistance(centreFondFiss, filling))
- disfond.sort()
- rcourb = disfond[0]
- texte = "rcourb: {}, lenEdgeFondExt: {}, lenSegPipe: {}".format(rcourb, lenEdgeFondExt, lenSegPipe)
- logging.info(texte)
- nbSegQuart = 5 # on veut 5 segments min sur un quart de cercle
- alpha = math.pi/(4*nbSegQuart)
- deflexion = rcourb*(1.0 -math.cos(alpha))
- lgmin = lenSegPipe*0.25
- lgmax = lenSegPipe*1.5
- texte = "==> deflexion: {}, lgmin: {}, lgmax: {}".format(deflexion, lgmin, lgmax)
- logging.info(texte)
-
- meshFondExt = smesh.Mesh(wireFondFiss)
- putName(meshFondExt, "wireFondFiss", i_pref=nro_cas)
- algo1d = meshFondExt.Segment()
- hypo1d = algo1d.Adaptive(lgmin, lgmax, deflexion) # a ajuster selon la profondeur de la fissure
- putName(algo1d.GetSubMesh(), "wireFondFiss", i_pref=nro_cas)
- putName(algo1d, "algo1d_wireFondFiss", i_pref=nro_cas)
- putName(hypo1d, "hypo1d_wireFondFiss", i_pref=nro_cas)
-
- is_done = meshFondExt.Compute()
- text = "calculePointsAxiauxPipe meshFondExt.Compute"
- if is_done:
- logging.info(text)
- else:
- text = "Erreur au calcul du maillage.\n" + text
- logging.info(text)
- raise Exception(text)