mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-12 01:30:34 +05:00
Merge branch 'gni/evolution'
This commit is contained in:
commit
f81a79465f
@ -80,7 +80,7 @@ class cubeAngle(fissureGenerique):
|
||||
geompy.addToStudyInFather( shellFiss, fondFiss, 'fondFiss' )
|
||||
|
||||
mailleur = self.mailleur2d3d()
|
||||
coordsNoeudsFissure = genereMeshCalculZoneDefaut(shellFiss, 5 ,10, mailleur)
|
||||
coordsNoeudsFissure = genereMeshCalculZoneDefaut(shellFiss, 5 ,10, mailleur, self.numeroCas)
|
||||
|
||||
centre = None
|
||||
|
||||
@ -99,7 +99,8 @@ class cubeAngle(fissureGenerique):
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
def genereZoneDefaut(self, geometriesSaines, maillagesSains, shapesFissure, shapeFissureParams, maillageFissureParams):
|
||||
elementsDefaut = creeZoneDefautDansObjetSain(geometriesSaines, maillagesSains, shapesFissure, shapeFissureParams, maillageFissureParams)
|
||||
elementsDefaut = creeZoneDefautDansObjetSain(geometriesSaines, maillagesSains, shapesFissure, shapeFissureParams, maillageFissureParams, \
|
||||
self.numeroCas)
|
||||
return elementsDefaut
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
|
@ -51,7 +51,7 @@ class cylindre(fissureGenerique):
|
||||
logging.info("genereMaillageSain %s", self.nomCas)
|
||||
|
||||
([objetSain], _) = smesh.CreateMeshesFromMED(os.path.join(gmu.pathBloc, "materielCasTests", "CylindreSain.med"))
|
||||
smesh.SetName(objetSain.GetMesh(), 'objetSain')
|
||||
smesh.SetName(objetSain.GetMesh(), "{}_objetSain".format(self.nomProbleme))
|
||||
|
||||
return [objetSain, True] # True : maillage hexa
|
||||
|
||||
@ -80,7 +80,7 @@ class cylindre(fissureGenerique):
|
||||
geompy.addToStudyInFather( shellFiss, fondFiss, 'fondFiss' )
|
||||
|
||||
mailleur = self.mailleur2d3d()
|
||||
coordsNoeudsFissure = genereMeshCalculZoneDefaut(shellFiss, 5 ,15, mailleur)
|
||||
coordsNoeudsFissure = genereMeshCalculZoneDefaut(shellFiss, 5 ,15, mailleur, self.numeroCas)
|
||||
|
||||
centre = None
|
||||
return [shellFiss, centre, lgInfluence, coordsNoeudsFissure, fondFiss]
|
||||
@ -96,7 +96,8 @@ class cylindre(fissureGenerique):
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
def genereZoneDefaut(self, geometriesSaines, maillagesSains, shapesFissure, shapeFissureParams, maillageFissureParams):
|
||||
elementsDefaut = creeZoneDefautDansObjetSain(geometriesSaines, maillagesSains, shapesFissure, shapeFissureParams, maillageFissureParams)
|
||||
elementsDefaut = creeZoneDefautDansObjetSain(geometriesSaines, maillagesSains, shapesFissure, shapeFissureParams, maillageFissureParams, \
|
||||
self.numeroCas)
|
||||
return elementsDefaut
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
|
@ -52,7 +52,7 @@ class cylindre_2(cylindre):
|
||||
geompy.addToStudyInFather( shellFiss, fondFiss, 'fondFiss' )
|
||||
|
||||
mailleur = self.mailleur2d3d()
|
||||
coordsNoeudsFissure = genereMeshCalculZoneDefaut(shellFiss, 5 ,15, mailleur)
|
||||
coordsNoeudsFissure = genereMeshCalculZoneDefaut(shellFiss, 5 ,15, mailleur, self.numeroCas)
|
||||
|
||||
centre = None
|
||||
return [shellFiss, centre, lgInfluence, coordsNoeudsFissure, fondFiss]
|
||||
|
@ -88,7 +88,7 @@ class ellipse_1(fissureGenerique):
|
||||
geompy.addToStudyInFather( shellFiss, fondFiss, 'fondFiss' )
|
||||
|
||||
mailleur = self.mailleur2d3d()
|
||||
coordsNoeudsFissure = genereMeshCalculZoneDefaut(shellFiss, 5 ,25, mailleur)
|
||||
coordsNoeudsFissure = genereMeshCalculZoneDefaut(shellFiss, 5 ,25, mailleur, self.numeroCas)
|
||||
|
||||
centre = None
|
||||
|
||||
@ -107,7 +107,8 @@ class ellipse_1(fissureGenerique):
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
def genereZoneDefaut(self, geometriesSaines, maillagesSains, shapesFissure, shapeFissureParams, maillageFissureParams):
|
||||
elementsDefaut = creeZoneDefautDansObjetSain(geometriesSaines, maillagesSains, shapesFissure, shapeFissureParams, maillageFissureParams)
|
||||
elementsDefaut = creeZoneDefautDansObjetSain(geometriesSaines, maillagesSains, shapesFissure, shapeFissureParams, maillageFissureParams, \
|
||||
self.numeroCas)
|
||||
return elementsDefaut
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
|
@ -54,7 +54,7 @@ class ellipse_2(ellipse_1):
|
||||
geompy.addToStudyInFather( shellFiss, fondFiss, 'fondFiss' )
|
||||
|
||||
mailleur = self.mailleur2d3d()
|
||||
coordsNoeudsFissure = genereMeshCalculZoneDefaut(shellFiss, 5 ,25, mailleur)
|
||||
coordsNoeudsFissure = genereMeshCalculZoneDefaut(shellFiss, 5 ,25, mailleur, self.numeroCas)
|
||||
|
||||
centre = None
|
||||
|
||||
|
@ -48,7 +48,7 @@ class eprouvetteCourbe(fissureGenerique):
|
||||
logging.info(texte)
|
||||
|
||||
([objetSain], _) = smesh.CreateMeshesFromMED(os.path.join(gmu.pathBloc, "materielCasTests", "EprouvetteCourbe.med"))
|
||||
smesh.SetName(objetSain.GetMesh(), 'objetSain')
|
||||
smesh.SetName(objetSain.GetMesh(), "{}_objetSain".format(self.nomProbleme))
|
||||
|
||||
return [objetSain, True] # True : maillage hexa
|
||||
|
||||
@ -82,7 +82,7 @@ class eprouvetteCourbe(fissureGenerique):
|
||||
geompy.addToStudyInFather( shellFiss, fondFiss, 'fondFiss' )
|
||||
|
||||
mailleur = self.mailleur2d3d()
|
||||
coordsNoeudsFissure = genereMeshCalculZoneDefaut(shellFiss, 5 ,10, mailleur)
|
||||
coordsNoeudsFissure = genereMeshCalculZoneDefaut(shellFiss, 5 ,10, mailleur, self.numeroCas)
|
||||
|
||||
centre = None
|
||||
|
||||
@ -101,7 +101,8 @@ class eprouvetteCourbe(fissureGenerique):
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
def genereZoneDefaut(self, geometriesSaines, maillagesSains, shapesFissure, shapeFissureParams, maillageFissureParams):
|
||||
elementsDefaut = creeZoneDefautDansObjetSain(geometriesSaines, maillagesSains, shapesFissure, shapeFissureParams, maillageFissureParams)
|
||||
elementsDefaut = creeZoneDefautDansObjetSain(geometriesSaines, maillagesSains, shapesFissure, shapeFissureParams, maillageFissureParams, \
|
||||
self.numeroCas)
|
||||
return elementsDefaut
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
|
@ -53,7 +53,7 @@ class eprouvetteDroite(fissureGenerique):
|
||||
logging.info("genereMaillageSain %s", self.nomCas)
|
||||
|
||||
([objetSain], _) = smesh.CreateMeshesFromMED(os.path.join(gmu.pathBloc, "materielCasTests", "eprouvetteDroite.med"))
|
||||
smesh.SetName(objetSain.GetMesh(), 'objetSain')
|
||||
smesh.SetName(objetSain.GetMesh(), "{}_objetSain".format(self.nomProbleme))
|
||||
|
||||
return [objetSain, True] # True : maillage hexa
|
||||
|
||||
@ -85,7 +85,7 @@ class eprouvetteDroite(fissureGenerique):
|
||||
geompy.addToStudyInFather( shellFiss, fondFiss, 'fondFiss' )
|
||||
|
||||
mailleur = self.mailleur2d3d()
|
||||
coordsNoeudsFissure = genereMeshCalculZoneDefaut(shellFiss, 5 ,10, mailleur)
|
||||
coordsNoeudsFissure = genereMeshCalculZoneDefaut(shellFiss, 5 ,10, mailleur, self.numeroCas)
|
||||
|
||||
centre = None
|
||||
return [shellFiss, centre, lgInfluence, coordsNoeudsFissure, fondFiss]
|
||||
@ -101,7 +101,8 @@ class eprouvetteDroite(fissureGenerique):
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
def genereZoneDefaut(self, geometriesSaines, maillagesSains, shapesFissure, shapeFissureParams, maillageFissureParams):
|
||||
elementsDefaut = creeZoneDefautDansObjetSain(geometriesSaines, maillagesSains, shapesFissure, shapeFissureParams, maillageFissureParams)
|
||||
elementsDefaut = creeZoneDefautDansObjetSain(geometriesSaines, maillagesSains, shapesFissure, shapeFissureParams, maillageFissureParams, \
|
||||
self.numeroCas)
|
||||
return elementsDefaut
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
|
@ -51,7 +51,7 @@ class eprouvetteDroite_2(eprouvetteDroite):
|
||||
geompy.addToStudyInFather( shellFiss, fondFiss, 'fondFiss' )
|
||||
|
||||
mailleur = self.mailleur2d3d()
|
||||
coordsNoeudsFissure = genereMeshCalculZoneDefaut(shellFiss, 5 ,10, mailleur)
|
||||
coordsNoeudsFissure = genereMeshCalculZoneDefaut(shellFiss, 5 ,10, mailleur, self.numeroCas)
|
||||
|
||||
centre = None
|
||||
return [shellFiss, centre, lgInfluence, coordsNoeudsFissure, fondFiss]
|
||||
|
@ -52,7 +52,7 @@ class faceGauche(fissureGenerique):
|
||||
logging.info("genereMaillageSain %s", self.nomCas)
|
||||
|
||||
([objetSain], _) = smesh.CreateMeshesFromMED(os.path.join(gmu.pathBloc, "materielCasTests", "faceGaucheSain.med"))
|
||||
smesh.SetName(objetSain.GetMesh(), 'objetSain')
|
||||
smesh.SetName(objetSain.GetMesh(), "{}_objetSain".format(self.nomProbleme))
|
||||
|
||||
return [objetSain, True] # True : maillage hexa
|
||||
|
||||
@ -83,7 +83,7 @@ class faceGauche(fissureGenerique):
|
||||
geompy.addToStudyInFather( shellFiss, fondFiss, 'fondFiss' )
|
||||
|
||||
mailleur = self.mailleur2d3d()
|
||||
coordsNoeudsFissure = genereMeshCalculZoneDefaut(shellFiss, 5 ,50, mailleur)
|
||||
coordsNoeudsFissure = genereMeshCalculZoneDefaut(shellFiss, 5 ,50, mailleur, self.numeroCas)
|
||||
|
||||
centre = None
|
||||
return [shellFiss, centre, lgInfluence, coordsNoeudsFissure, fondFiss]
|
||||
@ -99,7 +99,8 @@ class faceGauche(fissureGenerique):
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
def genereZoneDefaut(self, geometriesSaines, maillagesSains, shapesFissure, shapeFissureParams, maillageFissureParams):
|
||||
elementsDefaut = creeZoneDefautDansObjetSain(geometriesSaines, maillagesSains, shapesFissure, shapeFissureParams, maillageFissureParams)
|
||||
elementsDefaut = creeZoneDefautDansObjetSain(geometriesSaines, maillagesSains, shapesFissure, shapeFissureParams, maillageFissureParams, \
|
||||
self.numeroCas)
|
||||
return elementsDefaut
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
|
@ -54,7 +54,7 @@ class faceGauche_2(fissureGenerique):
|
||||
logging.info("genereMaillageSain %s", self.nomCas)
|
||||
|
||||
([objetSain], _) = smesh.CreateMeshesFromMED(os.path.join(gmu.pathBloc, "materielCasTests", "boiteSaine.med"))
|
||||
smesh.SetName(objetSain.GetMesh(), 'objetSain')
|
||||
smesh.SetName(objetSain.GetMesh(), "{}_objetSain".format(self.nomProbleme))
|
||||
|
||||
return [objetSain, True] # True : maillage hexa
|
||||
|
||||
@ -85,7 +85,7 @@ class faceGauche_2(fissureGenerique):
|
||||
geompy.addToStudyInFather( shellFiss, fondFiss, 'fondFiss' )
|
||||
|
||||
mailleur = self.mailleur2d3d()
|
||||
coordsNoeudsFissure = genereMeshCalculZoneDefaut(shellFiss, 5 ,25, mailleur)
|
||||
coordsNoeudsFissure = genereMeshCalculZoneDefaut(shellFiss, 5 ,25, mailleur, self.numeroCas)
|
||||
|
||||
centre = None
|
||||
return [shellFiss, centre, lgInfluence, coordsNoeudsFissure, fondFiss]
|
||||
@ -101,7 +101,8 @@ class faceGauche_2(fissureGenerique):
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
def genereZoneDefaut(self, geometriesSaines, maillagesSains, shapesFissure, shapeFissureParams, maillageFissureParams):
|
||||
elementsDefaut = creeZoneDefautDansObjetSain(geometriesSaines, maillagesSains, shapesFissure, shapeFissureParams, maillageFissureParams)
|
||||
elementsDefaut = creeZoneDefautDansObjetSain(geometriesSaines, maillagesSains, shapesFissure, shapeFissureParams, maillageFissureParams, \
|
||||
self.numeroCas)
|
||||
return elementsDefaut
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
|
@ -39,6 +39,7 @@ from blocFissure.gmu.triedreBase import triedreBase
|
||||
from blocFissure.gmu.genereMeshCalculZoneDefaut import genereMeshCalculZoneDefaut
|
||||
from blocFissure.gmu.creeZoneDefautDansObjetSain import creeZoneDefautDansObjetSain
|
||||
from blocFissure.gmu.insereFissureLongue import insereFissureLongue
|
||||
from blocFissure.gmu.putName import putName
|
||||
|
||||
O, OX, OY, OZ = triedreBase()
|
||||
|
||||
@ -233,38 +234,38 @@ class fissure_Coude(fissureGenerique):
|
||||
|
||||
algo3d = maillageSain.Hexahedron()
|
||||
algo2d = maillageSain.Quadrangle()
|
||||
smesh.SetName(algo3d, "algo3d_maillageSain")
|
||||
smesh.SetName(algo2d, "algo2d_maillageSain")
|
||||
putName(algo3d, "algo3d_maillageSain", i_pref=self.numeroCas)
|
||||
putName(algo2d, "algo2d_maillageSain", i_pref=self.numeroCas)
|
||||
|
||||
algo1d_long_p1 = maillageSain.Segment(geom=long_p1)
|
||||
hypo1d_long_p1 = algo1d_long_p1.NumberOfSegments(n_long_p1)
|
||||
smesh.SetName(algo1d_long_p1, "algo1d_long_p1")
|
||||
smesh.SetName(hypo1d_long_p1, "hypo1d_long_p1")
|
||||
putName(algo1d_long_p1, "algo1d_long_p1", i_pref=self.numeroCas)
|
||||
putName(hypo1d_long_p1, "hypo1d_long_p1", i_pref=self.numeroCas)
|
||||
|
||||
algo1d_ep = maillageSain.Segment(geom=ep)
|
||||
hypo1d_ep = algo1d_ep.NumberOfSegments(n_ep)
|
||||
smesh.SetName(algo1d_ep, "algo1d_ep")
|
||||
smesh.SetName(hypo1d_ep, "hypo1d_ep")
|
||||
putName(algo1d_ep, "algo1d_ep", i_pref=self.numeroCas)
|
||||
putName(hypo1d_ep, "hypo1d_ep", i_pref=self.numeroCas)
|
||||
|
||||
algo1d_long_coude = maillageSain.Segment(geom=long_coude)
|
||||
hypo1d_long_coude = algo1d_long_coude.NumberOfSegments(n_long_coude)
|
||||
smesh.SetName(algo1d_long_coude, "algo1d_long_coude")
|
||||
smesh.SetName(hypo1d_long_coude, "hypo1d_long_coude")
|
||||
putName(algo1d_long_coude, "algo1d_long_coude", i_pref=self.numeroCas)
|
||||
putName(hypo1d_long_coude, "hypo1d_long_coude", i_pref=self.numeroCas)
|
||||
|
||||
algo1d_circ_g = maillageSain.Segment(geom=circ_g)
|
||||
hypo1d_circ_g = algo1d_circ_g.NumberOfSegments(n_circ_g)
|
||||
smesh.SetName(algo1d_circ_g, "algo1d_circ_g")
|
||||
smesh.SetName(hypo1d_circ_g, "hypo1d_circ_g")
|
||||
putName(algo1d_circ_g, "algo1d_circ_g", i_pref=self.numeroCas)
|
||||
putName(hypo1d_circ_g, "hypo1d_circ_g", i_pref=self.numeroCas)
|
||||
|
||||
algo1d_circ_d = maillageSain.Segment(geom=circ_d)
|
||||
hypo1d_circ_d = algo1d_circ_d.NumberOfSegments(n_circ_d)
|
||||
smesh.SetName(algo1d_circ_d, "algo1d_circ_d")
|
||||
smesh.SetName(hypo1d_circ_d, "hypo1d_circ_d")
|
||||
putName(algo1d_circ_d, "algo1d_circ_d", i_pref=self.numeroCas)
|
||||
putName(hypo1d_circ_d, "hypo1d_circ_d", i_pref=self.numeroCas)
|
||||
|
||||
algo1d_long_p2 = maillageSain.Segment(geom=long_p2)
|
||||
hypo1d_long_p2 = algo1d_long_p2.NumberOfSegments(n_long_p2)
|
||||
smesh.SetName(algo1d_long_p2, "algo1d_long_p2")
|
||||
smesh.SetName(hypo1d_long_p2, "hypo1d_long_p2")
|
||||
putName(algo1d_long_p2, "algo1d_long_p2", i_pref=self.numeroCas)
|
||||
putName(hypo1d_long_p2, "hypo1d_long_p2", i_pref=self.numeroCas)
|
||||
|
||||
_ = maillageSain.GroupOnGeom(P1,'P1',SMESH.NODE)
|
||||
_ = maillageSain.GroupOnGeom(P2,'P2',SMESH.NODE)
|
||||
@ -478,7 +479,7 @@ class fissure_Coude(fissureGenerique):
|
||||
pass
|
||||
|
||||
mailleur = self.mailleur2d3d()
|
||||
coordsNoeudsFissure = genereMeshCalculZoneDefaut(facefiss, 5 ,10, mailleur)
|
||||
coordsNoeudsFissure = genereMeshCalculZoneDefaut(facefiss, 5 ,10, mailleur, self.numeroCas)
|
||||
|
||||
return [facefiss, centre, lgInfluence, coordsNoeudsFissure, wiretube, facetubel, facetuber, planfiss, pipefiss]
|
||||
|
||||
@ -497,7 +498,8 @@ class fissure_Coude(fissureGenerique):
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
def genereZoneDefaut(self, geometriesSaines, maillagesSains, shapesFissure, shapeFissureParams, maillageFissureParams):
|
||||
elementsDefaut = creeZoneDefautDansObjetSain(geometriesSaines, maillagesSains, shapesFissure, shapeFissureParams, maillageFissureParams)
|
||||
elementsDefaut = creeZoneDefautDansObjetSain(geometriesSaines, maillagesSains, shapesFissure, shapeFissureParams, maillageFissureParams, \
|
||||
self.numeroCas)
|
||||
return elementsDefaut
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
@ -510,7 +512,7 @@ class fissure_Coude(fissureGenerique):
|
||||
maillageFissure = insereFissureLongue(geometriesSaines, \
|
||||
shapesFissure, shapeFissureParams, \
|
||||
maillageFissureParams, elementsDefaut, \
|
||||
step, mailleur)
|
||||
step, mailleur, self.numeroCas)
|
||||
return maillageFissure
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
|
@ -84,7 +84,7 @@ class tube(fissureGenerique):
|
||||
geompy.addToStudyInFather( shellFiss, fondFiss, 'fondFiss' )
|
||||
|
||||
mailleur = self.mailleur2d3d()
|
||||
coordsNoeudsFissure = genereMeshCalculZoneDefaut(shellFiss, 0.025, 0.1, mailleur)
|
||||
coordsNoeudsFissure = genereMeshCalculZoneDefaut(shellFiss, 0.025, 0.1, mailleur, self.numeroCas)
|
||||
|
||||
centre = None
|
||||
|
||||
@ -103,7 +103,8 @@ class tube(fissureGenerique):
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
def genereZoneDefaut(self, geometriesSaines, maillagesSains, shapesFissure, shapeFissureParams, maillageFissureParams):
|
||||
elementsDefaut = creeZoneDefautDansObjetSain(geometriesSaines, maillagesSains, shapesFissure, shapeFissureParams, maillageFissureParams)
|
||||
elementsDefaut = creeZoneDefautDansObjetSain(geometriesSaines, maillagesSains, shapesFissure, shapeFissureParams, maillageFissureParams, \
|
||||
self.numeroCas)
|
||||
return elementsDefaut
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
|
@ -85,7 +85,7 @@ class vis_1(fissureGenerique):
|
||||
geompy.addToStudyInFather( shellFiss, fondFiss, 'fondFiss' )
|
||||
|
||||
mailleur = self.mailleur2d3d()
|
||||
coordsNoeudsFissure = genereMeshCalculZoneDefaut(shellFiss, 0.1 ,0.2, mailleur)
|
||||
coordsNoeudsFissure = genereMeshCalculZoneDefaut(shellFiss, 0.1 ,0.2, mailleur, self.numeroCas)
|
||||
|
||||
centre = None
|
||||
|
||||
@ -104,7 +104,8 @@ class vis_1(fissureGenerique):
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
def genereZoneDefaut(self, geometriesSaines, maillagesSains, shapesFissure, shapeFissureParams, maillageFissureParams):
|
||||
elementsDefaut = creeZoneDefautDansObjetSain(geometriesSaines, maillagesSains, shapesFissure, shapeFissureParams, maillageFissureParams)
|
||||
elementsDefaut = creeZoneDefautDansObjetSain(geometriesSaines, maillagesSains, shapesFissure, shapeFissureParams, maillageFissureParams, \
|
||||
self.numeroCas)
|
||||
return elementsDefaut
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
|
@ -89,7 +89,6 @@ SET(plugin_SCRIPTS
|
||||
initEtude.py
|
||||
initLog.py
|
||||
insereFissureElliptique.py
|
||||
insereFissureGenerale.py
|
||||
insereFissureLongue_a.py
|
||||
insereFissureLongue_b.py
|
||||
insereFissureLongue_c.py
|
||||
|
@ -25,9 +25,12 @@ import math
|
||||
from .geomsmesh import geompy
|
||||
from .geomsmesh import smesh
|
||||
|
||||
from .putName import putName
|
||||
|
||||
def calculePointsAxiauxPipe(edgesFondFiss, edgesIdByOrientation, facesDefaut,
|
||||
centreFondFiss, wireFondFiss, wirePipeFiss,
|
||||
lenSegPipe, rayonPipe, nbsegCercle, nbsegRad):
|
||||
lenSegPipe, rayonPipe, nbsegCercle, nbsegRad, \
|
||||
nro_cas=-1):
|
||||
"""Préparation maillage du pipe :
|
||||
|
||||
- détections des points a respecter : jonction des edges/faces constituant
|
||||
@ -37,6 +40,7 @@ def calculePointsAxiauxPipe(edgesFondFiss, edgesIdByOrientation, facesDefaut,
|
||||
"""
|
||||
|
||||
logging.info('start')
|
||||
logging.info("Pour le cas n°%d", nro_cas)
|
||||
|
||||
# --- option de maillage selon le rayon de courbure du fond de fissure
|
||||
lenEdgeFondExt = 0
|
||||
@ -60,7 +64,10 @@ def calculePointsAxiauxPipe(edgesFondFiss, edgesIdByOrientation, facesDefaut,
|
||||
|
||||
meshFondExt = smesh.Mesh(wireFondFiss)
|
||||
algo1d = meshFondExt.Segment()
|
||||
_ = algo1d.Adaptive(lgmin, lgmax, deflexion) # a ajuster selon la profondeur de la fissure
|
||||
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"
|
||||
|
@ -39,6 +39,7 @@ from .triedreBase import triedreBase
|
||||
from .genereMeshCalculZoneDefaut import genereMeshCalculZoneDefaut
|
||||
from .creeZoneDefautDansObjetSain import creeZoneDefautDansObjetSain
|
||||
from .construitFissureGenerale import construitFissureGenerale
|
||||
from .putName import putName
|
||||
|
||||
O, OX, OY, OZ = triedreBase()
|
||||
|
||||
@ -47,7 +48,7 @@ class casStandard(fissureGenerique):
|
||||
|
||||
- un maillage sain (hexaèdres),
|
||||
- une face géométrique de fissure, qui doit légèrement dépasser hors du volume maillé
|
||||
- les numéros d'arêtes (edges géométriques) correspondant au fond de fissure
|
||||
- les noms des groupes d'arêtes ou leurs numéros d'arêtes (edges au sens de GEOM) correspondant au fond de fissure
|
||||
- les paramètres de maillage de la fissure
|
||||
"""
|
||||
referencesMaillageFissure = None
|
||||
@ -90,7 +91,7 @@ class casStandard(fissureGenerique):
|
||||
logging.info("genereMaillageSain %s", self.nomCas)
|
||||
|
||||
([objetSain], _) = smesh.CreateMeshesFromMED(self.dicoParams['maillageSain'])
|
||||
smesh.SetName(objetSain.GetMesh(), 'objetSain')
|
||||
putName(objetSain.GetMesh(), 'objetSain', i_pref=self.numeroCas)
|
||||
|
||||
return [objetSain, True] # True : maillage hexa
|
||||
|
||||
@ -149,7 +150,7 @@ class casStandard(fissureGenerique):
|
||||
|
||||
|
||||
coordsNoeudsFissure = genereMeshCalculZoneDefaut(shellFiss, self.dicoParams['meshBrep'][0] ,self.dicoParams['meshBrep'][1], \
|
||||
mailleur)
|
||||
mailleur, self.numeroCas)
|
||||
|
||||
centre = None
|
||||
return [shellFiss, centre, lgInfluence, coordsNoeudsFissure, fondFiss]
|
||||
@ -166,7 +167,8 @@ class casStandard(fissureGenerique):
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
def genereZoneDefaut(self, geometriesSaines, maillagesSains, shapesFissure, shapeFissureParams, maillageFissureParams):
|
||||
elementsDefaut = creeZoneDefautDansObjetSain(geometriesSaines, maillagesSains, shapesFissure, shapeFissureParams, maillageFissureParams)
|
||||
elementsDefaut = creeZoneDefautDansObjetSain(geometriesSaines, maillagesSains, shapesFissure, shapeFissureParams, maillageFissureParams, \
|
||||
self.numeroCas)
|
||||
return elementsDefaut
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
|
@ -59,8 +59,7 @@ def construitFissureGenerale(shapesFissure, shapeFissureParams, \
|
||||
step=-1, mailleur="MeshGems", nro_cas=-1):
|
||||
"""procédure complète fissure générale"""
|
||||
logging.info('start')
|
||||
logging.info("Usage du mailleur %s", mailleur)
|
||||
logging.info("pour le cas %d", nro_cas)
|
||||
logging.info("Usage du mailleur %s pour le cas n°%d", mailleur, nro_cas)
|
||||
|
||||
shapeDefaut = shapesFissure[0] # faces de fissure, débordant
|
||||
|
||||
@ -150,9 +149,10 @@ def construitFissureGenerale(shapesFissure, shapeFissureParams, \
|
||||
# - points sur les edges de fond de fissure et edges pipe/face fissure,
|
||||
# - vecteurs tangents au fond de fissure (normal au disque maillé)
|
||||
|
||||
(centres, gptsdisks, raydisks) = calculePointsAxiauxPipe(edgesFondFiss, edgesIdByOrientation, facesDefaut, \
|
||||
centreFondFiss, wireFondFiss, wirePipeFiss, \
|
||||
lenSegPipe, rayonPipe, nbsegCercle, nbsegRad)
|
||||
(centres, gptsdisks, raydisks) = calculePointsAxiauxPipe (edgesFondFiss, edgesIdByOrientation, facesDefaut, \
|
||||
centreFondFiss, wireFondFiss, wirePipeFiss, \
|
||||
lenSegPipe, rayonPipe, nbsegCercle, nbsegRad, \
|
||||
nro_cas)
|
||||
|
||||
# --- recherche des points en trop (externes au volume à remailler)
|
||||
# - on associe chaque extrémité du pipe à une face filling
|
||||
@ -179,11 +179,14 @@ def construitFissureGenerale(shapesFissure, shapeFissureParams, \
|
||||
|
||||
# --- maillage effectif du pipe
|
||||
|
||||
(meshPipe, meshPipeGroups, edgesCircPipeGroup) = construitMaillagePipe(gptsdisks, idisklim, nbsegCercle, nbsegRad)
|
||||
(meshPipe, meshPipeGroups, edgesCircPipeGroup) = \
|
||||
construitMaillagePipe(gptsdisks, idisklim, nbsegCercle, nbsegRad)
|
||||
|
||||
# --- edges de bord, faces défaut à respecter
|
||||
|
||||
(internalBoundary, bordsLibres, grpAretesVives) = mailleAretesEtJonction(internalBoundary, aretesVivesCoupees, lgAretesVives)
|
||||
(internalBoundary, bordsLibres, grpAretesVives) = \
|
||||
mailleAretesEtJonction(internalBoundary, aretesVivesCoupees, lgAretesVives, \
|
||||
nro_cas)
|
||||
|
||||
# --- maillage faces de fissure
|
||||
|
||||
@ -191,7 +194,7 @@ def construitFissureGenerale(shapesFissure, shapeFissureParams, \
|
||||
mailleFacesFissure(faceFissureExterne, \
|
||||
edgesPipeFissureExterneC, edgesPeauFissureExterneC, \
|
||||
meshPipeGroups, areteFaceFissure, rayonPipe, nbsegRad, \
|
||||
mailleur)
|
||||
mailleur, nro_cas)
|
||||
|
||||
# --- maillage faces de peau
|
||||
|
||||
@ -214,7 +217,7 @@ def construitFissureGenerale(shapesFissure, shapeFissureParams, \
|
||||
zoneDefaut, zoneDefaut_skin, zoneDefaut_internalFaces, zoneDefaut_internalEdges, \
|
||||
facesPortFissure, \
|
||||
maillageFissureParams, \
|
||||
mailleur )
|
||||
mailleur, nro_cas )
|
||||
|
||||
if salome.sg.hasDesktop():
|
||||
salome.sg.updateObjBrowser()
|
||||
|
@ -43,10 +43,10 @@ def construitFissureGenerale_c(maillageSain, meshBoiteDefaut, \
|
||||
zoneDefaut, zoneDefaut_skin, zoneDefaut_internalFaces, zoneDefaut_internalEdges, \
|
||||
facesPortFissure, \
|
||||
maillageFissureParams, \
|
||||
mailleur="MeshGems"):
|
||||
mailleur="MeshGems", nro_cas=-1):
|
||||
"""construction de la fissure générale - maillage"""
|
||||
logging.info('start')
|
||||
logging.info("Usage du mailleur %s", mailleur)
|
||||
logging.info("Usage du mailleur %s pour le cas n°%d", mailleur, nro_cas)
|
||||
|
||||
nomRep = maillageFissureParams['nomRep']
|
||||
nomFicSain = maillageFissureParams['nomFicSain']
|
||||
@ -77,9 +77,9 @@ def construitFissureGenerale_c(maillageSain, meshBoiteDefaut, \
|
||||
hypo3d.SetVerboseLevel( 0 )
|
||||
hypo3d.SetStandardOutputLog( 0 )
|
||||
hypo3d.SetRemoveLogOnSuccess( 1 )
|
||||
putName(algo3d.GetSubMesh(), "boiteDefaut")
|
||||
putName(algo3d, "algo3d_boiteDefaut")
|
||||
putName(meshBoiteDefaut, "boiteDefaut")
|
||||
putName(algo3d.GetSubMesh(), "boiteDefaut", i_pref=nro_cas)
|
||||
putName(algo3d, "algo3d_boiteDefaut", i_pref=nro_cas)
|
||||
putName(meshBoiteDefaut, "boiteDefaut", i_pref=nro_cas)
|
||||
|
||||
is_done = meshBoiteDefaut.Compute()
|
||||
text = "meshBoiteDefaut.Compute"
|
||||
@ -94,7 +94,7 @@ def construitFissureGenerale_c(maillageSain, meshBoiteDefaut, \
|
||||
'FACE1' )
|
||||
maillageSain = enleveDefaut(maillageSain, zoneDefaut, zoneDefaut_skin,
|
||||
zoneDefaut_internalFaces, zoneDefaut_internalEdges)
|
||||
putName(maillageSain, nomFicSain+"_coupe")
|
||||
putName(maillageSain, nomFicSain+"_coupe", i_pref=nro_cas)
|
||||
_, normfiss = shapeSurFissure(facesPortFissure)
|
||||
maillageComplet = RegroupeSainEtDefaut(maillageSain, meshBoiteDefaut, \
|
||||
None, None, 'COMPLET', normfiss)
|
||||
|
@ -35,7 +35,8 @@ from .creeZoneDefautGeom import creeZoneDefautGeom
|
||||
from .getCentreFondFiss import getCentreFondFiss
|
||||
|
||||
def creeZoneDefautDansObjetSain(geometriesSaines, maillagesSains, shapesFissure, \
|
||||
shapeFissureParams, maillageFissureParams):
|
||||
shapeFissureParams, maillageFissureParams, \
|
||||
nro_cas=-1):
|
||||
"""
|
||||
#TODO: a compléter
|
||||
"""
|
||||
@ -78,7 +79,8 @@ def creeZoneDefautDansObjetSain(geometriesSaines, maillagesSains, shapesFissure,
|
||||
maillageSain.ExportMED(fichierMaillageSain)
|
||||
logging.debug("fichier maillage sain %s", fichierMaillageSain)
|
||||
[maillageSain, internalBoundary, zoneDefaut, zoneDefaut_skin, zoneDefaut_internalFaces, zoneDefaut_internalEdges] = \
|
||||
peauInterne(fichierMaillageSain, shapeDefaut, nomZones)
|
||||
peauInterne(fichierMaillageSain, shapeDefaut, nomZones, \
|
||||
nro_cas)
|
||||
|
||||
facesDefaut = list()
|
||||
centresDefaut = list()
|
||||
|
@ -22,9 +22,6 @@
|
||||
import logging
|
||||
from .geomsmesh import geompy
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# ---
|
||||
|
||||
def eliminateDoubles(obj, subshapes):
|
||||
"""éliminer les doublons d'une liste de subshapes"""
|
||||
|
||||
@ -37,7 +34,7 @@ def eliminateDoubles(obj, subshapes):
|
||||
idsubs[subid] = [sub]
|
||||
|
||||
shortList = list()
|
||||
for l_sub in idsubs.items():
|
||||
for _, l_sub in idsubs.items():
|
||||
shortList.append(l_sub[0])
|
||||
logging.debug("shortList=%s", shortList)
|
||||
|
||||
|
@ -40,6 +40,7 @@ from .genereMeshCalculZoneDefaut import genereMeshCalculZoneDefaut
|
||||
from .creeZoneDefautDansObjetSain import creeZoneDefautDansObjetSain
|
||||
from .construitFissureGenerale import construitFissureGenerale
|
||||
from .sortEdges import sortEdges
|
||||
from .putName import putName
|
||||
|
||||
O, OX, OY, OZ = triedreBase()
|
||||
|
||||
@ -262,38 +263,38 @@ class fissureCoude(fissureGenerique):
|
||||
|
||||
algo3d = maillageSain.Hexahedron()
|
||||
algo2d = maillageSain.Quadrangle()
|
||||
smesh.SetName(algo3d, "algo3d_maillageSain")
|
||||
smesh.SetName(algo2d, "algo2d_maillageSain")
|
||||
putName(algo3d, "algo3d_maillageSain", i_pref=self.numeroCas)
|
||||
putName(algo2d, "algo2d_maillageSain", i_pref=self.numeroCas)
|
||||
|
||||
algo1d_long_p1 = maillageSain.Segment(geom=long_p1)
|
||||
hypo1d_long_p1 = algo1d_long_p1.NumberOfSegments(n_long_p1)
|
||||
smesh.SetName(algo1d_long_p1, "algo1d_long_p1")
|
||||
smesh.SetName(hypo1d_long_p1, "hypo1d_long_p1")
|
||||
putName(algo1d_long_p1, "algo1d_long_p1", i_pref=self.numeroCas)
|
||||
putName(hypo1d_long_p1, "hypo1d_long_p1", i_pref=self.numeroCas)
|
||||
|
||||
algo1d_ep = maillageSain.Segment(geom=ep)
|
||||
hypo1d_ep = algo1d_ep.NumberOfSegments(n_ep)
|
||||
smesh.SetName(algo1d_ep, "algo1d_ep")
|
||||
smesh.SetName(hypo1d_ep, "hypo1d_ep")
|
||||
putName(algo1d_ep, "algo1d_ep", i_pref=self.numeroCas)
|
||||
putName(hypo1d_ep, "hypo1d_ep", i_pref=self.numeroCas)
|
||||
|
||||
algo1d_long_coude = maillageSain.Segment(geom=long_coude)
|
||||
hypo1d_long_coude = algo1d_long_coude.NumberOfSegments(n_long_coude)
|
||||
smesh.SetName(algo1d_long_coude, "algo1d_long_coude")
|
||||
smesh.SetName(hypo1d_long_coude, "hypo1d_long_coude")
|
||||
putName(algo1d_long_coude, "algo1d_long_coude", i_pref=self.numeroCas)
|
||||
putName(hypo1d_long_coude, "hypo1d_long_coude", i_pref=self.numeroCas)
|
||||
|
||||
algo1d_circ_g = maillageSain.Segment(geom=circ_g)
|
||||
hypo1d_circ_g = algo1d_circ_g.NumberOfSegments(n_circ_g)
|
||||
smesh.SetName(algo1d_circ_g, "algo1d_circ_g")
|
||||
smesh.SetName(hypo1d_circ_g, "hypo1d_circ_g")
|
||||
putName(algo1d_circ_g, "algo1d_circ_g", i_pref=self.numeroCas)
|
||||
putName(hypo1d_circ_g, "hypo1d_circ_g", i_pref=self.numeroCas)
|
||||
|
||||
algo1d_circ_d = maillageSain.Segment(geom=circ_d)
|
||||
hypo1d_circ_d = algo1d_circ_d.NumberOfSegments(n_circ_d)
|
||||
smesh.SetName(algo1d_circ_d, "algo1d_circ_d")
|
||||
smesh.SetName(hypo1d_circ_d, "hypo1d_circ_d")
|
||||
putName(algo1d_circ_d, "algo1d_circ_d", i_pref=self.numeroCas)
|
||||
putName(hypo1d_circ_d, "hypo1d_circ_d", i_pref=self.numeroCas)
|
||||
|
||||
algo1d_long_p2 = maillageSain.Segment(geom=long_p2)
|
||||
hypo1d_long_p2 = algo1d_long_p2.NumberOfSegments(n_long_p2)
|
||||
smesh.SetName(algo1d_long_p2, "algo1d_long_p2")
|
||||
smesh.SetName(hypo1d_long_p2, "hypo1d_long_p2")
|
||||
putName(algo1d_long_p2, "algo1d_long_p2", i_pref=self.numeroCas)
|
||||
putName(hypo1d_long_p2, "hypo1d_long_p2", i_pref=self.numeroCas)
|
||||
|
||||
is_done = maillageSain.Compute()
|
||||
text = "maillageSain.Compute"
|
||||
@ -648,7 +649,7 @@ class fissureCoude(fissureGenerique):
|
||||
geomPublish(initLog.debug, centre, 'centrefissPlace' )
|
||||
|
||||
coordsNoeudsFissure = genereMeshCalculZoneDefaut(facefiss, profondeur/2. ,profondeur, \
|
||||
mailleur)
|
||||
mailleur, self.numeroCas)
|
||||
|
||||
return [facefiss, centre, lgInfluence, coordsNoeudsFissure, wiretube, edgetube]
|
||||
|
||||
@ -670,7 +671,8 @@ class fissureCoude(fissureGenerique):
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
def genereZoneDefaut(self, geometriesSaines, maillagesSains, shapesFissure, shapeFissureParams, maillageFissureParams):
|
||||
elementsDefaut = creeZoneDefautDansObjetSain(geometriesSaines, maillagesSains, shapesFissure, shapeFissureParams, maillageFissureParams)
|
||||
elementsDefaut = creeZoneDefautDansObjetSain(geometriesSaines, maillagesSains, shapesFissure, shapeFissureParams, maillageFissureParams, \
|
||||
self.numeroCas)
|
||||
return elementsDefaut
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
|
@ -33,11 +33,15 @@ from .geomsmesh import smesh
|
||||
|
||||
from .listOfExtraFunctions import createNewMeshesFromCorner
|
||||
from .listOfExtraFunctions import createLinesFromMesh
|
||||
from .putName import putName
|
||||
|
||||
def fusionMaillageDefaut(maillageSain, maillageDefautCible, maillageInterneCible, zoneDefaut_skin, shapeDefaut, listOfCorners):
|
||||
def fusionMaillageDefaut(maillageSain, maillageDefautCible, maillageInterneCible, \
|
||||
zoneDefaut_skin, shapeDefaut, listOfCorners, \
|
||||
nro_cas=-1):
|
||||
"""Groupe de quadrangles de face transformé en face géométrique par filling"""
|
||||
|
||||
logging.info("start")
|
||||
logging.info("Pour le cas n°%d", nro_cas)
|
||||
|
||||
facesNonCoupees = list()
|
||||
facesCoupees = list()
|
||||
@ -96,6 +100,6 @@ def fusionMaillageDefaut(maillageSain, maillageDefautCible, maillageInterneCible
|
||||
|
||||
newZoneDefaut_skin = maillageSain.GetMesh().CutListOfGroups([zoneDefaut_skin], facesEnTrop, 'newZoneDefaut_skin')
|
||||
|
||||
smesh.SetName(newMaillageInterne, 'newInternalBoundary')
|
||||
putName(newMaillageInterne, 'newInternalBoundary', i_pref=nro_cas)
|
||||
|
||||
return newZoneDefaut_skin, newMaillageInterne
|
||||
|
@ -32,7 +32,7 @@ from .rotTrans import rotTrans
|
||||
from .genereMeshCalculZoneDefaut import genereMeshCalculZoneDefaut
|
||||
|
||||
def genereElemsFissureElliptique(shapeFissureParams, \
|
||||
mailleur="MeshGems"):
|
||||
mailleur="MeshGems", nro_cas=-1):
|
||||
"""Création élements géométriques fissure elliptique"""
|
||||
|
||||
logging.info('start')
|
||||
@ -70,6 +70,6 @@ def genereElemsFissureElliptique(shapeFissureParams, \
|
||||
shapeDefaut = facefis1
|
||||
xyz_defaut = geompy.PointCoordinates(centreDefaut)
|
||||
coordsNoeudsFissure = genereMeshCalculZoneDefaut(facefis1, demiPetitAxe/10.0, demiPetitAxe/5.0, \
|
||||
mailleur)
|
||||
mailleur, nro_cas)
|
||||
|
||||
return shapeDefaut, xyz_defaut, tailleDefaut, coordsNoeudsFissure, pipe0, gener1, pipe1, facefis1, plane1, ellipsoide1
|
||||
|
@ -25,8 +25,10 @@ from salome.smesh import smeshBuilder
|
||||
|
||||
from .geomsmesh import smesh
|
||||
|
||||
from .putName import putName
|
||||
|
||||
def genereMeshCalculZoneDefaut(facefiss, minSize, maxSize, \
|
||||
mailleur="MeshGems"):
|
||||
mailleur="MeshGems", nro_cas=-1):
|
||||
"""Maillage de l'objet géométrique 'facefiss'
|
||||
|
||||
. Avec l'algorithme MG_CADSurf :
|
||||
@ -50,9 +52,12 @@ def genereMeshCalculZoneDefaut(facefiss, minSize, maxSize, \
|
||||
"""
|
||||
|
||||
logging.info('start')
|
||||
logging.info("Maillage avec %s pour le cas n°%d", mailleur, nro_cas)
|
||||
|
||||
meshFissure = smesh.Mesh(facefiss)
|
||||
text = "Maillage de '{}' avec {}".format(facefiss.GetName(),mailleur)
|
||||
putName(meshFissure, "facefiss", i_pref=nro_cas)
|
||||
|
||||
text = "Maillage de '{}'".format(facefiss.GetName())
|
||||
logging.info(text)
|
||||
if ( mailleur == "MeshGems"):
|
||||
algo2d = meshFissure.Triangle(algo=smeshBuilder.MG_CADSurf)
|
||||
@ -71,8 +76,8 @@ def genereMeshCalculZoneDefaut(facefiss, minSize, maxSize, \
|
||||
hypo2d.SetFineness( 2 )
|
||||
hypo2d.SetMinSize( minSize )
|
||||
hypo2d.SetQuadAllowed( 0 )
|
||||
smesh.SetName(algo2d, "algo2d_zoneFiss")
|
||||
smesh.SetName(hypo2d, "hypo1d_zoneFiss")
|
||||
putName(algo2d, "algo2d_zoneFiss", i_pref=nro_cas)
|
||||
putName(hypo2d, "hypo1d_zoneFiss", i_pref=nro_cas)
|
||||
|
||||
is_done = meshFissure.Compute()
|
||||
text = "meshFissure.Compute"
|
||||
|
@ -95,116 +95,122 @@ def insereFissureElliptique(geometriesSaines, maillagesSains, \
|
||||
zoneDefaut_internalFaces = elementsDefaut[12]
|
||||
zoneDefaut_internalEdges = elementsDefaut[13]
|
||||
|
||||
## --- ellipse incomplete : generatrice
|
||||
#if step == 5:
|
||||
#return None
|
||||
maillageComplet = None
|
||||
|
||||
#allonge = demiGrandAxe/demiPetitAxe
|
||||
#rayonTore = demiPetitAxe/5.0
|
||||
#generatrice, FaceGenFiss, Pipe_1, FaceFissure, Plane_1, Pipe1Part = self.toreFissure(demiPetitAxe, allonge, rayonTore)
|
||||
#ellipsoide = self.ellipsoideDefaut(demiPetitAxe, allonge)
|
||||
while True:
|
||||
|
||||
## --- positionnement sur le bloc defaut de generatrice, tore et plan fissure
|
||||
#if step == 6:
|
||||
#return None
|
||||
## --- ellipse incomplete : generatrice
|
||||
#if step == 5:
|
||||
#break
|
||||
|
||||
#pipe0 = self.rotTrans(Pipe_1, orientation, centreDefaut, normalDefaut)
|
||||
#gener1 = self.rotTrans(generatrice, orientation, centreDefaut, normalDefaut)
|
||||
#pipe1 = self.rotTrans(Pipe1Part, orientation, centreDefaut, normalDefaut)
|
||||
#facefis1 = self.rotTrans(FaceFissure, orientation, centreDefaut, normalDefaut)
|
||||
#plane1 = self.rotTrans(Plane_1, orientation, centreDefaut, normalDefaut)
|
||||
#ellipsoide1 = self.rotTrans(ellipsoide, orientation, centreDefaut, normalDefaut)
|
||||
#allonge = demiGrandAxe/demiPetitAxe
|
||||
#rayonTore = demiPetitAxe/5.0
|
||||
#generatrice, FaceGenFiss, Pipe_1, FaceFissure, Plane_1, Pipe1Part = self.toreFissure(demiPetitAxe, allonge, rayonTore)
|
||||
#ellipsoide = self.ellipsoideDefaut(demiPetitAxe, allonge)
|
||||
|
||||
#geomPublish(initLog.debug, pipe0, 'pipe0' )
|
||||
#geomPublish(initLog.debug, gener1, 'gener1' )
|
||||
#geomPublish(initLog.debug, pipe1, 'pipe1' )
|
||||
#geomPublish(initLog.debug, facefis1, 'facefis1' )
|
||||
#geomPublish(initLog.debug, plane1, 'plane1' )
|
||||
#geomPublish(initLog.debug, ellipsoide1, 'ellipsoide1' )
|
||||
## --- positionnement sur le bloc defaut de generatrice, tore et plan fissure
|
||||
#if step == 6:
|
||||
#break
|
||||
|
||||
# --- partition du bloc défaut par génératrice, tore et plan fissure
|
||||
if step == 7:
|
||||
return None
|
||||
#pipe0 = self.rotTrans(Pipe_1, orientation, centreDefaut, normalDefaut)
|
||||
#gener1 = self.rotTrans(generatrice, orientation, centreDefaut, normalDefaut)
|
||||
#pipe1 = self.rotTrans(Pipe1Part, orientation, centreDefaut, normalDefaut)
|
||||
#facefis1 = self.rotTrans(FaceFissure, orientation, centreDefaut, normalDefaut)
|
||||
#plane1 = self.rotTrans(Plane_1, orientation, centreDefaut, normalDefaut)
|
||||
#ellipsoide1 = self.rotTrans(ellipsoide, orientation, centreDefaut, normalDefaut)
|
||||
|
||||
[ blocPartition, _, tore, \
|
||||
faceFissure, facesExternes, facesExtBloc, facesExtElli,
|
||||
aretesInternes, ellipsoidep, sharedFaces, sharedEdges, edgesBords] = \
|
||||
partitionBlocDefaut(extrusionDefaut, facesDefaut, gener1, pipe1, facefis1, ellipsoide1)
|
||||
if not isHexa:
|
||||
edgesBords = None # maillage sain hexa ==> filling, et maillage edges Bords imposés du maillage sain
|
||||
#geomPublish(initLog.debug, pipe0, 'pipe0' )
|
||||
#geomPublish(initLog.debug, gener1, 'gener1' )
|
||||
#geomPublish(initLog.debug, pipe1, 'pipe1' )
|
||||
#geomPublish(initLog.debug, facefis1, 'facefis1' )
|
||||
#geomPublish(initLog.debug, plane1, 'plane1' )
|
||||
#geomPublish(initLog.debug, ellipsoide1, 'ellipsoide1' )
|
||||
|
||||
# --- TORE
|
||||
# --- faces toriques du tore
|
||||
if step == 8:
|
||||
return None
|
||||
# --- partition du bloc défaut par génératrice, tore et plan fissure
|
||||
if step == 7:
|
||||
break
|
||||
|
||||
[facetore1, facetore2, _, _] = facesVolumesToriques(tore, plane1, facesDefaut)
|
||||
[ blocPartition, _, tore, \
|
||||
faceFissure, facesExternes, facesExtBloc, facesExtElli,
|
||||
aretesInternes, ellipsoidep, sharedFaces, sharedEdges, edgesBords] = \
|
||||
partitionBlocDefaut(extrusionDefaut, facesDefaut, gener1, pipe1, facefis1, ellipsoide1)
|
||||
if not isHexa:
|
||||
edgesBords = None # maillage sain hexa ==> filling, et maillage edges Bords imposés du maillage sain
|
||||
|
||||
# --- faces 1/2 circulaires et edges dans le plan de fissure
|
||||
if step == 9:
|
||||
return None
|
||||
# --- TORE
|
||||
# --- faces toriques du tore
|
||||
if step == 8:
|
||||
break
|
||||
|
||||
[faces, centres, edges, reverses] = facesCirculaires(extrusionDefaut, tore)
|
||||
[facetore1, facetore2, _, _] = facesVolumesToriques(tore, plane1, facesDefaut)
|
||||
|
||||
# --- recherche et classement des edges du tore par propagate
|
||||
if step == 10:
|
||||
return None
|
||||
# --- faces 1/2 circulaires et edges dans le plan de fissure
|
||||
if step == 9:
|
||||
break
|
||||
|
||||
[diams, circles, geners] = propagateTore(tore)
|
||||
[faces, centres, edges, reverses] = facesCirculaires(extrusionDefaut, tore)
|
||||
|
||||
# --- tri par longueur des 3 génératrices
|
||||
if step == 11:
|
||||
return None
|
||||
# --- recherche et classement des edges du tore par propagate
|
||||
if step == 10:
|
||||
break
|
||||
|
||||
[_, genint, gencnt] = sortGeneratrices(tore, geners)
|
||||
[diams, circles, geners] = propagateTore(tore)
|
||||
|
||||
# --- faces fissure dans et hors tore, et edges face hors tore
|
||||
if step == 12:
|
||||
return None
|
||||
# --- tri par longueur des 3 génératrices
|
||||
if step == 11:
|
||||
break
|
||||
|
||||
[_, facefissoutore, _, edgeext, reverext] = \
|
||||
facesFissure(ellipsoidep, faceFissure, extrusionDefaut, genint)
|
||||
[_, genint, gencnt] = sortGeneratrices(tore, geners)
|
||||
|
||||
# --- identification des faces tore et fissure dans le solide hors tore
|
||||
if step == 13:
|
||||
return None
|
||||
# --- faces fissure dans et hors tore, et edges face hors tore
|
||||
if step == 12:
|
||||
break
|
||||
|
||||
[_, _, _] = \
|
||||
facesToreInBloc(ellipsoidep, facefissoutore, facetore1, facetore2)
|
||||
[_, facefissoutore, _, edgeext, reverext] = \
|
||||
facesFissure(ellipsoidep, faceFissure, extrusionDefaut, genint)
|
||||
|
||||
# --- identification des shapes modifiées par la duplication des noeuds de la face fissure (d'un coté de la face)
|
||||
# --- identification des faces tore et fissure dans le solide hors tore
|
||||
if step == 13:
|
||||
break
|
||||
|
||||
#shapesAModifier = self.shapesSurFissure(blocPartition, plane1 faceFissure, gencnt)
|
||||
if step == 14:
|
||||
return None
|
||||
[_, _, _] = \
|
||||
facesToreInBloc(ellipsoidep, facefissoutore, facetore1, facetore2)
|
||||
|
||||
extrusionFaceFissure, _ = shapeSurFissure(plane1)
|
||||
# --- identification des shapes modifiées par la duplication des noeuds de la face fissure (d'un coté de la face)
|
||||
|
||||
# --- maillage du bloc partitionne
|
||||
#shapesAModifier = self.shapesSurFissure(blocPartition, plane1 faceFissure, gencnt)
|
||||
if step == 14:
|
||||
break
|
||||
|
||||
if step == 15:
|
||||
return None
|
||||
extrusionFaceFissure, _ = shapeSurFissure(plane1)
|
||||
|
||||
[_, blocComplet] = \
|
||||
meshBlocPart(blocPartition, faceFissure, tore, centres, edges, diams, circles, faces, \
|
||||
gencnt, facefissoutore, edgeext, facesExternes, facesExtBloc, facesExtElli, \
|
||||
aretesInternes, internalBoundary, ellipsoidep, sharedFaces, sharedEdges, edgesBords, \
|
||||
nbsegExt, nbsegGen, nbsegRad, scaleRad, reverses, reverext, nbsegCercle,
|
||||
nbsegFis, dmoyen, lensegEllipsoide) \
|
||||
# --- maillage du bloc partitionne
|
||||
|
||||
if step == 16:
|
||||
return None
|
||||
maillageSain = enleveDefaut(maillageSain, zoneDefaut, zoneDefaut_skin, zoneDefaut_internalFaces, zoneDefaut_internalEdges)
|
||||
if step == 15:
|
||||
break
|
||||
|
||||
if step == 17:
|
||||
return None
|
||||
maillageComplet = RegroupeSainEtDefaut(maillageSain, blocComplet, extrusionFaceFissure, faceFissure, 'VOLUMES')
|
||||
[_, blocComplet] = \
|
||||
meshBlocPart(blocPartition, faceFissure, tore, centres, edges, diams, circles, faces, \
|
||||
gencnt, facefissoutore, edgeext, facesExternes, facesExtBloc, facesExtElli, \
|
||||
aretesInternes, internalBoundary, ellipsoidep, sharedFaces, sharedEdges, edgesBords, \
|
||||
nbsegExt, nbsegGen, nbsegRad, scaleRad, reverses, reverext, nbsegCercle, \
|
||||
nbsegFis, dmoyen, lensegEllipsoide)
|
||||
if step == 16:
|
||||
break
|
||||
|
||||
if step == 18:
|
||||
return None
|
||||
maillageComplet.ExportMED(fichierMaillageFissure)
|
||||
putName(maillageComplet, nomFicFissure)
|
||||
logging.info("fichier maillage fissure : %s", fichierMaillageFissure)
|
||||
maillageSain = enleveDefaut(maillageSain, zoneDefaut, zoneDefaut_skin, zoneDefaut_internalFaces, zoneDefaut_internalEdges)
|
||||
if step == 17:
|
||||
break
|
||||
|
||||
maillageComplet = RegroupeSainEtDefaut(maillageSain, blocComplet, extrusionFaceFissure, faceFissure, 'VOLUMES')
|
||||
if step == 18:
|
||||
break
|
||||
|
||||
maillageComplet.ExportMED(fichierMaillageFissure)
|
||||
putName(maillageComplet, nomFicFissure)
|
||||
logging.info("fichier maillage fissure : %s", fichierMaillageFissure)
|
||||
|
||||
break
|
||||
|
||||
if salome.sg.hasDesktop():
|
||||
salome.sg.updateObjBrowser()
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -42,10 +42,10 @@ from .insereFissureLongue_g import insereFissureLongue_g
|
||||
def insereFissureLongue(geometriesSaines, \
|
||||
shapesFissure, shapeFissureParams, \
|
||||
maillageFissureParams, elementsDefaut, \
|
||||
step=-1, mailleur="MeshGems"):
|
||||
step=-1, mailleur="MeshGems", nro_cas=-1):
|
||||
"""procedure complete fissure longue"""
|
||||
logging.info('start')
|
||||
logging.info("Usage du mailleur %s", mailleur)
|
||||
logging.info("Usage du mailleur %s pour le cas n°%d", mailleur, nro_cas)
|
||||
|
||||
#geometrieSaine = geometriesSaines[0]
|
||||
shapeDefaut = shapesFissure[0] # face de fissure, debordant
|
||||
@ -114,7 +114,8 @@ def insereFissureLongue(geometriesSaines, \
|
||||
planfiss, planBord1, planBord2, \
|
||||
facePeau, verticesOutCercles, verticesEdgePeauFiss, \
|
||||
fillingFaceExterne, rayonPipe, \
|
||||
internalBoundary)
|
||||
internalBoundary, \
|
||||
nro_cas)
|
||||
|
||||
# --- maillage pipe fond fissure
|
||||
|
||||
@ -122,7 +123,8 @@ def insereFissureLongue(geometriesSaines, \
|
||||
insereFissureLongue_c (pipeFondFiss, disques, rayons, demiCercles, demiCerclesPeau, generatrices, \
|
||||
VerticesEndPipeFiss, verticesEdgePeauFiss, \
|
||||
groupFaceFissInPipe, groupEdgeFondFiss, groupsDemiCerclesPipe, groupGenerFiss, \
|
||||
profondeur, rayonPipe)
|
||||
profondeur, rayonPipe, \
|
||||
nro_cas)
|
||||
|
||||
# --- maillage face de peau
|
||||
|
||||
@ -130,20 +132,20 @@ def insereFissureLongue(geometriesSaines, \
|
||||
insereFissureLongue_d ( facePeau, edgePeauFiss, groupEdgesBordPeau, bordsLibres, \
|
||||
groupsDemiCerclesPeau, groups_demiCercles, verticesOutCercles, \
|
||||
nbSegGenLong, nbSegGenBout, profondeur, \
|
||||
mailleur )
|
||||
mailleur, nro_cas )
|
||||
|
||||
# --- maillage face de fissure
|
||||
|
||||
meshFaceFiss = \
|
||||
insereFissureLongue_e ( faceFiss, edgePeauFiss, groupEdgesPeauFiss, group_generFiss, groupEdgesFaceFissPipe, \
|
||||
profondeur, rayonPipe, \
|
||||
mailleur )
|
||||
mailleur, nro_cas )
|
||||
|
||||
# --- maillage meshBoiteDefaut
|
||||
|
||||
meshBoiteDefaut, group_faceFissInPipe, group_faceFissOutPipe = \
|
||||
insereFissureLongue_f ( internalBoundary, meshFondFiss, meshFacePeau, meshFaceFiss, \
|
||||
mailleur )
|
||||
mailleur, nro_cas )
|
||||
|
||||
|
||||
# --- maillage complet
|
||||
@ -151,7 +153,8 @@ def insereFissureLongue(geometriesSaines, \
|
||||
insereFissureLongue_g (nomFicFissure, fichierMaillageFissure, nomFicSain, maillageSain, \
|
||||
meshBoiteDefaut, facePorteFissure, \
|
||||
group_faceFissInPipe, group_faceFissOutPipe, \
|
||||
zoneDefaut, zoneDefaut_skin, zoneDefaut_internalEdges, zoneDefaut_internalFaces)
|
||||
zoneDefaut, zoneDefaut_skin, zoneDefaut_internalEdges, zoneDefaut_internalFaces, \
|
||||
nro_cas)
|
||||
|
||||
|
||||
if salome.sg.hasDesktop():
|
||||
|
@ -128,29 +128,29 @@ def insereFissureLongue_a(facePorteFissure, WirePorteFondFissure, \
|
||||
edgesFacePeauSorted, _, _ = sortEdges(edgesFacePeau)
|
||||
demiCerclesPeau = edgesFacePeauSorted[0:4]
|
||||
verticesDemiCerclesPeau = list()
|
||||
for i, edge in enumerate(demiCerclesPeau):
|
||||
name = "demiCerclePeau_%d"%i
|
||||
for i_aux, edge in enumerate(demiCerclesPeau):
|
||||
name = "demiCerclePeau_{}".format(i_aux)
|
||||
geomPublishInFather(initLog.debug,facePeau, edge, name)
|
||||
verticesDemiCerclesPeau += geompy.ExtractShapes(edge, geompy.ShapeType["VERTEX"], False)
|
||||
verticesDemiCerclesPeau = eliminateDoubles(facePeau, verticesDemiCerclesPeau)
|
||||
for i, vertex in enumerate(verticesDemiCerclesPeau):
|
||||
name = "verticesDemiCerclesPeau_%d"%i
|
||||
for i_aux, vertex in enumerate(verticesDemiCerclesPeau):
|
||||
name = "verticesDemiCerclesPeau_{}".format(i_aux)
|
||||
geomPublishInFather(initLog.debug,facePeau, vertex, name)
|
||||
verticesOutCercles = substractSubShapes(facePeau, verticesDemiCerclesPeau, verticesEdgePeauFiss)
|
||||
for i, vertex in enumerate(verticesOutCercles):
|
||||
name = "verticesOutCercles_%d"%i
|
||||
for i_aux, vertex in enumerate(verticesOutCercles):
|
||||
name = "verticesOutCercles_{}".format(i_aux)
|
||||
geomPublishInFather(initLog.debug,facePeau, vertex, name)
|
||||
|
||||
# --- demi cercles regroupés
|
||||
groupsDemiCerclesPeau = list()
|
||||
for i, vertex in enumerate(verticesEdgePeauFiss):
|
||||
for i_aux, vertex in enumerate(verticesEdgePeauFiss):
|
||||
demis = list()
|
||||
for edge in demiCerclesPeau:
|
||||
if geompy.MinDistance(vertex, edge) < 1.e-5:
|
||||
if ( geompy.MinDistance(vertex, edge) < 1.e-5 ):
|
||||
demis.append(edge)
|
||||
group = geompy.CreateGroup(facePeau, geompy.ShapeType["EDGE"])
|
||||
geompy.UnionList(group, demis)
|
||||
name = "Cercle%d"%i
|
||||
name = "Cercle{}".format(i_aux)
|
||||
geomPublishInFather(initLog.debug,facePeau, group , name)
|
||||
groupsDemiCerclesPeau.append(group)
|
||||
|
||||
|
@ -37,16 +37,19 @@ from .sortEdges import sortEdges
|
||||
from .produitMixte import produitMixte
|
||||
from .findWireEndVertices import findWireEndVertices
|
||||
from .getSubshapeIds import getSubshapeIds
|
||||
from .putName import putName
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
def insereFissureLongue_b(edgesInside, centreFondFiss, tangentFondFiss, \
|
||||
planfiss, planBord1, planBord2, \
|
||||
facePeau, verticesOutCercles, verticesEdgePeauFiss, \
|
||||
fillingFaceExterne, rayonPipe, \
|
||||
internalBoundary):
|
||||
def insereFissureLongue_b (edgesInside, centreFondFiss, tangentFondFiss, \
|
||||
planfiss, planBord1, planBord2, \
|
||||
facePeau, verticesOutCercles, verticesEdgePeauFiss, \
|
||||
fillingFaceExterne, rayonPipe, \
|
||||
internalBoundary, \
|
||||
nro_cas=-1):
|
||||
"""procedure complete fissure longue"""
|
||||
logging.info('start')
|
||||
logging.info("Maillage pour le cas n°%d", nro_cas)
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# --- pipe de fond de fissure
|
||||
@ -214,12 +217,13 @@ def insereFissureLongue_b(edgesInside, centreFondFiss, tangentFondFiss, \
|
||||
|
||||
_ = smesh.CreateFilterManager()
|
||||
_, internalBoundary, _ = internalBoundary.MakeBoundaryElements( SMESH.BND_1DFROM2D, '', '', 0, [ ])
|
||||
putName(internalBoundary, 'internalBoundary', i_pref=nro_cas)
|
||||
criteres = list()
|
||||
un_critere = smesh.GetCriterion(SMESH.EDGE,SMESH.FT_FreeBorders,SMESH.FT_Undefined,0)
|
||||
criteres.append(un_critere)
|
||||
filtre = smesh.GetFilterFromCriteria(criteres)
|
||||
bordsLibres = internalBoundary.MakeGroupByFilter( 'bords', filtre )
|
||||
smesh.SetName(bordsLibres, 'bordsLibres')
|
||||
putName(bordsLibres, 'bordsLibres', i_pref=nro_cas)
|
||||
|
||||
# --- pour aider l'algo hexa-tetra a ne pas mettre de pyramides a l'exterieur des volumes replies sur eux-memes
|
||||
# on designe les faces de peau en quadrangles par le groupe "skinFaces"
|
||||
|
@ -36,53 +36,57 @@ from .distance2 import distance2
|
||||
def insereFissureLongue_c (pipeFondFiss, disques, rayons, demiCercles, demiCerclesPeau, generatrices, \
|
||||
VerticesEndPipeFiss, verticesEdgePeauFiss, \
|
||||
groupFaceFissInPipe, groupEdgeFondFiss, groupsDemiCerclesPipe, groupGenerFiss, \
|
||||
profondeur, rayonPipe):
|
||||
profondeur, rayonPipe, \
|
||||
nro_cas=-1):
|
||||
"""maillage pipe fond fissure"""
|
||||
logging.info('start')
|
||||
logging.info("Maillage pour le cas n°%d", nro_cas)
|
||||
|
||||
meshFondFiss = smesh.Mesh(pipeFondFiss)
|
||||
putName(meshFondFiss, "pipeFondFiss", i_pref=nro_cas)
|
||||
|
||||
algo2d = meshFondFiss.Quadrangle(algo=smeshBuilder.QUADRANGLE)
|
||||
algo3d = meshFondFiss.Prism()
|
||||
putName(algo3d.GetSubMesh(), "pipe")
|
||||
putName(algo3d, "algo3d_pipe")
|
||||
putName(algo2d, "algo2d_pipe")
|
||||
putName(algo3d.GetSubMesh(), "pipe", i_pref=nro_cas)
|
||||
putName(algo3d, "algo3d_pipe", i_pref=nro_cas)
|
||||
putName(algo2d, "algo2d_pipe", i_pref=nro_cas)
|
||||
|
||||
for i, face in enumerate(disques):
|
||||
for i_aux, face in enumerate(disques):
|
||||
algo2d = meshFondFiss.Quadrangle(algo=smeshBuilder.RADIAL_QUAD,geom=face)
|
||||
putName(algo2d.GetSubMesh(), "disque", i)
|
||||
putName(algo2d, "algo2d_disque", i)
|
||||
putName(algo2d.GetSubMesh(), "disque", i_aux, nro_cas)
|
||||
putName(algo2d, "algo2d_disque", i_aux, nro_cas)
|
||||
|
||||
for i, edge in enumerate(rayons):
|
||||
for i_aux, edge in enumerate(rayons):
|
||||
algo1d = meshFondFiss.Segment(geom=edge)
|
||||
hypo1d = algo1d.NumberOfSegments(4)
|
||||
putName(algo1d.GetSubMesh(), "rayon", i)
|
||||
putName(algo1d, "algo1d_rayon", i)
|
||||
putName(hypo1d, "hypo1d_rayon", i)
|
||||
putName(algo1d.GetSubMesh(), "rayon", i_aux, nro_cas)
|
||||
putName(algo1d, "algo1d_rayon", i_aux, nro_cas)
|
||||
putName(hypo1d, "hypo1d_rayon", i_aux, nro_cas)
|
||||
|
||||
for i, edge in enumerate(demiCercles):
|
||||
for i_aux, edge in enumerate(demiCercles):
|
||||
algo1d = meshFondFiss.Segment(geom=edge)
|
||||
hypo1d = algo1d.NumberOfSegments(6)
|
||||
putName(algo1d.GetSubMesh(), "demiCercle", i)
|
||||
putName(algo1d, "algo1d_demiCercle", i)
|
||||
putName(hypo1d, "hypo1d_demiCercle", i)
|
||||
putName(algo1d.GetSubMesh(), "demiCercle", i_aux, nro_cas)
|
||||
putName(algo1d, "algo1d_demiCercle", i_aux, nro_cas)
|
||||
putName(hypo1d, "hypo1d_demiCercle", i_aux, nro_cas)
|
||||
|
||||
generSorted, minlg, maxlg = sortEdges(generatrices)
|
||||
nbSegGenLong = int(math.sqrt(3.0)*maxlg/(profondeur - rayonPipe)) # on veut 2 triangles equilateraux dans la largeur de la face
|
||||
nbSegGenBout = 6
|
||||
logging.info("min %s, max %s, nombre de segments %s, nombre de generatrices %s", minlg, maxlg, nbSegGenLong, len(generSorted))
|
||||
for i, edge in enumerate(generSorted):
|
||||
for i_aux, edge in enumerate(generSorted):
|
||||
algo1d = meshFondFiss.Segment(geom=edge)
|
||||
if i < 6:
|
||||
if i_aux < 6:
|
||||
hypo1d = algo1d.NumberOfSegments(nbSegGenBout)
|
||||
else:
|
||||
hypo1d = algo1d.NumberOfSegments(nbSegGenLong)
|
||||
putName(algo1d.GetSubMesh(), "generatrice", i)
|
||||
putName(algo1d, "algo1d_generatrice", i)
|
||||
putName(hypo1d, "hypo1d_generatrice", i)
|
||||
putName(algo1d.GetSubMesh(), "generatrice", i_aux, nro_cas)
|
||||
putName(algo1d, "algo1d_generatrice", i_aux, nro_cas)
|
||||
putName(hypo1d, "hypo1d_generatrice", i_aux, nro_cas)
|
||||
|
||||
disks = list()
|
||||
for i, face in enumerate(disques[:4]):
|
||||
name = "disk%d"%i
|
||||
for i_aux, face in enumerate(disques[:4]):
|
||||
name = "disk{}".format(i_aux)
|
||||
disks.append(meshFondFiss.GroupOnGeom(face, name, SMESH.FACE))
|
||||
_ = meshFondFiss.GetMesh().UnionListOfGroups( disks, 'PEAUEXT' )
|
||||
|
||||
@ -95,10 +99,10 @@ def insereFissureLongue_c (pipeFondFiss, disques, rayons, demiCercles, demiCercl
|
||||
|
||||
groups_demiCercles = list()
|
||||
groupnodes_demiCercles = list()
|
||||
for i, group in enumerate(groupsDemiCerclesPipe):
|
||||
name = "Cercle%d"%i
|
||||
for i_aux, group in enumerate(groupsDemiCerclesPipe):
|
||||
name = "Cercle{}".format(i_aux)
|
||||
groups_demiCercles.append(meshFondFiss.GroupOnGeom(group, name, SMESH.EDGE))
|
||||
name = "nCercle%d"%i
|
||||
name = "nCercle{}".format(i_aux)
|
||||
groupnodes_demiCercles.append(meshFondFiss.GroupOnGeom(group, name, SMESH.NODE))
|
||||
group_generFiss = meshFondFiss.GroupOnGeom(groupGenerFiss, "GenFiss", SMESH.EDGE)
|
||||
groupnode_generFiss = meshFondFiss.GroupOnGeom(groupGenerFiss, "GenFiss", SMESH.NODE)
|
||||
@ -134,12 +138,12 @@ def insereFissureLongue_c (pipeFondFiss, disques, rayons, demiCercles, demiCercl
|
||||
minDist = 100000
|
||||
minCoord = None
|
||||
imin = -1
|
||||
for i, edge in enumerate(demiCerclesPeau):
|
||||
for i_aux, edge in enumerate(demiCerclesPeau):
|
||||
discoord = geompy.MinDistanceComponents(vertex, edge)
|
||||
if discoord[0] <minDist:
|
||||
minDist = discoord[0]
|
||||
minCoord = discoord[1:]
|
||||
imin = i
|
||||
imin = i_aux
|
||||
if imin >= 0 and minDist > 1.E-6:
|
||||
logging.debug("node id moved : %s distance=%s", idNode, minDist)
|
||||
meshFondFiss.MoveNode(idNode, coordMesh[0] + minCoord[0], coordMesh[1] + minCoord[1], coordMesh[2] + minCoord[2])
|
||||
|
@ -33,12 +33,14 @@ from .putName import putName
|
||||
def insereFissureLongue_d (facePeau, edgePeauFiss, groupEdgesBordPeau, bordsLibres, \
|
||||
groupsDemiCerclesPeau, groups_demiCercles, verticesOutCercles, \
|
||||
nbSegGenLong, nbSegGenBout, profondeur, \
|
||||
mailleur="MeshGems"):
|
||||
mailleur="MeshGems", nro_cas=-1):
|
||||
"""maillage face de peau"""
|
||||
logging.info('start')
|
||||
logging.info("Maillage avec %s pour le cas n°%d", mailleur, nro_cas)
|
||||
|
||||
meshFacePeau = smesh.Mesh(facePeau)
|
||||
logging.info("Maillage avec %s", mailleur)
|
||||
putName(meshFacePeau, "facePeau", i_pref=nro_cas)
|
||||
|
||||
if ( mailleur == "MeshGems"):
|
||||
algo2d = meshFacePeau.Triangle(algo=smeshBuilder.MG_CADSurf)
|
||||
hypo2d = algo2d.Parameters()
|
||||
@ -55,9 +57,9 @@ def insereFissureLongue_d (facePeau, edgePeauFiss, groupEdgesBordPeau, bordsLibr
|
||||
hypo2d.SetFineness( 2 )
|
||||
hypo2d.SetMinSize( 2 )
|
||||
hypo2d.SetQuadAllowed( 0 )
|
||||
putName(algo2d.GetSubMesh(), "facePeau")
|
||||
putName(algo2d, "algo2d_facePeau")
|
||||
putName(hypo2d, "hypo2d_facePeau")
|
||||
putName(algo2d.GetSubMesh(), "facePeau", i_pref=nro_cas)
|
||||
putName(algo2d, "algo2d_facePeau", i_pref=nro_cas)
|
||||
putName(hypo2d, "hypo2d_facePeau", i_pref=nro_cas)
|
||||
#
|
||||
lenEdgePeauFiss = geompy.BasicProperties(edgePeauFiss)[0]
|
||||
frac = profondeur/lenEdgePeauFiss
|
||||
@ -70,22 +72,22 @@ def insereFissureLongue_d (facePeau, edgePeauFiss, groupEdgesBordPeau, bordsLibr
|
||||
hypo1d.SetDistrType( 2 )
|
||||
hypo1d.SetConversionMode( 1 )
|
||||
hypo1d.SetTableFunction( [ 0, ratio, frac, 1, (1.-frac), 1, 1, ratio ] )
|
||||
putName(algo1d.GetSubMesh(), "edgePeauFiss")
|
||||
putName(algo1d, "algo1d_edgePeauFiss")
|
||||
putName(hypo1d, "hypo1d_edgePeauFiss")
|
||||
putName(algo1d.GetSubMesh(), "edgePeauFiss", i_pref=nro_cas)
|
||||
putName(algo1d, "algo1d_edgePeauFiss", i_pref=nro_cas)
|
||||
putName(hypo1d, "hypo1d_edgePeauFiss", i_pref=nro_cas)
|
||||
#
|
||||
algo1d = meshFacePeau.UseExisting1DElements(geom=groupEdgesBordPeau)
|
||||
hypo1d = algo1d.SourceEdges([ bordsLibres ],0,0)
|
||||
putName(algo1d.GetSubMesh(), "bordsLibres")
|
||||
putName(algo1d, "algo1d_bordsLibres")
|
||||
putName(hypo1d, "hypo1d_bordsLibres")
|
||||
putName(algo1d.GetSubMesh(), "bordsLibres", i_pref=nro_cas)
|
||||
putName(algo1d, "algo1d_bordsLibres", i_pref=nro_cas)
|
||||
putName(hypo1d, "hypo1d_bordsLibres", i_pref=nro_cas)
|
||||
#
|
||||
for i in range(2):
|
||||
algo1d = meshFacePeau.UseExisting1DElements(geom=groupsDemiCerclesPeau[i])
|
||||
hypo1d = algo1d.SourceEdges([ groups_demiCercles[i] ],0,0)
|
||||
putName(algo1d.GetSubMesh(), "DemiCercles", i)
|
||||
putName(algo1d, "algo1d_groupDemiCercles", i)
|
||||
putName(hypo1d, "hypo1d_groupDemiCercles", i)
|
||||
for i_aux in range(2):
|
||||
algo1d = meshFacePeau.UseExisting1DElements(geom=groupsDemiCerclesPeau[i_aux])
|
||||
hypo1d = algo1d.SourceEdges([ groups_demiCercles[i_aux] ],0,0)
|
||||
putName(algo1d.GetSubMesh(), "DemiCercles", i_aux, nro_cas)
|
||||
putName(algo1d, "algo1d_groupDemiCercles", i_aux, nro_cas)
|
||||
putName(hypo1d, "hypo1d_groupDemiCercles", i_aux, nro_cas)
|
||||
|
||||
_ = meshFacePeau.GroupOnGeom(verticesOutCercles[0], "THOR", SMESH.NODE)
|
||||
_ = meshFacePeau.GroupOnGeom(verticesOutCercles[1], "THEX", SMESH.NODE)
|
||||
|
@ -32,13 +32,15 @@ from .putName import putName
|
||||
|
||||
def insereFissureLongue_e (faceFiss, edgePeauFiss, groupEdgesPeauFiss, group_generFiss, groupEdgesFaceFissPipe, \
|
||||
profondeur, rayonPipe, \
|
||||
mailleur="MeshGems"):
|
||||
mailleur="MeshGems", nro_cas=-1):
|
||||
"""maillage face de fissure"""
|
||||
logging.info('start')
|
||||
logging.info("Maillage avec %s pour le cas n°%d", mailleur, nro_cas)
|
||||
|
||||
meshFaceFiss = smesh.Mesh(faceFiss)
|
||||
mesh_size = (profondeur - rayonPipe)/math.sqrt(3.0) # pour avoir deux couches de triangles equilateraux partout sur la fissure
|
||||
logging.info("Maillage avec %s", mailleur)
|
||||
putName(meshFaceFiss, "faceFiss", i_pref=nro_cas)
|
||||
|
||||
mesh_size = (profondeur - rayonPipe)/math.sqrt(3.0) # pour avoir deux couches de triangles équilatéraux partout sur la fissure
|
||||
if ( mailleur == "MeshGems"):
|
||||
algo2d = meshFaceFiss.Triangle(algo=smeshBuilder.MG_CADSurf)
|
||||
hypo2d = algo2d.Parameters()
|
||||
@ -55,21 +57,21 @@ def insereFissureLongue_e (faceFiss, edgePeauFiss, groupEdgesPeauFiss, group_gen
|
||||
hypo2d.SetFineness( 2 )
|
||||
hypo2d.SetMinSize( 2 )
|
||||
hypo2d.SetQuadAllowed( 0 )
|
||||
putName(algo2d.GetSubMesh(), "faceFiss")
|
||||
putName(algo2d, "algo2d_faceFiss")
|
||||
putName(hypo2d, "hypo2d_faceFiss")
|
||||
putName(algo2d.GetSubMesh(), "faceFiss", i_pref=nro_cas)
|
||||
putName(algo2d, "algo2d_faceFiss", i_pref=nro_cas)
|
||||
putName(hypo2d, "hypo2d_faceFiss", i_pref=nro_cas)
|
||||
#
|
||||
algo1d = meshFaceFiss.UseExisting1DElements(geom=edgePeauFiss)
|
||||
hypo1d = algo1d.SourceEdges([ groupEdgesPeauFiss ],0,0)
|
||||
putName(algo1d.GetSubMesh(), "edgeFissPeau")
|
||||
putName(algo1d, "algo1d_edgeFissPeau")
|
||||
putName(hypo1d, "hypo1d_edgeFissPeau")
|
||||
putName(algo1d.GetSubMesh(), "edgeFissPeau", i_pref=nro_cas)
|
||||
putName(algo1d, "algo1d_edgeFissPeau", i_pref=nro_cas)
|
||||
putName(hypo1d, "hypo1d_edgeFissPeau", i_pref=nro_cas)
|
||||
#
|
||||
algo1d = meshFaceFiss.UseExisting1DElements(geom=groupEdgesFaceFissPipe)
|
||||
hypo1d = algo1d.SourceEdges([ group_generFiss ],0,0)
|
||||
putName(algo1d.GetSubMesh(), "edgeFissPeau")
|
||||
putName(algo1d, "algo1d_edgeFissPeau")
|
||||
putName(hypo1d, "hypo1d_edgeFissPeau")
|
||||
putName(algo1d.GetSubMesh(), "edgeFissPeau", i_pref=nro_cas)
|
||||
putName(algo1d, "algo1d_edgeFissPeau", i_pref=nro_cas)
|
||||
putName(hypo1d, "hypo1d_edgeFissPeau", i_pref=nro_cas)
|
||||
|
||||
_ = meshFaceFiss.GroupOnGeom(faceFiss, "fisOutPi", SMESH.FACE)
|
||||
|
||||
|
@ -30,16 +30,16 @@ from .geomsmesh import smesh
|
||||
from .putName import putName
|
||||
|
||||
def insereFissureLongue_f (internalBoundary, meshFondFiss, meshFacePeau, meshFaceFiss, \
|
||||
mailleur="MeshGems"):
|
||||
mailleur="MeshGems", nro_cas=-1):
|
||||
"""maillage meshBoiteDefaut"""
|
||||
logging.info('start')
|
||||
logging.info("insereFissureLongue_f (%s)", mailleur)
|
||||
logging.info("Usage du mailleur %s pour le cas n°%d", mailleur, nro_cas)
|
||||
|
||||
meshBoiteDefaut = smesh.Concatenate( [internalBoundary.GetMesh(), \
|
||||
meshFondFiss.GetMesh(), \
|
||||
meshFacePeau.GetMesh(), \
|
||||
meshFaceFiss.GetMesh()], \
|
||||
1, 1, 1e-05,False)
|
||||
1, 1, 1e-05,False )
|
||||
# pour aider l'algo hexa-tetra a ne pas mettre de pyramides a l'exterieur des volumes replies sur eux-memes
|
||||
# on designe les faces de peau en quadrangles par le groupe "skinFaces"
|
||||
group_faceFissOutPipe = None
|
||||
@ -65,9 +65,9 @@ def insereFissureLongue_f (internalBoundary, meshFondFiss, meshFacePeau, meshFac
|
||||
hypo3d.SetVerboseLevel( 0 )
|
||||
hypo3d.SetStandardOutputLog( 0 )
|
||||
hypo3d.SetRemoveLogOnSuccess( 1 )
|
||||
putName(algo3d.GetSubMesh(), "boiteDefaut")
|
||||
putName(algo3d, "algo3d_boiteDefaut")
|
||||
putName(meshBoiteDefaut, "boiteDefaut")
|
||||
putName(algo3d.GetSubMesh(), "boiteDefaut", i_pref=nro_cas)
|
||||
putName(algo3d, "algo3d_boiteDefaut", i_pref=nro_cas)
|
||||
putName(meshBoiteDefaut, "boiteDefaut", i_pref=nro_cas)
|
||||
|
||||
is_done = meshBoiteDefaut.Compute()
|
||||
text = "meshBoiteDefaut.Compute"
|
||||
|
@ -37,9 +37,11 @@ from .triedreBase import triedreBase
|
||||
def insereFissureLongue_g(nomFicFissure, fichierMaillageFissure, nomFicSain, maillageSain, \
|
||||
meshBoiteDefaut, facePorteFissure, \
|
||||
group_faceFissInPipe, group_faceFissOutPipe, \
|
||||
zoneDefaut, zoneDefaut_skin, zoneDefaut_internalEdges, zoneDefaut_internalFaces):
|
||||
zoneDefaut, zoneDefaut_skin, zoneDefaut_internalEdges, zoneDefaut_internalFaces, \
|
||||
nro_cas=-1):
|
||||
"""Les groupes de la fissure longue"""
|
||||
logging.info('start')
|
||||
logging.info("Pour le cas n°%d", mailleur, nro_cas)
|
||||
|
||||
O, _, _, _ = triedreBase()
|
||||
|
||||
@ -52,7 +54,7 @@ def insereFissureLongue_g(nomFicFissure, fichierMaillageFissure, nomFicSain, mai
|
||||
|
||||
_ = meshBoiteDefaut.GetMesh().UnionListOfGroups( [ group_faceFissOutPipe, group_faceFissInPipe ], 'FACE1' )
|
||||
maillageSain = enleveDefaut(maillageSain, zoneDefaut, zoneDefaut_skin, zoneDefaut_internalFaces, zoneDefaut_internalEdges)
|
||||
putName(maillageSain, nomFicSain+"_coupe")
|
||||
putName(maillageSain, nomFicSain+"_coupe", i_pref=nro_cas)
|
||||
extrusionFaceFissure, normfiss = shapeSurFissure(facePorteFissure)
|
||||
maillageComplet = RegroupeSainEtDefaut(maillageSain, meshBoiteDefaut, extrusionFaceFissure, facePorteFissure, 'COUDE')
|
||||
|
||||
|
@ -28,9 +28,11 @@ from .geomsmesh import smesh
|
||||
|
||||
from .putName import putName
|
||||
|
||||
def mailleAretesEtJonction(internalBoundary, aretesVivesCoupees, lgAretesVives):
|
||||
def mailleAretesEtJonction (internalBoundary, aretesVivesCoupees, lgAretesVives, \
|
||||
nro_cas=-1):
|
||||
"""edges de bord, faces défaut à respecter"""
|
||||
logging.info('start')
|
||||
logging.info("Pour le cas n°%d", nro_cas)
|
||||
|
||||
_ = smesh.CreateFilterManager()
|
||||
_, internalBoundary, _NoneGroup = internalBoundary.MakeBoundaryElements( SMESH.BND_1DFROM2D, '', '', 0, [ ])
|
||||
@ -39,7 +41,7 @@ def mailleAretesEtJonction(internalBoundary, aretesVivesCoupees, lgAretesVives):
|
||||
criteres.append(unCritere)
|
||||
filtre = smesh.GetFilterFromCriteria(criteres)
|
||||
bordsLibres = internalBoundary.MakeGroupByFilter( 'bords', filtre )
|
||||
smesh.SetName(bordsLibres, 'bordsLibres')
|
||||
putName(bordsLibres, 'bordsLibres', i_pref=nro_cas)
|
||||
|
||||
# --- pour aider l'algo hexa-tetra à ne pas mettre de pyramides à l'exterieur des volumes repliés sur eux-mêmes
|
||||
# on désigne les faces de peau en quadrangles par le groupe "skinFaces"
|
||||
@ -56,9 +58,9 @@ def mailleAretesEtJonction(internalBoundary, aretesVivesCoupees, lgAretesVives):
|
||||
meshAretesVives = smesh.Mesh(aretesVivesC)
|
||||
algo1d = meshAretesVives.Segment()
|
||||
hypo1d = algo1d.LocalLength(lgAretesVives,[],1e-07)
|
||||
putName(algo1d.GetSubMesh(), "aretesVives")
|
||||
putName(algo1d, "algo1d_aretesVives")
|
||||
putName(hypo1d, "hypo1d_aretesVives")
|
||||
putName(algo1d.GetSubMesh(), "aretesVives", i_pref=nro_cas)
|
||||
putName(algo1d, "algo1d_aretesVives", i_pref=nro_cas)
|
||||
putName(hypo1d, "hypo1d_aretesVives", i_pref=nro_cas)
|
||||
|
||||
is_done = meshAretesVives.Compute()
|
||||
text = "meshAretesVives.Compute"
|
||||
|
@ -31,9 +31,10 @@ from .putName import putName
|
||||
def mailleFacesFissure(faceFissureExterne, \
|
||||
edgesPipeFissureExterneC, edgesPeauFissureExterneC, \
|
||||
meshPipeGroups, areteFaceFissure, rayonPipe, nbsegRad, \
|
||||
mailleur="MeshGems"):
|
||||
mailleur="MeshGems", nro_cas=-1):
|
||||
"""maillage faces de fissure"""
|
||||
logging.info('start')
|
||||
logging.info("Maillage avec %s pour le cas n°%d", mailleur, nro_cas)
|
||||
|
||||
meshFaceFiss = smesh.Mesh(faceFissureExterne)
|
||||
logging.info("Maillage avec %s", mailleur)
|
||||
@ -54,17 +55,17 @@ def mailleFacesFissure(faceFissureExterne, \
|
||||
hypo2d.SetFineness( 2 )
|
||||
hypo2d.SetMinSize( rayonPipe/float(nbsegRad) )
|
||||
hypo2d.SetQuadAllowed( 0 )
|
||||
putName(algo2d.GetSubMesh(), "faceFiss")
|
||||
putName(algo2d, "algo2d_faceFiss")
|
||||
putName(hypo2d, "hypo2d_faceFiss")
|
||||
putName(algo2d.GetSubMesh(), "faceFiss", i_pref=nro_cas)
|
||||
putName(algo2d, "algo2d_faceFiss", i_pref=nro_cas)
|
||||
putName(hypo2d, "hypo2d_faceFiss", i_pref=nro_cas)
|
||||
|
||||
texte = "Récupération des arêtes de '{}'".format(edgesPipeFissureExterneC.GetName())
|
||||
logging.info(texte)
|
||||
algo1d = meshFaceFiss.UseExisting1DElements(geom=edgesPipeFissureExterneC)
|
||||
hypo1d = algo1d.SourceEdges([ meshPipeGroups['edgeFaceFissGroup'] ],0,0)
|
||||
putName(algo1d.GetSubMesh(), "edgeFissPeau")
|
||||
putName(algo1d, "algo1d_edgeFissPeau")
|
||||
putName(hypo1d, "hypo1d_edgeFissPeau")
|
||||
putName(algo1d.GetSubMesh(), "edgeFissPeau", i_pref=nro_cas)
|
||||
putName(algo1d, "algo1d_edgeFissPeau", i_pref=nro_cas)
|
||||
putName(hypo1d, "hypo1d_edgeFissPeau", i_pref=nro_cas)
|
||||
|
||||
grpFaceFissureExterne = meshFaceFiss.GroupOnGeom(faceFissureExterne, "fisOutPi", SMESH.FACE)
|
||||
grpEdgesPeauFissureExterne = meshFaceFiss.GroupOnGeom(edgesPeauFissureExterneC,'edgesPeauFissureExterne',SMESH.EDGE)
|
||||
|
@ -40,7 +40,8 @@ def mailleFacesPeau(partitionsPeauFissFond, idFillingFromBout, facesDefaut, \
|
||||
mailleur="MeshGems", nro_cas=-1):
|
||||
"""maillage faces de peau"""
|
||||
logging.info('start')
|
||||
logging.info(mailleur+" pour le cas n° %d"%nro_cas)
|
||||
logging.info("Maillage avec %s pour le cas n°%d", mailleur, nro_cas)
|
||||
|
||||
nbFacesFilling = len(partitionsPeauFissFond)
|
||||
boutFromIfil = [None for _ in range(nbFacesFilling)]
|
||||
if idFillingFromBout[0] != idFillingFromBout[1]: # repérage des extremites du pipe quand elles débouchent sur des faces différentes
|
||||
|
@ -36,9 +36,10 @@ def meshBlocPart(blocPartition, faceFissure, tore, centres, edges, diams, circle
|
||||
gencnt, facefissoutore, edgeext, facesExternes, facesExtBloc, facesExtElli, \
|
||||
aretesInternes, internalBoundary, ellipsoidep, sharedFaces, sharedEdges, edgesBords, \
|
||||
nbsegExt, nbsegGen, nbsegRad, scaleRad, reverses, reverext, nbsegCercle, nbsegFis, dmoyen, lensegEllipsoide, \
|
||||
mailleur="MeshGems"):
|
||||
mailleur="MeshGems", nro_cas=-1):
|
||||
"""Maillage du bloc partitionné"""
|
||||
logging.info('start')
|
||||
logging.info("Maillage avec %s pour le cas n°%d", mailleur, nro_cas)
|
||||
|
||||
# --- edges de bord à respecter
|
||||
|
||||
@ -49,7 +50,7 @@ def meshBlocPart(blocPartition, faceFissure, tore, centres, edges, diams, circle
|
||||
criteres.append(unCritere)
|
||||
filtre = smesh.GetFilterFromCriteria(criteres)
|
||||
bordsLibres = internalBoundary.MakeGroupByFilter( 'bords', filtre )
|
||||
smesh.SetName(bordsLibres, 'bordsLibres')
|
||||
putName(bordsLibres, 'bordsLibres', i_pref=nro_cas)
|
||||
|
||||
# --- maillage bloc
|
||||
|
||||
@ -61,34 +62,34 @@ def meshBlocPart(blocPartition, faceFissure, tore, centres, edges, diams, circle
|
||||
hypo2d.SetLocalLength(lensegEllipsoide)
|
||||
hypo2d.LengthFromEdges()
|
||||
hypo2d.SetAllowQuadrangles(0)
|
||||
putName(algo2d.GetSubMesh(), "sharedFaces", i_aux)
|
||||
putName(algo2d, "algo2d_sharedFaces", i_aux)
|
||||
putName(hypo2d, "hypo2d_sharedFaces", i_aux)
|
||||
putName(algo2d.GetSubMesh(), "sharedFaces", i_aux, nro_cas)
|
||||
putName(algo2d, "algo2d_sharedFaces", i_aux, nro_cas)
|
||||
putName(hypo2d, "hypo2d_sharedFaces", i_aux, nro_cas)
|
||||
|
||||
for i_aux, sharedEdges_i in enumerate(sharedEdges):
|
||||
algo1d = bloc1.Segment(geom=sharedEdges_i)
|
||||
hypo1d = algo1d.LocalLength(lensegEllipsoide)
|
||||
putName(algo1d.GetSubMesh(), "sharedEdges", i_aux)
|
||||
putName(algo1d, "algo1d_sharedEdges", i_aux)
|
||||
putName(hypo1d, "hypo1d_sharedEdges", i_aux)
|
||||
putName(algo1d.GetSubMesh(), "sharedEdges", i_aux, nro_cas)
|
||||
putName(algo1d, "algo1d_sharedEdges", i_aux, nro_cas)
|
||||
putName(hypo1d, "hypo1d_sharedEdges", i_aux, nro_cas)
|
||||
|
||||
declareAlgoEllipsoideFirst = False
|
||||
if declareAlgoEllipsoideFirst:
|
||||
algo3d = bloc1.Tetrahedron(algo=smeshBuilder.NETGEN,geom=ellipsoidep)
|
||||
hypo3d = algo3d.MaxElementVolume(1000.0)
|
||||
putName(algo3d.GetSubMesh(), "ellipsoide")
|
||||
putName(algo3d, "algo3d_ellipsoide")
|
||||
putName(hypo3d, "hypo3d_ellipsoide")
|
||||
putName(algo3d.GetSubMesh(), "ellipsoide", i_pref=nro_cas)
|
||||
putName(algo3d, "algo3d_ellipsoide", i_pref=nro_cas)
|
||||
putName(hypo3d, "hypo3d_ellipsoide", i_pref=nro_cas)
|
||||
|
||||
algo3d = bloc1.Prism(geom=tore)
|
||||
algo2d = bloc1.Quadrangle(geom=tore)
|
||||
algo1d = bloc1.Segment(geom=tore)
|
||||
hypo1d = algo1d.NumberOfSegments(nbsegGen)
|
||||
putName(algo3d.GetSubMesh(), "tore")
|
||||
putName(algo3d, "algo3d_tore")
|
||||
putName(algo2d, "algo2d_tore")
|
||||
putName(algo1d, "algo1d_tore")
|
||||
putName(hypo1d, "hypo1d_tore")
|
||||
putName(algo3d.GetSubMesh(), "tore", i_pref=nro_cas)
|
||||
putName(algo3d, "algo3d_tore", i_pref=nro_cas)
|
||||
putName(algo2d, "algo2d_tore", i_pref=nro_cas)
|
||||
putName(algo1d, "algo1d_tore", i_pref=nro_cas)
|
||||
putName(hypo1d, "hypo1d_tore", i_pref=nro_cas)
|
||||
|
||||
for i_aux, faces_i in enumerate(faces):
|
||||
algo2d = bloc1.Quadrangle(geom=faces_i)
|
||||
@ -96,9 +97,9 @@ def meshBlocPart(blocPartition, faceFissure, tore, centres, edges, diams, circle
|
||||
hypo2d.SetTriaVertex( geompy.GetSubShapeID(blocPartition,centres[i_aux]) )
|
||||
hypo2d.SetQuadType( StdMeshersBuilder.QUAD_STANDARD )
|
||||
_ = bloc1.AddHypothesis(hypo2d,faces_i)
|
||||
putName(algo2d.GetSubMesh(), "faces", i_aux)
|
||||
putName(algo2d, "algo2d_faces", i_aux)
|
||||
putName(hypo2d, "hypo2d_faces", i_aux)
|
||||
putName(algo2d.GetSubMesh(), "faces", i_aux, nro_cas)
|
||||
putName(algo2d, "algo2d_faces", i_aux, nro_cas)
|
||||
putName(hypo2d, "hypo2d_faces", i_aux, nro_cas)
|
||||
|
||||
for i_aux, edges_i in enumerate(edges):
|
||||
algo1d = bloc1.Segment(geom=edges_i)
|
||||
@ -106,16 +107,16 @@ def meshBlocPart(blocPartition, faceFissure, tore, centres, edges, diams, circle
|
||||
hypo1d = algo1d.NumberOfSegments(nbsegRad, scaleRad,[ geompy.GetSubShapeID(blocPartition,edges_i) ])
|
||||
else:
|
||||
hypo1d = algo1d.NumberOfSegments(nbsegRad, scaleRad,[ ])
|
||||
putName(algo1d.GetSubMesh(), "edges", i_aux)
|
||||
putName(algo1d, "algo1d_edges", i_aux)
|
||||
putName(hypo1d, "hypo1d_edges", i_aux)
|
||||
putName(algo1d.GetSubMesh(), "edges", i_aux, nro_cas)
|
||||
putName(algo1d, "algo1d_edges", i_aux, nro_cas)
|
||||
putName(hypo1d, "hypo1d_edges", i_aux, nro_cas)
|
||||
|
||||
for i_aux, circles_i in enumerate(circles):
|
||||
algo1d = bloc1.Segment(geom=circles_i)
|
||||
hypo1d = algo1d.NumberOfSegments(nbsegCercle)
|
||||
putName(algo1d.GetSubMesh(), "circles", i_aux)
|
||||
putName(algo1d, "algo1d_circles", i_aux)
|
||||
putName(hypo1d, "hypo1d_circles", i_aux)
|
||||
putName(algo1d.GetSubMesh(), "circles", i_aux, nro_cas)
|
||||
putName(algo1d, "algo1d_circles", i_aux, nro_cas)
|
||||
putName(hypo1d, "hypo1d_circles", i_aux, nro_cas)
|
||||
|
||||
if len(edgeext) == 1:
|
||||
densite = int(round(nbsegFis/2))
|
||||
@ -124,9 +125,9 @@ def meshBlocPart(blocPartition, faceFissure, tore, centres, edges, diams, circle
|
||||
hypo1d.SetDistrType( 2 )
|
||||
hypo1d.SetConversionMode( 1 )
|
||||
hypo1d.SetTableFunction( [ 0, densite, 0.4, 1, 0.6, 1, 1, densite ] )
|
||||
putName(algo1d.GetSubMesh(), "edgeext")
|
||||
putName(algo1d, "algo1d_edgeext")
|
||||
putName(hypo1d, "hypo1d_edgeext")
|
||||
putName(algo1d.GetSubMesh(), "edgeext", i_pref=nro_cas)
|
||||
putName(algo1d, "algo1d_edgeext", i_pref=nro_cas)
|
||||
putName(hypo1d, "hypo1d_edgeext", i_pref=nro_cas)
|
||||
else:
|
||||
longTotal = 0
|
||||
longEdgeExts = list()
|
||||
@ -144,15 +145,15 @@ def meshBlocPart(blocPartition, faceFissure, tore, centres, edges, diams, circle
|
||||
hypo1d.SetTableFunction( [ 0, densite, 0.8, 1, 1, 1 ] )
|
||||
if reverext[i_aux]:
|
||||
hypo1d.SetReversedEdges([ geompy.GetSubShapeID(blocPartition, edgeext_i) ])
|
||||
putName(algo1d.GetSubMesh(), "edgeext", i_aux)
|
||||
putName(algo1d, "algo1d_edgeext", i_aux)
|
||||
putName(hypo1d, "hypo1d_edgeext", i_aux)
|
||||
putName(algo1d.GetSubMesh(), "edgeext", i_aux, nro_cas)
|
||||
putName(algo1d, "algo1d_edgeext", i_aux, nro_cas)
|
||||
putName(hypo1d, "hypo1d_edgeext", i_aux, nro_cas)
|
||||
|
||||
algo2d = bloc1.Triangle(algo=smeshBuilder.NETGEN_2D, geom=facefissoutore)
|
||||
hypo2d = algo2d.LengthFromEdges()
|
||||
putName(algo2d.GetSubMesh(), "facefissoutore")
|
||||
putName(algo2d, "algo2d_facefissoutore")
|
||||
putName(hypo2d, "hypo2d_facefissoutore")
|
||||
putName(algo2d.GetSubMesh(), "facefissoutore", i_pref=nro_cas)
|
||||
putName(algo2d, "algo2d_facefissoutore", i_pref=nro_cas)
|
||||
putName(hypo2d, "hypo2d_facefissoutore", i_pref=nro_cas)
|
||||
|
||||
|
||||
maxElemArea = 0.5*dmoyen*dmoyen
|
||||
@ -164,33 +165,33 @@ def meshBlocPart(blocPartition, faceFissure, tore, centres, edges, diams, circle
|
||||
if edgesBords is None:
|
||||
algo1d = bloc1.Segment(geom=facesExternes_i)
|
||||
hypo1d = algo1d.NumberOfSegments(1)
|
||||
putName(algo2d.GetSubMesh(), "facesExternes", i_aux)
|
||||
putName(algo2d, "algo2d_facesExternes", i_aux)
|
||||
putName(hypo2d, "hypo2d_facesExternes", i_aux)
|
||||
putName(algo2d.GetSubMesh(), "facesExternes", i_aux, nro_cas)
|
||||
putName(algo2d, "algo2d_facesExternes", i_aux, nro_cas)
|
||||
putName(hypo2d, "hypo2d_facesExternes", i_aux, nro_cas)
|
||||
if edgesBords is None:
|
||||
putName(algo1d, "algo1d_facesExternes", i_aux)
|
||||
putName(hypo1d, "hypo1d_facesExternes", i_aux)
|
||||
putName(algo1d, "algo1d_facesExternes", i_aux, nro_cas)
|
||||
putName(hypo1d, "hypo1d_facesExternes", i_aux, nro_cas)
|
||||
|
||||
for i_aux, aretesInternes_i in enumerate(aretesInternes):
|
||||
algo1d = bloc1.Segment(geom=aretesInternes_i)
|
||||
hypo1d = algo1d.NumberOfSegments(nbsegExt)
|
||||
putName(algo1d.GetSubMesh(), "aretesInternes", i_aux)
|
||||
putName(algo1d, "algo1d_aretesInternes", i_aux)
|
||||
putName(hypo1d, "hypo1d_aretesInternes", i_aux)
|
||||
putName(algo1d.GetSubMesh(), "aretesInternes", i_aux, nro_cas)
|
||||
putName(algo1d, "algo1d_aretesInternes", i_aux, nro_cas)
|
||||
putName(hypo1d, "hypo1d_aretesInternes", i_aux, nro_cas)
|
||||
|
||||
if edgesBords is not None:
|
||||
algo1d = bloc1.UseExisting1DElements(geom=edgesBords)
|
||||
hypo1d = algo1d.SourceEdges([ bordsLibres ],0,0)
|
||||
putName(algo1d.GetSubMesh(), "bordsLibres")
|
||||
putName(algo1d, "algo1d_bordsLibres")
|
||||
putName(hypo1d, "hypo1d_bordsLibres")
|
||||
putName(algo1d.GetSubMesh(), "bordsLibres", i_pref=nro_cas)
|
||||
putName(algo1d, "algo1d_bordsLibres", i_pref=nro_cas)
|
||||
putName(hypo1d, "hypo1d_bordsLibres", i_pref=nro_cas)
|
||||
|
||||
if not declareAlgoEllipsoideFirst:
|
||||
algo3d = bloc1.Tetrahedron(algo=smeshBuilder.NETGEN,geom=ellipsoidep)
|
||||
hypo3d = algo3d.MaxElementVolume(1000.0)
|
||||
putName(algo3d.GetSubMesh(), "ellipsoide")
|
||||
putName(algo3d, "algo3d_ellipsoide")
|
||||
putName(hypo3d, "hypo3d_ellipsoide")
|
||||
putName(algo3d.GetSubMesh(), "ellipsoide", i_pref=nro_cas)
|
||||
putName(algo3d, "algo3d_ellipsoide", i_pref=nro_cas)
|
||||
putName(hypo3d, "hypo3d_ellipsoide", i_pref=nro_cas)
|
||||
|
||||
_ = bloc1.GroupOnGeom(faceFissure,'FACE1',SMESH.FACE)
|
||||
_ = bloc1.GroupOnGeom(gencnt,'nfondfis',SMESH.NODE)
|
||||
@ -230,9 +231,9 @@ def meshBlocPart(blocPartition, faceFissure, tore, centres, edges, diams, circle
|
||||
|
||||
algo3d = blocMesh.Tetrahedron(algo=smeshBuilder.NETGEN)
|
||||
hypo3d = algo3d.MaxElementVolume(1000.0)
|
||||
putName(algo3d.GetSubMesh(), "bloc")
|
||||
putName(algo3d, "algo3d_bloc")
|
||||
putName(hypo3d, "hypo3d_bloc")
|
||||
putName(algo3d.GetSubMesh(), "bloc", i_pref=nro_cas)
|
||||
putName(algo3d, "algo3d_bloc", i_pref=nro_cas)
|
||||
putName(hypo3d, "hypo3d_bloc", i_pref=nro_cas)
|
||||
|
||||
is_done = blocMesh.Compute()
|
||||
text = "blocMesh.Compute"
|
||||
|
@ -29,8 +29,10 @@ from .geomsmesh import smesh
|
||||
from .fissError import fissError
|
||||
from .listOfExtraFunctions import lookForCorner
|
||||
from .fusionMaillageAttributionDefaut import fusionMaillageDefaut
|
||||
from .putName import putName
|
||||
|
||||
def peauInterne(fichierMaillage, shapeDefaut, nomZones):
|
||||
def peauInterne(fichierMaillage, shapeDefaut, nomZones, \
|
||||
nro_cas=-1):
|
||||
"""Retrouve les groupes de défaut dans le maillage sain modifié par CreateHoleSkin (CreeZoneDefautMaillage)
|
||||
|
||||
On récupère le volume et la peau de la zone de défaut, les éventuelles faces et arêtes internes de cette zone.
|
||||
@ -97,6 +99,7 @@ def peauInterne(fichierMaillage, shapeDefaut, nomZones):
|
||||
internalBoundary = smesh.CopyMesh( internal, 'internalBoundary', 0, 0)
|
||||
|
||||
maillageDefautCible = smesh.CopyMesh(zoneDefaut_skin, 'maillageCible', 0, 0)
|
||||
putName(maillageDefautCible, "maillageCible", i_pref=nro_cas)
|
||||
listOfCorner = lookForCorner(maillageDefautCible)
|
||||
texte = "listOfCorner = {}".format(listOfCorner)
|
||||
logging.debug(texte)
|
||||
|
@ -17,9 +17,9 @@
|
||||
#
|
||||
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
#
|
||||
|
||||
"""Nommage des objets mesh (algorithme, hypothèse, subMesh)"""
|
||||
|
||||
#import logging
|
||||
from .geomsmesh import smesh
|
||||
|
||||
def putName (objmesh, name, i_suff=-1, i_pref=-1):
|
||||
@ -31,6 +31,7 @@ def putName (objmesh, name, i_suff=-1, i_pref=-1):
|
||||
@i_pref un éventuel préfixe
|
||||
"""
|
||||
|
||||
#logging.info("putName pour %s - i_suff=%d, i_pref=%d", name, i_suff, i_pref)
|
||||
# suffixe éventuel :
|
||||
if i_suff >= 0:
|
||||
suffixe = "_{}".format(i_suff)
|
||||
@ -40,5 +41,6 @@ def putName (objmesh, name, i_suff=-1, i_pref=-1):
|
||||
if i_pref >= 0:
|
||||
prefixe = "Cas{:02d}_".format(i_pref)
|
||||
name = prefixe + name
|
||||
#logging.info("Au final : %s", name)
|
||||
|
||||
smesh.SetName(objmesh, name)
|
||||
|
Loading…
Reference in New Issue
Block a user