mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-13 10:10:33 +05:00
Nommage des éléments de smesh
This commit is contained in:
parent
b07ad0d79c
commit
403a6925d3
@ -80,7 +80,7 @@ class cubeAngle(fissureGenerique):
|
|||||||
geompy.addToStudyInFather( shellFiss, fondFiss, 'fondFiss' )
|
geompy.addToStudyInFather( shellFiss, fondFiss, 'fondFiss' )
|
||||||
|
|
||||||
mailleur = self.mailleur2d3d()
|
mailleur = self.mailleur2d3d()
|
||||||
coordsNoeudsFissure = genereMeshCalculZoneDefaut(shellFiss, 5 ,10, mailleur)
|
coordsNoeudsFissure = genereMeshCalculZoneDefaut(shellFiss, 5 ,10, mailleur, self.numeroCas)
|
||||||
|
|
||||||
centre = None
|
centre = None
|
||||||
|
|
||||||
|
@ -51,7 +51,7 @@ class cylindre(fissureGenerique):
|
|||||||
logging.info("genereMaillageSain %s", self.nomCas)
|
logging.info("genereMaillageSain %s", self.nomCas)
|
||||||
|
|
||||||
([objetSain], _) = smesh.CreateMeshesFromMED(os.path.join(gmu.pathBloc, "materielCasTests", "CylindreSain.med"))
|
([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
|
return [objetSain, True] # True : maillage hexa
|
||||||
|
|
||||||
@ -80,7 +80,7 @@ class cylindre(fissureGenerique):
|
|||||||
geompy.addToStudyInFather( shellFiss, fondFiss, 'fondFiss' )
|
geompy.addToStudyInFather( shellFiss, fondFiss, 'fondFiss' )
|
||||||
|
|
||||||
mailleur = self.mailleur2d3d()
|
mailleur = self.mailleur2d3d()
|
||||||
coordsNoeudsFissure = genereMeshCalculZoneDefaut(shellFiss, 5 ,15, mailleur)
|
coordsNoeudsFissure = genereMeshCalculZoneDefaut(shellFiss, 5 ,15, mailleur, self.numeroCas)
|
||||||
|
|
||||||
centre = None
|
centre = None
|
||||||
return [shellFiss, centre, lgInfluence, coordsNoeudsFissure, fondFiss]
|
return [shellFiss, centre, lgInfluence, coordsNoeudsFissure, fondFiss]
|
||||||
|
@ -52,7 +52,7 @@ class cylindre_2(cylindre):
|
|||||||
geompy.addToStudyInFather( shellFiss, fondFiss, 'fondFiss' )
|
geompy.addToStudyInFather( shellFiss, fondFiss, 'fondFiss' )
|
||||||
|
|
||||||
mailleur = self.mailleur2d3d()
|
mailleur = self.mailleur2d3d()
|
||||||
coordsNoeudsFissure = genereMeshCalculZoneDefaut(shellFiss, 5 ,15, mailleur)
|
coordsNoeudsFissure = genereMeshCalculZoneDefaut(shellFiss, 5 ,15, mailleur, self.numeroCas)
|
||||||
|
|
||||||
centre = None
|
centre = None
|
||||||
return [shellFiss, centre, lgInfluence, coordsNoeudsFissure, fondFiss]
|
return [shellFiss, centre, lgInfluence, coordsNoeudsFissure, fondFiss]
|
||||||
|
@ -88,7 +88,7 @@ class ellipse_1(fissureGenerique):
|
|||||||
geompy.addToStudyInFather( shellFiss, fondFiss, 'fondFiss' )
|
geompy.addToStudyInFather( shellFiss, fondFiss, 'fondFiss' )
|
||||||
|
|
||||||
mailleur = self.mailleur2d3d()
|
mailleur = self.mailleur2d3d()
|
||||||
coordsNoeudsFissure = genereMeshCalculZoneDefaut(shellFiss, 5 ,25, mailleur)
|
coordsNoeudsFissure = genereMeshCalculZoneDefaut(shellFiss, 5 ,25, mailleur, self.numeroCas)
|
||||||
|
|
||||||
centre = None
|
centre = None
|
||||||
|
|
||||||
|
@ -54,7 +54,7 @@ class ellipse_2(ellipse_1):
|
|||||||
geompy.addToStudyInFather( shellFiss, fondFiss, 'fondFiss' )
|
geompy.addToStudyInFather( shellFiss, fondFiss, 'fondFiss' )
|
||||||
|
|
||||||
mailleur = self.mailleur2d3d()
|
mailleur = self.mailleur2d3d()
|
||||||
coordsNoeudsFissure = genereMeshCalculZoneDefaut(shellFiss, 5 ,25, mailleur)
|
coordsNoeudsFissure = genereMeshCalculZoneDefaut(shellFiss, 5 ,25, mailleur, self.numeroCas)
|
||||||
|
|
||||||
centre = None
|
centre = None
|
||||||
|
|
||||||
|
@ -48,7 +48,7 @@ class eprouvetteCourbe(fissureGenerique):
|
|||||||
logging.info(texte)
|
logging.info(texte)
|
||||||
|
|
||||||
([objetSain], _) = smesh.CreateMeshesFromMED(os.path.join(gmu.pathBloc, "materielCasTests", "EprouvetteCourbe.med"))
|
([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
|
return [objetSain, True] # True : maillage hexa
|
||||||
|
|
||||||
@ -82,7 +82,7 @@ class eprouvetteCourbe(fissureGenerique):
|
|||||||
geompy.addToStudyInFather( shellFiss, fondFiss, 'fondFiss' )
|
geompy.addToStudyInFather( shellFiss, fondFiss, 'fondFiss' )
|
||||||
|
|
||||||
mailleur = self.mailleur2d3d()
|
mailleur = self.mailleur2d3d()
|
||||||
coordsNoeudsFissure = genereMeshCalculZoneDefaut(shellFiss, 5 ,10, mailleur)
|
coordsNoeudsFissure = genereMeshCalculZoneDefaut(shellFiss, 5 ,10, mailleur, self.numeroCas)
|
||||||
|
|
||||||
centre = None
|
centre = None
|
||||||
|
|
||||||
|
@ -53,7 +53,7 @@ class eprouvetteDroite(fissureGenerique):
|
|||||||
logging.info("genereMaillageSain %s", self.nomCas)
|
logging.info("genereMaillageSain %s", self.nomCas)
|
||||||
|
|
||||||
([objetSain], _) = smesh.CreateMeshesFromMED(os.path.join(gmu.pathBloc, "materielCasTests", "eprouvetteDroite.med"))
|
([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
|
return [objetSain, True] # True : maillage hexa
|
||||||
|
|
||||||
@ -85,7 +85,7 @@ class eprouvetteDroite(fissureGenerique):
|
|||||||
geompy.addToStudyInFather( shellFiss, fondFiss, 'fondFiss' )
|
geompy.addToStudyInFather( shellFiss, fondFiss, 'fondFiss' )
|
||||||
|
|
||||||
mailleur = self.mailleur2d3d()
|
mailleur = self.mailleur2d3d()
|
||||||
coordsNoeudsFissure = genereMeshCalculZoneDefaut(shellFiss, 5 ,10, mailleur)
|
coordsNoeudsFissure = genereMeshCalculZoneDefaut(shellFiss, 5 ,10, mailleur, self.numeroCas)
|
||||||
|
|
||||||
centre = None
|
centre = None
|
||||||
return [shellFiss, centre, lgInfluence, coordsNoeudsFissure, fondFiss]
|
return [shellFiss, centre, lgInfluence, coordsNoeudsFissure, fondFiss]
|
||||||
|
@ -51,7 +51,7 @@ class eprouvetteDroite_2(eprouvetteDroite):
|
|||||||
geompy.addToStudyInFather( shellFiss, fondFiss, 'fondFiss' )
|
geompy.addToStudyInFather( shellFiss, fondFiss, 'fondFiss' )
|
||||||
|
|
||||||
mailleur = self.mailleur2d3d()
|
mailleur = self.mailleur2d3d()
|
||||||
coordsNoeudsFissure = genereMeshCalculZoneDefaut(shellFiss, 5 ,10, mailleur)
|
coordsNoeudsFissure = genereMeshCalculZoneDefaut(shellFiss, 5 ,10, mailleur, self.numeroCas)
|
||||||
|
|
||||||
centre = None
|
centre = None
|
||||||
return [shellFiss, centre, lgInfluence, coordsNoeudsFissure, fondFiss]
|
return [shellFiss, centre, lgInfluence, coordsNoeudsFissure, fondFiss]
|
||||||
|
@ -52,7 +52,7 @@ class faceGauche(fissureGenerique):
|
|||||||
logging.info("genereMaillageSain %s", self.nomCas)
|
logging.info("genereMaillageSain %s", self.nomCas)
|
||||||
|
|
||||||
([objetSain], _) = smesh.CreateMeshesFromMED(os.path.join(gmu.pathBloc, "materielCasTests", "faceGaucheSain.med"))
|
([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
|
return [objetSain, True] # True : maillage hexa
|
||||||
|
|
||||||
@ -83,7 +83,7 @@ class faceGauche(fissureGenerique):
|
|||||||
geompy.addToStudyInFather( shellFiss, fondFiss, 'fondFiss' )
|
geompy.addToStudyInFather( shellFiss, fondFiss, 'fondFiss' )
|
||||||
|
|
||||||
mailleur = self.mailleur2d3d()
|
mailleur = self.mailleur2d3d()
|
||||||
coordsNoeudsFissure = genereMeshCalculZoneDefaut(shellFiss, 5 ,50, mailleur)
|
coordsNoeudsFissure = genereMeshCalculZoneDefaut(shellFiss, 5 ,50, mailleur, self.numeroCas)
|
||||||
|
|
||||||
centre = None
|
centre = None
|
||||||
return [shellFiss, centre, lgInfluence, coordsNoeudsFissure, fondFiss]
|
return [shellFiss, centre, lgInfluence, coordsNoeudsFissure, fondFiss]
|
||||||
|
@ -54,7 +54,7 @@ class faceGauche_2(fissureGenerique):
|
|||||||
logging.info("genereMaillageSain %s", self.nomCas)
|
logging.info("genereMaillageSain %s", self.nomCas)
|
||||||
|
|
||||||
([objetSain], _) = smesh.CreateMeshesFromMED(os.path.join(gmu.pathBloc, "materielCasTests", "boiteSaine.med"))
|
([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
|
return [objetSain, True] # True : maillage hexa
|
||||||
|
|
||||||
@ -85,7 +85,7 @@ class faceGauche_2(fissureGenerique):
|
|||||||
geompy.addToStudyInFather( shellFiss, fondFiss, 'fondFiss' )
|
geompy.addToStudyInFather( shellFiss, fondFiss, 'fondFiss' )
|
||||||
|
|
||||||
mailleur = self.mailleur2d3d()
|
mailleur = self.mailleur2d3d()
|
||||||
coordsNoeudsFissure = genereMeshCalculZoneDefaut(shellFiss, 5 ,25, mailleur)
|
coordsNoeudsFissure = genereMeshCalculZoneDefaut(shellFiss, 5 ,25, mailleur, self.numeroCas)
|
||||||
|
|
||||||
centre = None
|
centre = None
|
||||||
return [shellFiss, centre, lgInfluence, coordsNoeudsFissure, fondFiss]
|
return [shellFiss, centre, lgInfluence, coordsNoeudsFissure, fondFiss]
|
||||||
|
@ -39,6 +39,7 @@ from blocFissure.gmu.triedreBase import triedreBase
|
|||||||
from blocFissure.gmu.genereMeshCalculZoneDefaut import genereMeshCalculZoneDefaut
|
from blocFissure.gmu.genereMeshCalculZoneDefaut import genereMeshCalculZoneDefaut
|
||||||
from blocFissure.gmu.creeZoneDefautDansObjetSain import creeZoneDefautDansObjetSain
|
from blocFissure.gmu.creeZoneDefautDansObjetSain import creeZoneDefautDansObjetSain
|
||||||
from blocFissure.gmu.insereFissureLongue import insereFissureLongue
|
from blocFissure.gmu.insereFissureLongue import insereFissureLongue
|
||||||
|
from blocFissure.gmu.putName import putName
|
||||||
|
|
||||||
O, OX, OY, OZ = triedreBase()
|
O, OX, OY, OZ = triedreBase()
|
||||||
|
|
||||||
@ -233,38 +234,38 @@ class fissure_Coude(fissureGenerique):
|
|||||||
|
|
||||||
algo3d = maillageSain.Hexahedron()
|
algo3d = maillageSain.Hexahedron()
|
||||||
algo2d = maillageSain.Quadrangle()
|
algo2d = maillageSain.Quadrangle()
|
||||||
smesh.SetName(algo3d, "algo3d_maillageSain")
|
putName(algo3d, "algo3d_maillageSain", i_pref=self.numeroCas)
|
||||||
smesh.SetName(algo2d, "algo2d_maillageSain")
|
putName(algo2d, "algo2d_maillageSain", i_pref=self.numeroCas)
|
||||||
|
|
||||||
algo1d_long_p1 = maillageSain.Segment(geom=long_p1)
|
algo1d_long_p1 = maillageSain.Segment(geom=long_p1)
|
||||||
hypo1d_long_p1 = algo1d_long_p1.NumberOfSegments(n_long_p1)
|
hypo1d_long_p1 = algo1d_long_p1.NumberOfSegments(n_long_p1)
|
||||||
smesh.SetName(algo1d_long_p1, "algo1d_long_p1")
|
putName(algo1d_long_p1, "algo1d_long_p1", i_pref=self.numeroCas)
|
||||||
smesh.SetName(hypo1d_long_p1, "hypo1d_long_p1")
|
putName(hypo1d_long_p1, "hypo1d_long_p1", i_pref=self.numeroCas)
|
||||||
|
|
||||||
algo1d_ep = maillageSain.Segment(geom=ep)
|
algo1d_ep = maillageSain.Segment(geom=ep)
|
||||||
hypo1d_ep = algo1d_ep.NumberOfSegments(n_ep)
|
hypo1d_ep = algo1d_ep.NumberOfSegments(n_ep)
|
||||||
smesh.SetName(algo1d_ep, "algo1d_ep")
|
putName(algo1d_ep, "algo1d_ep", i_pref=self.numeroCas)
|
||||||
smesh.SetName(hypo1d_ep, "hypo1d_ep")
|
putName(hypo1d_ep, "hypo1d_ep", i_pref=self.numeroCas)
|
||||||
|
|
||||||
algo1d_long_coude = maillageSain.Segment(geom=long_coude)
|
algo1d_long_coude = maillageSain.Segment(geom=long_coude)
|
||||||
hypo1d_long_coude = algo1d_long_coude.NumberOfSegments(n_long_coude)
|
hypo1d_long_coude = algo1d_long_coude.NumberOfSegments(n_long_coude)
|
||||||
smesh.SetName(algo1d_long_coude, "algo1d_long_coude")
|
putName(algo1d_long_coude, "algo1d_long_coude", i_pref=self.numeroCas)
|
||||||
smesh.SetName(hypo1d_long_coude, "hypo1d_long_coude")
|
putName(hypo1d_long_coude, "hypo1d_long_coude", i_pref=self.numeroCas)
|
||||||
|
|
||||||
algo1d_circ_g = maillageSain.Segment(geom=circ_g)
|
algo1d_circ_g = maillageSain.Segment(geom=circ_g)
|
||||||
hypo1d_circ_g = algo1d_circ_g.NumberOfSegments(n_circ_g)
|
hypo1d_circ_g = algo1d_circ_g.NumberOfSegments(n_circ_g)
|
||||||
smesh.SetName(algo1d_circ_g, "algo1d_circ_g")
|
putName(algo1d_circ_g, "algo1d_circ_g", i_pref=self.numeroCas)
|
||||||
smesh.SetName(hypo1d_circ_g, "hypo1d_circ_g")
|
putName(hypo1d_circ_g, "hypo1d_circ_g", i_pref=self.numeroCas)
|
||||||
|
|
||||||
algo1d_circ_d = maillageSain.Segment(geom=circ_d)
|
algo1d_circ_d = maillageSain.Segment(geom=circ_d)
|
||||||
hypo1d_circ_d = algo1d_circ_d.NumberOfSegments(n_circ_d)
|
hypo1d_circ_d = algo1d_circ_d.NumberOfSegments(n_circ_d)
|
||||||
smesh.SetName(algo1d_circ_d, "algo1d_circ_d")
|
putName(algo1d_circ_d, "algo1d_circ_d", i_pref=self.numeroCas)
|
||||||
smesh.SetName(hypo1d_circ_d, "hypo1d_circ_d")
|
putName(hypo1d_circ_d, "hypo1d_circ_d", i_pref=self.numeroCas)
|
||||||
|
|
||||||
algo1d_long_p2 = maillageSain.Segment(geom=long_p2)
|
algo1d_long_p2 = maillageSain.Segment(geom=long_p2)
|
||||||
hypo1d_long_p2 = algo1d_long_p2.NumberOfSegments(n_long_p2)
|
hypo1d_long_p2 = algo1d_long_p2.NumberOfSegments(n_long_p2)
|
||||||
smesh.SetName(algo1d_long_p2, "algo1d_long_p2")
|
putName(algo1d_long_p2, "algo1d_long_p2", i_pref=self.numeroCas)
|
||||||
smesh.SetName(hypo1d_long_p2, "hypo1d_long_p2")
|
putName(hypo1d_long_p2, "hypo1d_long_p2", i_pref=self.numeroCas)
|
||||||
|
|
||||||
_ = maillageSain.GroupOnGeom(P1,'P1',SMESH.NODE)
|
_ = maillageSain.GroupOnGeom(P1,'P1',SMESH.NODE)
|
||||||
_ = maillageSain.GroupOnGeom(P2,'P2',SMESH.NODE)
|
_ = maillageSain.GroupOnGeom(P2,'P2',SMESH.NODE)
|
||||||
@ -478,7 +479,7 @@ class fissure_Coude(fissureGenerique):
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
mailleur = self.mailleur2d3d()
|
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]
|
return [facefiss, centre, lgInfluence, coordsNoeudsFissure, wiretube, facetubel, facetuber, planfiss, pipefiss]
|
||||||
|
|
||||||
|
@ -84,7 +84,7 @@ class tube(fissureGenerique):
|
|||||||
geompy.addToStudyInFather( shellFiss, fondFiss, 'fondFiss' )
|
geompy.addToStudyInFather( shellFiss, fondFiss, 'fondFiss' )
|
||||||
|
|
||||||
mailleur = self.mailleur2d3d()
|
mailleur = self.mailleur2d3d()
|
||||||
coordsNoeudsFissure = genereMeshCalculZoneDefaut(shellFiss, 0.025, 0.1, mailleur)
|
coordsNoeudsFissure = genereMeshCalculZoneDefaut(shellFiss, 0.025, 0.1, mailleur, self.numeroCas)
|
||||||
|
|
||||||
centre = None
|
centre = None
|
||||||
|
|
||||||
|
@ -85,7 +85,7 @@ class vis_1(fissureGenerique):
|
|||||||
geompy.addToStudyInFather( shellFiss, fondFiss, 'fondFiss' )
|
geompy.addToStudyInFather( shellFiss, fondFiss, 'fondFiss' )
|
||||||
|
|
||||||
mailleur = self.mailleur2d3d()
|
mailleur = self.mailleur2d3d()
|
||||||
coordsNoeudsFissure = genereMeshCalculZoneDefaut(shellFiss, 0.1 ,0.2, mailleur)
|
coordsNoeudsFissure = genereMeshCalculZoneDefaut(shellFiss, 0.1 ,0.2, mailleur, self.numeroCas)
|
||||||
|
|
||||||
centre = None
|
centre = None
|
||||||
|
|
||||||
|
@ -39,6 +39,7 @@ from .triedreBase import triedreBase
|
|||||||
from .genereMeshCalculZoneDefaut import genereMeshCalculZoneDefaut
|
from .genereMeshCalculZoneDefaut import genereMeshCalculZoneDefaut
|
||||||
from .creeZoneDefautDansObjetSain import creeZoneDefautDansObjetSain
|
from .creeZoneDefautDansObjetSain import creeZoneDefautDansObjetSain
|
||||||
from .construitFissureGenerale import construitFissureGenerale
|
from .construitFissureGenerale import construitFissureGenerale
|
||||||
|
from .putName import putName
|
||||||
|
|
||||||
O, OX, OY, OZ = triedreBase()
|
O, OX, OY, OZ = triedreBase()
|
||||||
|
|
||||||
@ -47,7 +48,7 @@ class casStandard(fissureGenerique):
|
|||||||
|
|
||||||
- un maillage sain (hexaèdres),
|
- un maillage sain (hexaèdres),
|
||||||
- une face géométrique de fissure, qui doit légèrement dépasser hors du volume maillé
|
- 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
|
- les paramètres de maillage de la fissure
|
||||||
"""
|
"""
|
||||||
referencesMaillageFissure = None
|
referencesMaillageFissure = None
|
||||||
@ -90,7 +91,7 @@ class casStandard(fissureGenerique):
|
|||||||
logging.info("genereMaillageSain %s", self.nomCas)
|
logging.info("genereMaillageSain %s", self.nomCas)
|
||||||
|
|
||||||
([objetSain], _) = smesh.CreateMeshesFromMED(self.dicoParams['maillageSain'])
|
([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
|
return [objetSain, True] # True : maillage hexa
|
||||||
|
|
||||||
@ -149,7 +150,7 @@ class casStandard(fissureGenerique):
|
|||||||
|
|
||||||
|
|
||||||
coordsNoeudsFissure = genereMeshCalculZoneDefaut(shellFiss, self.dicoParams['meshBrep'][0] ,self.dicoParams['meshBrep'][1], \
|
coordsNoeudsFissure = genereMeshCalculZoneDefaut(shellFiss, self.dicoParams['meshBrep'][0] ,self.dicoParams['meshBrep'][1], \
|
||||||
mailleur)
|
mailleur, self.numeroCas)
|
||||||
|
|
||||||
centre = None
|
centre = None
|
||||||
return [shellFiss, centre, lgInfluence, coordsNoeudsFissure, fondFiss]
|
return [shellFiss, centre, lgInfluence, coordsNoeudsFissure, fondFiss]
|
||||||
|
@ -214,7 +214,7 @@ def construitFissureGenerale(shapesFissure, shapeFissureParams, \
|
|||||||
zoneDefaut, zoneDefaut_skin, zoneDefaut_internalFaces, zoneDefaut_internalEdges, \
|
zoneDefaut, zoneDefaut_skin, zoneDefaut_internalFaces, zoneDefaut_internalEdges, \
|
||||||
facesPortFissure, \
|
facesPortFissure, \
|
||||||
maillageFissureParams, \
|
maillageFissureParams, \
|
||||||
mailleur )
|
mailleur, nro_cas )
|
||||||
|
|
||||||
if salome.sg.hasDesktop():
|
if salome.sg.hasDesktop():
|
||||||
salome.sg.updateObjBrowser()
|
salome.sg.updateObjBrowser()
|
||||||
|
@ -43,7 +43,7 @@ def construitFissureGenerale_c(maillageSain, meshBoiteDefaut, \
|
|||||||
zoneDefaut, zoneDefaut_skin, zoneDefaut_internalFaces, zoneDefaut_internalEdges, \
|
zoneDefaut, zoneDefaut_skin, zoneDefaut_internalFaces, zoneDefaut_internalEdges, \
|
||||||
facesPortFissure, \
|
facesPortFissure, \
|
||||||
maillageFissureParams, \
|
maillageFissureParams, \
|
||||||
mailleur="MeshGems"):
|
mailleur="MeshGems", nro_cas=-1):
|
||||||
"""construction de la fissure générale - maillage"""
|
"""construction de la fissure générale - maillage"""
|
||||||
logging.info('start')
|
logging.info('start')
|
||||||
logging.info("Usage du mailleur %s", mailleur)
|
logging.info("Usage du mailleur %s", mailleur)
|
||||||
@ -77,9 +77,9 @@ def construitFissureGenerale_c(maillageSain, meshBoiteDefaut, \
|
|||||||
hypo3d.SetVerboseLevel( 0 )
|
hypo3d.SetVerboseLevel( 0 )
|
||||||
hypo3d.SetStandardOutputLog( 0 )
|
hypo3d.SetStandardOutputLog( 0 )
|
||||||
hypo3d.SetRemoveLogOnSuccess( 1 )
|
hypo3d.SetRemoveLogOnSuccess( 1 )
|
||||||
putName(algo3d.GetSubMesh(), "boiteDefaut")
|
putName(algo3d.GetSubMesh(), "boiteDefaut", i_pref=nro_cas)
|
||||||
putName(algo3d, "algo3d_boiteDefaut")
|
putName(algo3d, "algo3d_boiteDefaut", i_pref=nro_cas)
|
||||||
putName(meshBoiteDefaut, "boiteDefaut")
|
putName(meshBoiteDefaut, "boiteDefaut", i_pref=nro_cas)
|
||||||
|
|
||||||
is_done = meshBoiteDefaut.Compute()
|
is_done = meshBoiteDefaut.Compute()
|
||||||
text = "meshBoiteDefaut.Compute"
|
text = "meshBoiteDefaut.Compute"
|
||||||
@ -94,7 +94,7 @@ def construitFissureGenerale_c(maillageSain, meshBoiteDefaut, \
|
|||||||
'FACE1' )
|
'FACE1' )
|
||||||
maillageSain = enleveDefaut(maillageSain, zoneDefaut, zoneDefaut_skin,
|
maillageSain = enleveDefaut(maillageSain, zoneDefaut, zoneDefaut_skin,
|
||||||
zoneDefaut_internalFaces, zoneDefaut_internalEdges)
|
zoneDefaut_internalFaces, zoneDefaut_internalEdges)
|
||||||
putName(maillageSain, nomFicSain+"_coupe")
|
putName(maillageSain, nomFicSain+"_coupe", i_pref=nro_cas)
|
||||||
_, normfiss = shapeSurFissure(facesPortFissure)
|
_, normfiss = shapeSurFissure(facesPortFissure)
|
||||||
maillageComplet = RegroupeSainEtDefaut(maillageSain, meshBoiteDefaut, \
|
maillageComplet = RegroupeSainEtDefaut(maillageSain, meshBoiteDefaut, \
|
||||||
None, None, 'COMPLET', normfiss)
|
None, None, 'COMPLET', normfiss)
|
||||||
|
@ -40,6 +40,7 @@ from .genereMeshCalculZoneDefaut import genereMeshCalculZoneDefaut
|
|||||||
from .creeZoneDefautDansObjetSain import creeZoneDefautDansObjetSain
|
from .creeZoneDefautDansObjetSain import creeZoneDefautDansObjetSain
|
||||||
from .construitFissureGenerale import construitFissureGenerale
|
from .construitFissureGenerale import construitFissureGenerale
|
||||||
from .sortEdges import sortEdges
|
from .sortEdges import sortEdges
|
||||||
|
from .putName import putName
|
||||||
|
|
||||||
O, OX, OY, OZ = triedreBase()
|
O, OX, OY, OZ = triedreBase()
|
||||||
|
|
||||||
@ -262,38 +263,38 @@ class fissureCoude(fissureGenerique):
|
|||||||
|
|
||||||
algo3d = maillageSain.Hexahedron()
|
algo3d = maillageSain.Hexahedron()
|
||||||
algo2d = maillageSain.Quadrangle()
|
algo2d = maillageSain.Quadrangle()
|
||||||
smesh.SetName(algo3d, "algo3d_maillageSain")
|
putName(algo3d, "algo3d_maillageSain", i_pref=self.numeroCas)
|
||||||
smesh.SetName(algo2d, "algo2d_maillageSain")
|
putName(algo2d, "algo2d_maillageSain", i_pref=self.numeroCas)
|
||||||
|
|
||||||
algo1d_long_p1 = maillageSain.Segment(geom=long_p1)
|
algo1d_long_p1 = maillageSain.Segment(geom=long_p1)
|
||||||
hypo1d_long_p1 = algo1d_long_p1.NumberOfSegments(n_long_p1)
|
hypo1d_long_p1 = algo1d_long_p1.NumberOfSegments(n_long_p1)
|
||||||
smesh.SetName(algo1d_long_p1, "algo1d_long_p1")
|
putName(algo1d_long_p1, "algo1d_long_p1", i_pref=self.numeroCas)
|
||||||
smesh.SetName(hypo1d_long_p1, "hypo1d_long_p1")
|
putName(hypo1d_long_p1, "hypo1d_long_p1", i_pref=self.numeroCas)
|
||||||
|
|
||||||
algo1d_ep = maillageSain.Segment(geom=ep)
|
algo1d_ep = maillageSain.Segment(geom=ep)
|
||||||
hypo1d_ep = algo1d_ep.NumberOfSegments(n_ep)
|
hypo1d_ep = algo1d_ep.NumberOfSegments(n_ep)
|
||||||
smesh.SetName(algo1d_ep, "algo1d_ep")
|
putName(algo1d_ep, "algo1d_ep", i_pref=self.numeroCas)
|
||||||
smesh.SetName(hypo1d_ep, "hypo1d_ep")
|
putName(hypo1d_ep, "hypo1d_ep", i_pref=self.numeroCas)
|
||||||
|
|
||||||
algo1d_long_coude = maillageSain.Segment(geom=long_coude)
|
algo1d_long_coude = maillageSain.Segment(geom=long_coude)
|
||||||
hypo1d_long_coude = algo1d_long_coude.NumberOfSegments(n_long_coude)
|
hypo1d_long_coude = algo1d_long_coude.NumberOfSegments(n_long_coude)
|
||||||
smesh.SetName(algo1d_long_coude, "algo1d_long_coude")
|
putName(algo1d_long_coude, "algo1d_long_coude", i_pref=self.numeroCas)
|
||||||
smesh.SetName(hypo1d_long_coude, "hypo1d_long_coude")
|
putName(hypo1d_long_coude, "hypo1d_long_coude", i_pref=self.numeroCas)
|
||||||
|
|
||||||
algo1d_circ_g = maillageSain.Segment(geom=circ_g)
|
algo1d_circ_g = maillageSain.Segment(geom=circ_g)
|
||||||
hypo1d_circ_g = algo1d_circ_g.NumberOfSegments(n_circ_g)
|
hypo1d_circ_g = algo1d_circ_g.NumberOfSegments(n_circ_g)
|
||||||
smesh.SetName(algo1d_circ_g, "algo1d_circ_g")
|
putName(algo1d_circ_g, "algo1d_circ_g", i_pref=self.numeroCas)
|
||||||
smesh.SetName(hypo1d_circ_g, "hypo1d_circ_g")
|
putName(hypo1d_circ_g, "hypo1d_circ_g", i_pref=self.numeroCas)
|
||||||
|
|
||||||
algo1d_circ_d = maillageSain.Segment(geom=circ_d)
|
algo1d_circ_d = maillageSain.Segment(geom=circ_d)
|
||||||
hypo1d_circ_d = algo1d_circ_d.NumberOfSegments(n_circ_d)
|
hypo1d_circ_d = algo1d_circ_d.NumberOfSegments(n_circ_d)
|
||||||
smesh.SetName(algo1d_circ_d, "algo1d_circ_d")
|
putName(algo1d_circ_d, "algo1d_circ_d", i_pref=self.numeroCas)
|
||||||
smesh.SetName(hypo1d_circ_d, "hypo1d_circ_d")
|
putName(hypo1d_circ_d, "hypo1d_circ_d", i_pref=self.numeroCas)
|
||||||
|
|
||||||
algo1d_long_p2 = maillageSain.Segment(geom=long_p2)
|
algo1d_long_p2 = maillageSain.Segment(geom=long_p2)
|
||||||
hypo1d_long_p2 = algo1d_long_p2.NumberOfSegments(n_long_p2)
|
hypo1d_long_p2 = algo1d_long_p2.NumberOfSegments(n_long_p2)
|
||||||
smesh.SetName(algo1d_long_p2, "algo1d_long_p2")
|
putName(algo1d_long_p2, "algo1d_long_p2", i_pref=self.numeroCas)
|
||||||
smesh.SetName(hypo1d_long_p2, "hypo1d_long_p2")
|
putName(hypo1d_long_p2, "hypo1d_long_p2", i_pref=self.numeroCas)
|
||||||
|
|
||||||
is_done = maillageSain.Compute()
|
is_done = maillageSain.Compute()
|
||||||
text = "maillageSain.Compute"
|
text = "maillageSain.Compute"
|
||||||
@ -648,7 +649,7 @@ class fissureCoude(fissureGenerique):
|
|||||||
geomPublish(initLog.debug, centre, 'centrefissPlace' )
|
geomPublish(initLog.debug, centre, 'centrefissPlace' )
|
||||||
|
|
||||||
coordsNoeudsFissure = genereMeshCalculZoneDefaut(facefiss, profondeur/2. ,profondeur, \
|
coordsNoeudsFissure = genereMeshCalculZoneDefaut(facefiss, profondeur/2. ,profondeur, \
|
||||||
mailleur)
|
mailleur, self.numeroCas)
|
||||||
|
|
||||||
return [facefiss, centre, lgInfluence, coordsNoeudsFissure, wiretube, edgetube]
|
return [facefiss, centre, lgInfluence, coordsNoeudsFissure, wiretube, edgetube]
|
||||||
|
|
||||||
|
@ -33,8 +33,11 @@ from .geomsmesh import smesh
|
|||||||
|
|
||||||
from .listOfExtraFunctions import createNewMeshesFromCorner
|
from .listOfExtraFunctions import createNewMeshesFromCorner
|
||||||
from .listOfExtraFunctions import createLinesFromMesh
|
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"""
|
"""Groupe de quadrangles de face transformé en face géométrique par filling"""
|
||||||
|
|
||||||
logging.info("start")
|
logging.info("start")
|
||||||
@ -96,6 +99,6 @@ def fusionMaillageDefaut(maillageSain, maillageDefautCible, maillageInterneCible
|
|||||||
|
|
||||||
newZoneDefaut_skin = maillageSain.GetMesh().CutListOfGroups([zoneDefaut_skin], facesEnTrop, 'newZoneDefaut_skin')
|
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
|
return newZoneDefaut_skin, newMaillageInterne
|
||||||
|
@ -32,7 +32,7 @@ from .rotTrans import rotTrans
|
|||||||
from .genereMeshCalculZoneDefaut import genereMeshCalculZoneDefaut
|
from .genereMeshCalculZoneDefaut import genereMeshCalculZoneDefaut
|
||||||
|
|
||||||
def genereElemsFissureElliptique(shapeFissureParams, \
|
def genereElemsFissureElliptique(shapeFissureParams, \
|
||||||
mailleur="MeshGems"):
|
mailleur="MeshGems", nro_cas=-1):
|
||||||
"""Création élements géométriques fissure elliptique"""
|
"""Création élements géométriques fissure elliptique"""
|
||||||
|
|
||||||
logging.info('start')
|
logging.info('start')
|
||||||
@ -70,6 +70,6 @@ def genereElemsFissureElliptique(shapeFissureParams, \
|
|||||||
shapeDefaut = facefis1
|
shapeDefaut = facefis1
|
||||||
xyz_defaut = geompy.PointCoordinates(centreDefaut)
|
xyz_defaut = geompy.PointCoordinates(centreDefaut)
|
||||||
coordsNoeudsFissure = genereMeshCalculZoneDefaut(facefis1, demiPetitAxe/10.0, demiPetitAxe/5.0, \
|
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
|
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 .geomsmesh import smesh
|
||||||
|
|
||||||
|
from .putName import putName
|
||||||
|
|
||||||
def genereMeshCalculZoneDefaut(facefiss, minSize, maxSize, \
|
def genereMeshCalculZoneDefaut(facefiss, minSize, maxSize, \
|
||||||
mailleur="MeshGems"):
|
mailleur="MeshGems", nro_cas=-1):
|
||||||
"""Maillage de l'objet géométrique 'facefiss'
|
"""Maillage de l'objet géométrique 'facefiss'
|
||||||
|
|
||||||
. Avec l'algorithme MG_CADSurf :
|
. Avec l'algorithme MG_CADSurf :
|
||||||
@ -50,9 +52,12 @@ def genereMeshCalculZoneDefaut(facefiss, minSize, maxSize, \
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
logging.info('start')
|
logging.info('start')
|
||||||
|
logging.info("Maillage avec %s pour le cas n°%d", mailleur, nro_cas)
|
||||||
|
|
||||||
meshFissure = smesh.Mesh(facefiss)
|
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)
|
logging.info(text)
|
||||||
if ( mailleur == "MeshGems"):
|
if ( mailleur == "MeshGems"):
|
||||||
algo2d = meshFissure.Triangle(algo=smeshBuilder.MG_CADSurf)
|
algo2d = meshFissure.Triangle(algo=smeshBuilder.MG_CADSurf)
|
||||||
@ -71,8 +76,8 @@ def genereMeshCalculZoneDefaut(facefiss, minSize, maxSize, \
|
|||||||
hypo2d.SetFineness( 2 )
|
hypo2d.SetFineness( 2 )
|
||||||
hypo2d.SetMinSize( minSize )
|
hypo2d.SetMinSize( minSize )
|
||||||
hypo2d.SetQuadAllowed( 0 )
|
hypo2d.SetQuadAllowed( 0 )
|
||||||
smesh.SetName(algo2d, "algo2d_zoneFiss")
|
putName(algo2d, "algo2d_zoneFiss", i_pref=nro_cas)
|
||||||
smesh.SetName(hypo2d, "hypo1d_zoneFiss")
|
putName(hypo2d, "hypo1d_zoneFiss", i_pref=nro_cas)
|
||||||
|
|
||||||
is_done = meshFissure.Compute()
|
is_done = meshFissure.Compute()
|
||||||
text = "meshFissure.Compute"
|
text = "meshFissure.Compute"
|
||||||
|
@ -54,13 +54,15 @@ from .whichSide import whichSide
|
|||||||
from .whichSideVertex import whichSideVertex
|
from .whichSideVertex import whichSideVertex
|
||||||
from .projettePointSurCourbe import projettePointSurCourbe
|
from .projettePointSurCourbe import projettePointSurCourbe
|
||||||
from .prolongeWire import prolongeWire
|
from .prolongeWire import prolongeWire
|
||||||
|
from .putName import putName
|
||||||
|
|
||||||
def insereFissureGenerale(maillagesSains,
|
def insereFissureGenerale(maillagesSains,
|
||||||
shapesFissure, shapeFissureParams,
|
shapesFissure, shapeFissureParams,
|
||||||
maillageFissureParams, elementsDefaut, \
|
maillageFissureParams, elementsDefaut, \
|
||||||
step=-1, mailleur="MeshGems"):
|
step=-1, mailleur="MeshGems", nro_cas=-1):
|
||||||
""" TODO: a completer"""
|
""" TODO: a completer"""
|
||||||
logging.info('start')
|
logging.info('start')
|
||||||
|
logging.info("Maillage avec %s pour le cas n°%d", mailleur, nro_cas)
|
||||||
|
|
||||||
shapeDefaut = shapesFissure[0] # faces de fissure, débordant
|
shapeDefaut = shapesFissure[0] # faces de fissure, débordant
|
||||||
fondFiss = shapesFissure[4] # groupe d'edges de fond de fissure
|
fondFiss = shapesFissure[4] # groupe d'edges de fond de fissure
|
||||||
@ -1179,7 +1181,7 @@ def insereFissureGenerale(maillagesSains,
|
|||||||
criteres.append(unCritere)
|
criteres.append(unCritere)
|
||||||
filtre = smesh.GetFilterFromCriteria(criteres)
|
filtre = smesh.GetFilterFromCriteria(criteres)
|
||||||
bordsLibres = internalBoundary.MakeGroupByFilter( 'bords', filtre )
|
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
|
# --- 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"
|
# on désigne les faces de peau en quadrangles par le groupe "skinFaces"
|
||||||
@ -1195,9 +1197,9 @@ def insereFissureGenerale(maillagesSains,
|
|||||||
meshAretesVives = smesh.Mesh(aretesVivesC)
|
meshAretesVives = smesh.Mesh(aretesVivesC)
|
||||||
algo1d = meshAretesVives.Segment()
|
algo1d = meshAretesVives.Segment()
|
||||||
hypo1d = algo1d.LocalLength(dmoyen,list(),1e-07)
|
hypo1d = algo1d.LocalLength(dmoyen,list(),1e-07)
|
||||||
putName(algo1d.GetSubMesh(), "aretesVives")
|
putName(algo1d.GetSubMesh(), "aretesVives", i_pref=nro_cas)
|
||||||
putName(algo1d, "algo1d_aretesVives")
|
putName(algo1d, "algo1d_aretesVives", i_pref=nro_cas)
|
||||||
putName(hypo1d, "hypo1d_aretesVives")
|
putName(hypo1d, "hypo1d_aretesVives", i_pref=nro_cas)
|
||||||
|
|
||||||
is_done = meshAretesVives.Compute()
|
is_done = meshAretesVives.Compute()
|
||||||
text = "meshAretesVives.Compute"
|
text = "meshAretesVives.Compute"
|
||||||
@ -1234,15 +1236,15 @@ def insereFissureGenerale(maillagesSains,
|
|||||||
hypo2d.SetFineness( 2 )
|
hypo2d.SetFineness( 2 )
|
||||||
hypo2d.SetMinSize( rayonPipe/float(nbsegRad) )
|
hypo2d.SetMinSize( rayonPipe/float(nbsegRad) )
|
||||||
hypo2d.SetQuadAllowed( 0 )
|
hypo2d.SetQuadAllowed( 0 )
|
||||||
putName(algo2d.GetSubMesh(), "faceFiss")
|
putName(algo2d.GetSubMesh(), "faceFiss", i_pref=nro_cas)
|
||||||
putName(algo2d, "algo2d_faceFiss")
|
putName(algo2d, "algo2d_faceFiss", i_pref=nro_cas)
|
||||||
putName(hypo2d, "hypo2d_faceFiss")
|
putName(hypo2d, "hypo2d_faceFiss", i_pref=nro_cas)
|
||||||
|
|
||||||
algo1d = meshFaceFiss.UseExisting1DElements(geom=edgesPipeFissureExterneC)
|
algo1d = meshFaceFiss.UseExisting1DElements(geom=edgesPipeFissureExterneC)
|
||||||
hypo1d = algo1d.SourceEdges([ edgeFaceFissGroup ],0,0)
|
hypo1d = algo1d.SourceEdges([ edgeFaceFissGroup ],0,0)
|
||||||
putName(algo1d.GetSubMesh(), "edgeFissPeau")
|
putName(algo1d.GetSubMesh(), "edgeFissPeau", i_pref=nro_cas)
|
||||||
putName(algo1d, "algo1d_edgeFissPeau")
|
putName(algo1d, "algo1d_edgeFissPeau", i_pref=nro_cas)
|
||||||
putName(hypo1d, "hypo1d_edgeFissPeau")
|
putName(hypo1d, "hypo1d_edgeFissPeau", i_pref=nro_cas)
|
||||||
|
|
||||||
_ = meshFaceFiss.GroupOnGeom(faceFissureExterne, "fisOutPi", SMESH.FACE)
|
_ = meshFaceFiss.GroupOnGeom(faceFissureExterne, "fisOutPi", SMESH.FACE)
|
||||||
grpEdgesPeauFissureExterne = meshFaceFiss.GroupOnGeom(edgesPeauFissureExterneC,'edgesPeauFissureExterne',SMESH.EDGE)
|
grpEdgesPeauFissureExterne = meshFaceFiss.GroupOnGeom(edgesPeauFissureExterneC,'edgesPeauFissureExterne',SMESH.EDGE)
|
||||||
@ -1270,7 +1272,8 @@ def insereFissureGenerale(maillagesSains,
|
|||||||
meshFacePeau = None
|
meshFacePeau = None
|
||||||
if partitionsPeauFissFond[ifil] is None: # face de peau maillage sain intacte
|
if partitionsPeauFissFond[ifil] is None: # face de peau maillage sain intacte
|
||||||
|
|
||||||
# --- edges de bord de la face de filling
|
# --- edges de bord de la face de filling1328
|
||||||
|
|
||||||
filling = facesDefaut[ifil]
|
filling = facesDefaut[ifil]
|
||||||
edgesFilling = geompy.ExtractShapes(filling, geompy.ShapeType["EDGE"], False)
|
edgesFilling = geompy.ExtractShapes(filling, geompy.ShapeType["EDGE"], False)
|
||||||
groupEdgesBordPeau = geompy.CreateGroup(filling, geompy.ShapeType["EDGE"])
|
groupEdgesBordPeau = geompy.CreateGroup(filling, geompy.ShapeType["EDGE"])
|
||||||
@ -1281,9 +1284,9 @@ def insereFissureGenerale(maillagesSains,
|
|||||||
|
|
||||||
algo1d = meshFacePeau.UseExisting1DElements(geom=groupEdgesBordPeau)
|
algo1d = meshFacePeau.UseExisting1DElements(geom=groupEdgesBordPeau)
|
||||||
hypo1d = algo1d.SourceEdges([ bordsLibres ],0,0)
|
hypo1d = algo1d.SourceEdges([ bordsLibres ],0,0)
|
||||||
putName(algo1d.GetSubMesh(), "bordsLibres", ifil)
|
putName(algo1d.GetSubMesh(), "bordsLibres", ifil, nro_cas)
|
||||||
putName(algo1d, "algo1d_bordsLibres", ifil)
|
putName(algo1d, "algo1d_bordsLibres", ifil, nro_cas)
|
||||||
putName(hypo1d, "hypo1d_bordsLibres", ifil)
|
putName(hypo1d, "hypo1d_bordsLibres", ifil, nro_cas)
|
||||||
|
|
||||||
else:
|
else:
|
||||||
|
|
||||||
@ -1298,22 +1301,22 @@ def insereFissureGenerale(maillagesSains,
|
|||||||
|
|
||||||
algo1d = meshFacePeau.UseExisting1DElements(geom=groupEdgesBordPeau)
|
algo1d = meshFacePeau.UseExisting1DElements(geom=groupEdgesBordPeau)
|
||||||
hypo1d = algo1d.SourceEdges([ bordsLibres ],0,0)
|
hypo1d = algo1d.SourceEdges([ bordsLibres ],0,0)
|
||||||
putName(algo1d.GetSubMesh(), "bordsLibres", ifil)
|
putName(algo1d.GetSubMesh(), "bordsLibres", ifil, nro_cas)
|
||||||
putName(algo1d, "algo1d_bordsLibres", ifil)
|
putName(algo1d, "algo1d_bordsLibres", ifil, nro_cas)
|
||||||
putName(hypo1d, "hypo1d_bordsLibres", ifil)
|
putName(hypo1d, "hypo1d_bordsLibres", ifil, nro_cas)
|
||||||
|
|
||||||
algo1d = meshFacePeau.UseExisting1DElements(geom=geompy.MakeCompound(edgesFissurePeau))
|
algo1d = meshFacePeau.UseExisting1DElements(geom=geompy.MakeCompound(edgesFissurePeau))
|
||||||
hypo1d = algo1d.SourceEdges([ grpEdgesPeauFissureExterne ],0,0)
|
hypo1d = algo1d.SourceEdges([ grpEdgesPeauFissureExterne ],0,0)
|
||||||
putName(algo1d.GetSubMesh(), "edgePeauFiss", ifil)
|
putName(algo1d.GetSubMesh(), "edgePeauFiss", ifil, nro_cas)
|
||||||
putName(algo1d, "algo1d_edgePeauFiss", ifil)
|
putName(algo1d, "algo1d_edgePeauFiss", ifil, nro_cas)
|
||||||
putName(hypo1d, "hypo1d_edgePeauFiss", ifil)
|
putName(hypo1d, "hypo1d_edgePeauFiss", ifil, nro_cas)
|
||||||
|
|
||||||
if bordsVifs is not None:
|
if bordsVifs is not None:
|
||||||
algo1d = meshFacePeau.UseExisting1DElements(geom=bordsVifs)
|
algo1d = meshFacePeau.UseExisting1DElements(geom=bordsVifs)
|
||||||
hypo1d = algo1d.SourceEdges([ grpAretesVives ],0,0)
|
hypo1d = algo1d.SourceEdges([ grpAretesVives ],0,0)
|
||||||
putName(algo1d.GetSubMesh(), "bordsVifs", ifil)
|
putName(algo1d.GetSubMesh(), "bordsVifs", ifil, nro_cas)
|
||||||
putName(algo1d, "algo1d_bordsVifs", ifil)
|
putName(algo1d, "algo1d_bordsVifs", ifil, nro_cas)
|
||||||
putName(hypo1d, "hypo1d_bordsVifs", ifil)
|
putName(hypo1d, "hypo1d_bordsVifs", ifil, nro_cas)
|
||||||
|
|
||||||
for i, edgeCirc in enumerate(edgesCircPeau):
|
for i, edgeCirc in enumerate(edgesCircPeau):
|
||||||
if edgeCirc is not None:
|
if edgeCirc is not None:
|
||||||
@ -1323,9 +1326,9 @@ def insereFissureGenerale(maillagesSains,
|
|||||||
else:
|
else:
|
||||||
hypo1d = algo1d.SourceEdges([ edgesCircPipeGroup[boutFromIfil[ifil]] ],0,0)
|
hypo1d = algo1d.SourceEdges([ edgesCircPipeGroup[boutFromIfil[ifil]] ],0,0)
|
||||||
name = "cercle%d"%i
|
name = "cercle%d"%i
|
||||||
putName(algo1d.GetSubMesh(), name, ifil)
|
putName(algo1d.GetSubMesh(), name, ifil, nro_cas)
|
||||||
putName(algo1d, "algo1d_" + name, ifil)
|
putName(algo1d, "algo1d_" + name, ifil, nro_cas)
|
||||||
putName(hypo1d, "hypo1d_" + name, ifil)
|
putName(hypo1d, "hypo1d_" + name, ifil, nro_cas)
|
||||||
|
|
||||||
logging.info("Maillage avec %s", mailleur)
|
logging.info("Maillage avec %s", mailleur)
|
||||||
if ( mailleur == "MeshGems"):
|
if ( mailleur == "MeshGems"):
|
||||||
@ -1344,9 +1347,9 @@ def insereFissureGenerale(maillagesSains,
|
|||||||
hypo2d.SetFineness( 2 )
|
hypo2d.SetFineness( 2 )
|
||||||
hypo2d.SetMinSize( rayonPipe/float(nbsegRad) )
|
hypo2d.SetMinSize( rayonPipe/float(nbsegRad) )
|
||||||
hypo2d.SetQuadAllowed( 0 )
|
hypo2d.SetQuadAllowed( 0 )
|
||||||
putName(algo2d.GetSubMesh(), "facePeau", ifil)
|
putName(algo2d.GetSubMesh(), "facePeau", ifil, nro_cas)
|
||||||
putName(algo2d, "algo2d_facePeau", ifil)
|
putName(algo2d, "algo2d_facePeau", ifil, nro_cas)
|
||||||
putName(hypo2d, "hypo2d_facePeau", ifil)
|
putName(hypo2d, "hypo2d_facePeau", ifil, nro_cas)
|
||||||
|
|
||||||
is_done = meshFacePeau.Compute()
|
is_done = meshFacePeau.Compute()
|
||||||
text = "meshFacePeau {} Compute".format(ifil)
|
text = "meshFacePeau {} Compute".format(ifil)
|
||||||
@ -1395,9 +1398,9 @@ def insereFissureGenerale(maillagesSains,
|
|||||||
hypo3d.SetVerboseLevel( 0 )
|
hypo3d.SetVerboseLevel( 0 )
|
||||||
hypo3d.SetStandardOutputLog( 0 )
|
hypo3d.SetStandardOutputLog( 0 )
|
||||||
hypo3d.SetRemoveLogOnSuccess( 1 )
|
hypo3d.SetRemoveLogOnSuccess( 1 )
|
||||||
putName(algo3d.GetSubMesh(), "boiteDefaut")
|
putName(algo3d.GetSubMesh(), "boiteDefaut", i_pref=nro_cas)
|
||||||
putName(algo3d, "algo3d_boiteDefaut")
|
putName(algo3d, "algo3d_boiteDefaut", i_pref=nro_cas)
|
||||||
putName(meshBoiteDefaut, "boiteDefaut")
|
putName(meshBoiteDefaut, "boiteDefaut", i_pref=nro_cas)
|
||||||
|
|
||||||
is_done = meshBoiteDefaut.Compute()
|
is_done = meshBoiteDefaut.Compute()
|
||||||
text = "meshBoiteDefaut.Compute"
|
text = "meshBoiteDefaut.Compute"
|
||||||
@ -1411,7 +1414,7 @@ def insereFissureGenerale(maillagesSains,
|
|||||||
_ = meshBoiteDefaut.GetMesh().UnionListOfGroups( [ group_faceFissOutPipe, group_faceFissInPipe ], 'FACE1' )
|
_ = meshBoiteDefaut.GetMesh().UnionListOfGroups( [ group_faceFissOutPipe, group_faceFissInPipe ], 'FACE1' )
|
||||||
maillageSain = enleveDefaut(maillageSain, zoneDefaut, zoneDefaut_skin,
|
maillageSain = enleveDefaut(maillageSain, zoneDefaut, zoneDefaut_skin,
|
||||||
zoneDefaut_internalFaces, zoneDefaut_internalEdges)
|
zoneDefaut_internalFaces, zoneDefaut_internalEdges)
|
||||||
putName(maillageSain, nomFicSain+"_coupe")
|
putName(maillageSain, nomFicSain+"_coupe", i_pref=nro_cas)
|
||||||
_, normfiss = shapeSurFissure(facesPortFissure)
|
_, normfiss = shapeSurFissure(facesPortFissure)
|
||||||
maillageComplet = RegroupeSainEtDefaut(maillageSain, meshBoiteDefaut,
|
maillageComplet = RegroupeSainEtDefaut(maillageSain, meshBoiteDefaut,
|
||||||
None, None, 'COMPLET', normfiss)
|
None, None, 'COMPLET', normfiss)
|
||||||
|
@ -114,7 +114,8 @@ def insereFissureLongue(geometriesSaines, \
|
|||||||
planfiss, planBord1, planBord2, \
|
planfiss, planBord1, planBord2, \
|
||||||
facePeau, verticesOutCercles, verticesEdgePeauFiss, \
|
facePeau, verticesOutCercles, verticesEdgePeauFiss, \
|
||||||
fillingFaceExterne, rayonPipe, \
|
fillingFaceExterne, rayonPipe, \
|
||||||
internalBoundary)
|
internalBoundary, \
|
||||||
|
nro_cas)
|
||||||
|
|
||||||
# --- maillage pipe fond fissure
|
# --- maillage pipe fond fissure
|
||||||
|
|
||||||
|
@ -37,6 +37,7 @@ from .sortEdges import sortEdges
|
|||||||
from .produitMixte import produitMixte
|
from .produitMixte import produitMixte
|
||||||
from .findWireEndVertices import findWireEndVertices
|
from .findWireEndVertices import findWireEndVertices
|
||||||
from .getSubshapeIds import getSubshapeIds
|
from .getSubshapeIds import getSubshapeIds
|
||||||
|
from .putName import putName
|
||||||
|
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
|
|
||||||
@ -44,9 +45,11 @@ def insereFissureLongue_b(edgesInside, centreFondFiss, tangentFondFiss, \
|
|||||||
planfiss, planBord1, planBord2, \
|
planfiss, planBord1, planBord2, \
|
||||||
facePeau, verticesOutCercles, verticesEdgePeauFiss, \
|
facePeau, verticesOutCercles, verticesEdgePeauFiss, \
|
||||||
fillingFaceExterne, rayonPipe, \
|
fillingFaceExterne, rayonPipe, \
|
||||||
internalBoundary):
|
internalBoundary, \
|
||||||
|
nro_cas=-1):
|
||||||
"""procedure complete fissure longue"""
|
"""procedure complete fissure longue"""
|
||||||
logging.info('start')
|
logging.info('start')
|
||||||
|
logging.info("Maillage pour le cas n°%d", nro_cas)
|
||||||
|
|
||||||
# -----------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------
|
||||||
# --- pipe de fond de fissure
|
# --- pipe de fond de fissure
|
||||||
@ -219,7 +222,7 @@ def insereFissureLongue_b(edgesInside, centreFondFiss, tangentFondFiss, \
|
|||||||
criteres.append(un_critere)
|
criteres.append(un_critere)
|
||||||
filtre = smesh.GetFilterFromCriteria(criteres)
|
filtre = smesh.GetFilterFromCriteria(criteres)
|
||||||
bordsLibres = internalBoundary.MakeGroupByFilter( 'bords', filtre )
|
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
|
# --- 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"
|
# on designe les faces de peau en quadrangles par le groupe "skinFaces"
|
||||||
|
@ -40,8 +40,11 @@ def insereFissureLongue_c (pipeFondFiss, disques, rayons, demiCercles, demiCercl
|
|||||||
nro_cas=-1):
|
nro_cas=-1):
|
||||||
"""maillage pipe fond fissure"""
|
"""maillage pipe fond fissure"""
|
||||||
logging.info('start')
|
logging.info('start')
|
||||||
|
logging.info("Maillage pour le cas n°%d", nro_cas)
|
||||||
|
|
||||||
meshFondFiss = smesh.Mesh(pipeFondFiss)
|
meshFondFiss = smesh.Mesh(pipeFondFiss)
|
||||||
|
putName(meshFondFiss, "pipeFondFiss", i_pref=nro_cas)
|
||||||
|
|
||||||
algo2d = meshFondFiss.Quadrangle(algo=smeshBuilder.QUADRANGLE)
|
algo2d = meshFondFiss.Quadrangle(algo=smeshBuilder.QUADRANGLE)
|
||||||
algo3d = meshFondFiss.Prism()
|
algo3d = meshFondFiss.Prism()
|
||||||
putName(algo3d.GetSubMesh(), "pipe", i_pref=nro_cas)
|
putName(algo3d.GetSubMesh(), "pipe", i_pref=nro_cas)
|
||||||
|
@ -36,9 +36,11 @@ def insereFissureLongue_d (facePeau, edgePeauFiss, groupEdgesBordPeau, bordsLibr
|
|||||||
mailleur="MeshGems", nro_cas=-1):
|
mailleur="MeshGems", nro_cas=-1):
|
||||||
"""maillage face de peau"""
|
"""maillage face de peau"""
|
||||||
logging.info('start')
|
logging.info('start')
|
||||||
|
logging.info("Maillage avec %s pour le cas n°%d", mailleur, nro_cas)
|
||||||
|
|
||||||
meshFacePeau = smesh.Mesh(facePeau)
|
meshFacePeau = smesh.Mesh(facePeau)
|
||||||
logging.info("Maillage avec %s", mailleur)
|
putName(meshFacePeau, "facePeau", i_pref=nro_cas)
|
||||||
|
|
||||||
if ( mailleur == "MeshGems"):
|
if ( mailleur == "MeshGems"):
|
||||||
algo2d = meshFacePeau.Triangle(algo=smeshBuilder.MG_CADSurf)
|
algo2d = meshFacePeau.Triangle(algo=smeshBuilder.MG_CADSurf)
|
||||||
hypo2d = algo2d.Parameters()
|
hypo2d = algo2d.Parameters()
|
||||||
|
@ -35,10 +35,12 @@ def insereFissureLongue_e (faceFiss, edgePeauFiss, groupEdgesPeauFiss, group_gen
|
|||||||
mailleur="MeshGems", nro_cas=-1):
|
mailleur="MeshGems", nro_cas=-1):
|
||||||
"""maillage face de fissure"""
|
"""maillage face de fissure"""
|
||||||
logging.info('start')
|
logging.info('start')
|
||||||
|
logging.info("Maillage avec %s pour le cas n°%d", mailleur, nro_cas)
|
||||||
|
|
||||||
meshFaceFiss = smesh.Mesh(faceFiss)
|
meshFaceFiss = smesh.Mesh(faceFiss)
|
||||||
mesh_size = (profondeur - rayonPipe)/math.sqrt(3.0) # pour avoir deux couches de triangles equilateraux partout sur la fissure
|
putName(meshFaceFiss, "faceFiss", i_pref=nro_cas)
|
||||||
logging.info("Maillage avec %s", mailleur)
|
|
||||||
|
mesh_size = (profondeur - rayonPipe)/math.sqrt(3.0) # pour avoir deux couches de triangles équilatéraux partout sur la fissure
|
||||||
if ( mailleur == "MeshGems"):
|
if ( mailleur == "MeshGems"):
|
||||||
algo2d = meshFaceFiss.Triangle(algo=smeshBuilder.MG_CADSurf)
|
algo2d = meshFaceFiss.Triangle(algo=smeshBuilder.MG_CADSurf)
|
||||||
hypo2d = algo2d.Parameters()
|
hypo2d = algo2d.Parameters()
|
||||||
|
@ -33,7 +33,7 @@ def insereFissureLongue_f (internalBoundary, meshFondFiss, meshFacePeau, meshFac
|
|||||||
mailleur="MeshGems", nro_cas=-1):
|
mailleur="MeshGems", nro_cas=-1):
|
||||||
"""maillage meshBoiteDefaut"""
|
"""maillage meshBoiteDefaut"""
|
||||||
logging.info('start')
|
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(), \
|
meshBoiteDefaut = smesh.Concatenate( [internalBoundary.GetMesh(), \
|
||||||
meshFondFiss.GetMesh(), \
|
meshFondFiss.GetMesh(), \
|
||||||
|
@ -41,6 +41,7 @@ def insereFissureLongue_g(nomFicFissure, fichierMaillageFissure, nomFicSain, mai
|
|||||||
nro_cas=-1):
|
nro_cas=-1):
|
||||||
"""Les groupes de la fissure longue"""
|
"""Les groupes de la fissure longue"""
|
||||||
logging.info('start')
|
logging.info('start')
|
||||||
|
logging.info("Pour le cas n°%d", mailleur, nro_cas)
|
||||||
|
|
||||||
O, _, _, _ = triedreBase()
|
O, _, _, _ = triedreBase()
|
||||||
|
|
||||||
|
@ -28,7 +28,8 @@ from .geomsmesh import smesh
|
|||||||
|
|
||||||
from .putName import putName
|
from .putName import putName
|
||||||
|
|
||||||
def mailleAretesEtJonction(internalBoundary, aretesVivesCoupees, lgAretesVives):
|
def mailleAretesEtJonction (internalBoundary, aretesVivesCoupees, lgAretesVives, \
|
||||||
|
nro_cas=-1):
|
||||||
"""edges de bord, faces défaut à respecter"""
|
"""edges de bord, faces défaut à respecter"""
|
||||||
logging.info('start')
|
logging.info('start')
|
||||||
|
|
||||||
@ -39,7 +40,7 @@ def mailleAretesEtJonction(internalBoundary, aretesVivesCoupees, lgAretesVives):
|
|||||||
criteres.append(unCritere)
|
criteres.append(unCritere)
|
||||||
filtre = smesh.GetFilterFromCriteria(criteres)
|
filtre = smesh.GetFilterFromCriteria(criteres)
|
||||||
bordsLibres = internalBoundary.MakeGroupByFilter( 'bords', filtre )
|
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
|
# --- 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"
|
# on désigne les faces de peau en quadrangles par le groupe "skinFaces"
|
||||||
@ -56,9 +57,9 @@ def mailleAretesEtJonction(internalBoundary, aretesVivesCoupees, lgAretesVives):
|
|||||||
meshAretesVives = smesh.Mesh(aretesVivesC)
|
meshAretesVives = smesh.Mesh(aretesVivesC)
|
||||||
algo1d = meshAretesVives.Segment()
|
algo1d = meshAretesVives.Segment()
|
||||||
hypo1d = algo1d.LocalLength(lgAretesVives,[],1e-07)
|
hypo1d = algo1d.LocalLength(lgAretesVives,[],1e-07)
|
||||||
putName(algo1d.GetSubMesh(), "aretesVives")
|
putName(algo1d.GetSubMesh(), "aretesVives", i_pref=nro_cas)
|
||||||
putName(algo1d, "algo1d_aretesVives")
|
putName(algo1d, "algo1d_aretesVives", i_pref=nro_cas)
|
||||||
putName(hypo1d, "hypo1d_aretesVives")
|
putName(hypo1d, "hypo1d_aretesVives", i_pref=nro_cas)
|
||||||
|
|
||||||
is_done = meshAretesVives.Compute()
|
is_done = meshAretesVives.Compute()
|
||||||
text = "meshAretesVives.Compute"
|
text = "meshAretesVives.Compute"
|
||||||
|
@ -31,7 +31,7 @@ from .putName import putName
|
|||||||
def mailleFacesFissure(faceFissureExterne, \
|
def mailleFacesFissure(faceFissureExterne, \
|
||||||
edgesPipeFissureExterneC, edgesPeauFissureExterneC, \
|
edgesPipeFissureExterneC, edgesPeauFissureExterneC, \
|
||||||
meshPipeGroups, areteFaceFissure, rayonPipe, nbsegRad, \
|
meshPipeGroups, areteFaceFissure, rayonPipe, nbsegRad, \
|
||||||
mailleur="MeshGems"):
|
mailleur="MeshGems", nro_cas=-1):
|
||||||
"""maillage faces de fissure"""
|
"""maillage faces de fissure"""
|
||||||
logging.info('start')
|
logging.info('start')
|
||||||
|
|
||||||
@ -54,17 +54,17 @@ def mailleFacesFissure(faceFissureExterne, \
|
|||||||
hypo2d.SetFineness( 2 )
|
hypo2d.SetFineness( 2 )
|
||||||
hypo2d.SetMinSize( rayonPipe/float(nbsegRad) )
|
hypo2d.SetMinSize( rayonPipe/float(nbsegRad) )
|
||||||
hypo2d.SetQuadAllowed( 0 )
|
hypo2d.SetQuadAllowed( 0 )
|
||||||
putName(algo2d.GetSubMesh(), "faceFiss")
|
putName(algo2d.GetSubMesh(), "faceFiss", i_pref=nro_cas)
|
||||||
putName(algo2d, "algo2d_faceFiss")
|
putName(algo2d, "algo2d_faceFiss", i_pref=nro_cas)
|
||||||
putName(hypo2d, "hypo2d_faceFiss")
|
putName(hypo2d, "hypo2d_faceFiss", i_pref=nro_cas)
|
||||||
|
|
||||||
texte = "Récupération des arêtes de '{}'".format(edgesPipeFissureExterneC.GetName())
|
texte = "Récupération des arêtes de '{}'".format(edgesPipeFissureExterneC.GetName())
|
||||||
logging.info(texte)
|
logging.info(texte)
|
||||||
algo1d = meshFaceFiss.UseExisting1DElements(geom=edgesPipeFissureExterneC)
|
algo1d = meshFaceFiss.UseExisting1DElements(geom=edgesPipeFissureExterneC)
|
||||||
hypo1d = algo1d.SourceEdges([ meshPipeGroups['edgeFaceFissGroup'] ],0,0)
|
hypo1d = algo1d.SourceEdges([ meshPipeGroups['edgeFaceFissGroup'] ],0,0)
|
||||||
putName(algo1d.GetSubMesh(), "edgeFissPeau")
|
putName(algo1d.GetSubMesh(), "edgeFissPeau", i_pref=nro_cas)
|
||||||
putName(algo1d, "algo1d_edgeFissPeau")
|
putName(algo1d, "algo1d_edgeFissPeau", i_pref=nro_cas)
|
||||||
putName(hypo1d, "hypo1d_edgeFissPeau")
|
putName(hypo1d, "hypo1d_edgeFissPeau", i_pref=nro_cas)
|
||||||
|
|
||||||
grpFaceFissureExterne = meshFaceFiss.GroupOnGeom(faceFissureExterne, "fisOutPi", SMESH.FACE)
|
grpFaceFissureExterne = meshFaceFiss.GroupOnGeom(faceFissureExterne, "fisOutPi", SMESH.FACE)
|
||||||
grpEdgesPeauFissureExterne = meshFaceFiss.GroupOnGeom(edgesPeauFissureExterneC,'edgesPeauFissureExterne',SMESH.EDGE)
|
grpEdgesPeauFissureExterne = meshFaceFiss.GroupOnGeom(edgesPeauFissureExterneC,'edgesPeauFissureExterne',SMESH.EDGE)
|
||||||
|
@ -36,9 +36,10 @@ def meshBlocPart(blocPartition, faceFissure, tore, centres, edges, diams, circle
|
|||||||
gencnt, facefissoutore, edgeext, facesExternes, facesExtBloc, facesExtElli, \
|
gencnt, facefissoutore, edgeext, facesExternes, facesExtBloc, facesExtElli, \
|
||||||
aretesInternes, internalBoundary, ellipsoidep, sharedFaces, sharedEdges, edgesBords, \
|
aretesInternes, internalBoundary, ellipsoidep, sharedFaces, sharedEdges, edgesBords, \
|
||||||
nbsegExt, nbsegGen, nbsegRad, scaleRad, reverses, reverext, nbsegCercle, nbsegFis, dmoyen, lensegEllipsoide, \
|
nbsegExt, nbsegGen, nbsegRad, scaleRad, reverses, reverext, nbsegCercle, nbsegFis, dmoyen, lensegEllipsoide, \
|
||||||
mailleur="MeshGems"):
|
mailleur="MeshGems", nro_cas=-1):
|
||||||
"""Maillage du bloc partitionné"""
|
"""Maillage du bloc partitionné"""
|
||||||
logging.info('start')
|
logging.info('start')
|
||||||
|
logging.info("Maillage avec %s pour le cas n°%d", mailleur, nro_cas)
|
||||||
|
|
||||||
# --- edges de bord à respecter
|
# --- edges de bord à respecter
|
||||||
|
|
||||||
@ -49,7 +50,7 @@ def meshBlocPart(blocPartition, faceFissure, tore, centres, edges, diams, circle
|
|||||||
criteres.append(unCritere)
|
criteres.append(unCritere)
|
||||||
filtre = smesh.GetFilterFromCriteria(criteres)
|
filtre = smesh.GetFilterFromCriteria(criteres)
|
||||||
bordsLibres = internalBoundary.MakeGroupByFilter( 'bords', filtre )
|
bordsLibres = internalBoundary.MakeGroupByFilter( 'bords', filtre )
|
||||||
smesh.SetName(bordsLibres, 'bordsLibres')
|
putName(bordsLibres, 'bordsLibres', i_pref=nro_cas)
|
||||||
|
|
||||||
# --- maillage bloc
|
# --- maillage bloc
|
||||||
|
|
||||||
@ -61,34 +62,34 @@ def meshBlocPart(blocPartition, faceFissure, tore, centres, edges, diams, circle
|
|||||||
hypo2d.SetLocalLength(lensegEllipsoide)
|
hypo2d.SetLocalLength(lensegEllipsoide)
|
||||||
hypo2d.LengthFromEdges()
|
hypo2d.LengthFromEdges()
|
||||||
hypo2d.SetAllowQuadrangles(0)
|
hypo2d.SetAllowQuadrangles(0)
|
||||||
putName(algo2d.GetSubMesh(), "sharedFaces", i_aux)
|
putName(algo2d.GetSubMesh(), "sharedFaces", i_aux, nro_cas)
|
||||||
putName(algo2d, "algo2d_sharedFaces", i_aux)
|
putName(algo2d, "algo2d_sharedFaces", i_aux, nro_cas)
|
||||||
putName(hypo2d, "hypo2d_sharedFaces", i_aux)
|
putName(hypo2d, "hypo2d_sharedFaces", i_aux, nro_cas)
|
||||||
|
|
||||||
for i_aux, sharedEdges_i in enumerate(sharedEdges):
|
for i_aux, sharedEdges_i in enumerate(sharedEdges):
|
||||||
algo1d = bloc1.Segment(geom=sharedEdges_i)
|
algo1d = bloc1.Segment(geom=sharedEdges_i)
|
||||||
hypo1d = algo1d.LocalLength(lensegEllipsoide)
|
hypo1d = algo1d.LocalLength(lensegEllipsoide)
|
||||||
putName(algo1d.GetSubMesh(), "sharedEdges", i_aux)
|
putName(algo1d.GetSubMesh(), "sharedEdges", i_aux, nro_cas)
|
||||||
putName(algo1d, "algo1d_sharedEdges", i_aux)
|
putName(algo1d, "algo1d_sharedEdges", i_aux, nro_cas)
|
||||||
putName(hypo1d, "hypo1d_sharedEdges", i_aux)
|
putName(hypo1d, "hypo1d_sharedEdges", i_aux, nro_cas)
|
||||||
|
|
||||||
declareAlgoEllipsoideFirst = False
|
declareAlgoEllipsoideFirst = False
|
||||||
if declareAlgoEllipsoideFirst:
|
if declareAlgoEllipsoideFirst:
|
||||||
algo3d = bloc1.Tetrahedron(algo=smeshBuilder.NETGEN,geom=ellipsoidep)
|
algo3d = bloc1.Tetrahedron(algo=smeshBuilder.NETGEN,geom=ellipsoidep)
|
||||||
hypo3d = algo3d.MaxElementVolume(1000.0)
|
hypo3d = algo3d.MaxElementVolume(1000.0)
|
||||||
putName(algo3d.GetSubMesh(), "ellipsoide")
|
putName(algo3d.GetSubMesh(), "ellipsoide", i_pref=nro_cas)
|
||||||
putName(algo3d, "algo3d_ellipsoide")
|
putName(algo3d, "algo3d_ellipsoide", i_pref=nro_cas)
|
||||||
putName(hypo3d, "hypo3d_ellipsoide")
|
putName(hypo3d, "hypo3d_ellipsoide", i_pref=nro_cas)
|
||||||
|
|
||||||
algo3d = bloc1.Prism(geom=tore)
|
algo3d = bloc1.Prism(geom=tore)
|
||||||
algo2d = bloc1.Quadrangle(geom=tore)
|
algo2d = bloc1.Quadrangle(geom=tore)
|
||||||
algo1d = bloc1.Segment(geom=tore)
|
algo1d = bloc1.Segment(geom=tore)
|
||||||
hypo1d = algo1d.NumberOfSegments(nbsegGen)
|
hypo1d = algo1d.NumberOfSegments(nbsegGen)
|
||||||
putName(algo3d.GetSubMesh(), "tore")
|
putName(algo3d.GetSubMesh(), "tore", i_pref=nro_cas)
|
||||||
putName(algo3d, "algo3d_tore")
|
putName(algo3d, "algo3d_tore", i_pref=nro_cas)
|
||||||
putName(algo2d, "algo2d_tore")
|
putName(algo2d, "algo2d_tore", i_pref=nro_cas)
|
||||||
putName(algo1d, "algo1d_tore")
|
putName(algo1d, "algo1d_tore", i_pref=nro_cas)
|
||||||
putName(hypo1d, "hypo1d_tore")
|
putName(hypo1d, "hypo1d_tore", i_pref=nro_cas)
|
||||||
|
|
||||||
for i_aux, faces_i in enumerate(faces):
|
for i_aux, faces_i in enumerate(faces):
|
||||||
algo2d = bloc1.Quadrangle(geom=faces_i)
|
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.SetTriaVertex( geompy.GetSubShapeID(blocPartition,centres[i_aux]) )
|
||||||
hypo2d.SetQuadType( StdMeshersBuilder.QUAD_STANDARD )
|
hypo2d.SetQuadType( StdMeshersBuilder.QUAD_STANDARD )
|
||||||
_ = bloc1.AddHypothesis(hypo2d,faces_i)
|
_ = bloc1.AddHypothesis(hypo2d,faces_i)
|
||||||
putName(algo2d.GetSubMesh(), "faces", i_aux)
|
putName(algo2d.GetSubMesh(), "faces", i_aux, nro_cas)
|
||||||
putName(algo2d, "algo2d_faces", i_aux)
|
putName(algo2d, "algo2d_faces", i_aux, nro_cas)
|
||||||
putName(hypo2d, "hypo2d_faces", i_aux)
|
putName(hypo2d, "hypo2d_faces", i_aux, nro_cas)
|
||||||
|
|
||||||
for i_aux, edges_i in enumerate(edges):
|
for i_aux, edges_i in enumerate(edges):
|
||||||
algo1d = bloc1.Segment(geom=edges_i)
|
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) ])
|
hypo1d = algo1d.NumberOfSegments(nbsegRad, scaleRad,[ geompy.GetSubShapeID(blocPartition,edges_i) ])
|
||||||
else:
|
else:
|
||||||
hypo1d = algo1d.NumberOfSegments(nbsegRad, scaleRad,[ ])
|
hypo1d = algo1d.NumberOfSegments(nbsegRad, scaleRad,[ ])
|
||||||
putName(algo1d.GetSubMesh(), "edges", i_aux)
|
putName(algo1d.GetSubMesh(), "edges", i_aux, nro_cas)
|
||||||
putName(algo1d, "algo1d_edges", i_aux)
|
putName(algo1d, "algo1d_edges", i_aux, nro_cas)
|
||||||
putName(hypo1d, "hypo1d_edges", i_aux)
|
putName(hypo1d, "hypo1d_edges", i_aux, nro_cas)
|
||||||
|
|
||||||
for i_aux, circles_i in enumerate(circles):
|
for i_aux, circles_i in enumerate(circles):
|
||||||
algo1d = bloc1.Segment(geom=circles_i)
|
algo1d = bloc1.Segment(geom=circles_i)
|
||||||
hypo1d = algo1d.NumberOfSegments(nbsegCercle)
|
hypo1d = algo1d.NumberOfSegments(nbsegCercle)
|
||||||
putName(algo1d.GetSubMesh(), "circles", i_aux)
|
putName(algo1d.GetSubMesh(), "circles", i_aux, nro_cas)
|
||||||
putName(algo1d, "algo1d_circles", i_aux)
|
putName(algo1d, "algo1d_circles", i_aux, nro_cas)
|
||||||
putName(hypo1d, "hypo1d_circles", i_aux)
|
putName(hypo1d, "hypo1d_circles", i_aux, nro_cas)
|
||||||
|
|
||||||
if len(edgeext) == 1:
|
if len(edgeext) == 1:
|
||||||
densite = int(round(nbsegFis/2))
|
densite = int(round(nbsegFis/2))
|
||||||
@ -124,9 +125,9 @@ def meshBlocPart(blocPartition, faceFissure, tore, centres, edges, diams, circle
|
|||||||
hypo1d.SetDistrType( 2 )
|
hypo1d.SetDistrType( 2 )
|
||||||
hypo1d.SetConversionMode( 1 )
|
hypo1d.SetConversionMode( 1 )
|
||||||
hypo1d.SetTableFunction( [ 0, densite, 0.4, 1, 0.6, 1, 1, densite ] )
|
hypo1d.SetTableFunction( [ 0, densite, 0.4, 1, 0.6, 1, 1, densite ] )
|
||||||
putName(algo1d.GetSubMesh(), "edgeext")
|
putName(algo1d.GetSubMesh(), "edgeext", i_pref=nro_cas)
|
||||||
putName(algo1d, "algo1d_edgeext")
|
putName(algo1d, "algo1d_edgeext", i_pref=nro_cas)
|
||||||
putName(hypo1d, "hypo1d_edgeext")
|
putName(hypo1d, "hypo1d_edgeext", i_pref=nro_cas)
|
||||||
else:
|
else:
|
||||||
longTotal = 0
|
longTotal = 0
|
||||||
longEdgeExts = list()
|
longEdgeExts = list()
|
||||||
@ -144,15 +145,15 @@ def meshBlocPart(blocPartition, faceFissure, tore, centres, edges, diams, circle
|
|||||||
hypo1d.SetTableFunction( [ 0, densite, 0.8, 1, 1, 1 ] )
|
hypo1d.SetTableFunction( [ 0, densite, 0.8, 1, 1, 1 ] )
|
||||||
if reverext[i_aux]:
|
if reverext[i_aux]:
|
||||||
hypo1d.SetReversedEdges([ geompy.GetSubShapeID(blocPartition, edgeext_i) ])
|
hypo1d.SetReversedEdges([ geompy.GetSubShapeID(blocPartition, edgeext_i) ])
|
||||||
putName(algo1d.GetSubMesh(), "edgeext", i_aux)
|
putName(algo1d.GetSubMesh(), "edgeext", i_aux, nro_cas)
|
||||||
putName(algo1d, "algo1d_edgeext", i_aux)
|
putName(algo1d, "algo1d_edgeext", i_aux, nro_cas)
|
||||||
putName(hypo1d, "hypo1d_edgeext", i_aux)
|
putName(hypo1d, "hypo1d_edgeext", i_aux, nro_cas)
|
||||||
|
|
||||||
algo2d = bloc1.Triangle(algo=smeshBuilder.NETGEN_2D, geom=facefissoutore)
|
algo2d = bloc1.Triangle(algo=smeshBuilder.NETGEN_2D, geom=facefissoutore)
|
||||||
hypo2d = algo2d.LengthFromEdges()
|
hypo2d = algo2d.LengthFromEdges()
|
||||||
putName(algo2d.GetSubMesh(), "facefissoutore")
|
putName(algo2d.GetSubMesh(), "facefissoutore", i_pref=nro_cas)
|
||||||
putName(algo2d, "algo2d_facefissoutore")
|
putName(algo2d, "algo2d_facefissoutore", i_pref=nro_cas)
|
||||||
putName(hypo2d, "hypo2d_facefissoutore")
|
putName(hypo2d, "hypo2d_facefissoutore", i_pref=nro_cas)
|
||||||
|
|
||||||
|
|
||||||
maxElemArea = 0.5*dmoyen*dmoyen
|
maxElemArea = 0.5*dmoyen*dmoyen
|
||||||
@ -164,33 +165,33 @@ def meshBlocPart(blocPartition, faceFissure, tore, centres, edges, diams, circle
|
|||||||
if edgesBords is None:
|
if edgesBords is None:
|
||||||
algo1d = bloc1.Segment(geom=facesExternes_i)
|
algo1d = bloc1.Segment(geom=facesExternes_i)
|
||||||
hypo1d = algo1d.NumberOfSegments(1)
|
hypo1d = algo1d.NumberOfSegments(1)
|
||||||
putName(algo2d.GetSubMesh(), "facesExternes", i_aux)
|
putName(algo2d.GetSubMesh(), "facesExternes", i_aux, nro_cas)
|
||||||
putName(algo2d, "algo2d_facesExternes", i_aux)
|
putName(algo2d, "algo2d_facesExternes", i_aux, nro_cas)
|
||||||
putName(hypo2d, "hypo2d_facesExternes", i_aux)
|
putName(hypo2d, "hypo2d_facesExternes", i_aux, nro_cas)
|
||||||
if edgesBords is None:
|
if edgesBords is None:
|
||||||
putName(algo1d, "algo1d_facesExternes", i_aux)
|
putName(algo1d, "algo1d_facesExternes", i_aux, nro_cas)
|
||||||
putName(hypo1d, "hypo1d_facesExternes", i_aux)
|
putName(hypo1d, "hypo1d_facesExternes", i_aux, nro_cas)
|
||||||
|
|
||||||
for i_aux, aretesInternes_i in enumerate(aretesInternes):
|
for i_aux, aretesInternes_i in enumerate(aretesInternes):
|
||||||
algo1d = bloc1.Segment(geom=aretesInternes_i)
|
algo1d = bloc1.Segment(geom=aretesInternes_i)
|
||||||
hypo1d = algo1d.NumberOfSegments(nbsegExt)
|
hypo1d = algo1d.NumberOfSegments(nbsegExt)
|
||||||
putName(algo1d.GetSubMesh(), "aretesInternes", i_aux)
|
putName(algo1d.GetSubMesh(), "aretesInternes", i_aux, nro_cas)
|
||||||
putName(algo1d, "algo1d_aretesInternes", i_aux)
|
putName(algo1d, "algo1d_aretesInternes", i_aux, nro_cas)
|
||||||
putName(hypo1d, "hypo1d_aretesInternes", i_aux)
|
putName(hypo1d, "hypo1d_aretesInternes", i_aux, nro_cas)
|
||||||
|
|
||||||
if edgesBords is not None:
|
if edgesBords is not None:
|
||||||
algo1d = bloc1.UseExisting1DElements(geom=edgesBords)
|
algo1d = bloc1.UseExisting1DElements(geom=edgesBords)
|
||||||
hypo1d = algo1d.SourceEdges([ bordsLibres ],0,0)
|
hypo1d = algo1d.SourceEdges([ bordsLibres ],0,0)
|
||||||
putName(algo1d.GetSubMesh(), "bordsLibres")
|
putName(algo1d.GetSubMesh(), "bordsLibres", i_pref=nro_cas)
|
||||||
putName(algo1d, "algo1d_bordsLibres")
|
putName(algo1d, "algo1d_bordsLibres", i_pref=nro_cas)
|
||||||
putName(hypo1d, "hypo1d_bordsLibres")
|
putName(hypo1d, "hypo1d_bordsLibres", i_pref=nro_cas)
|
||||||
|
|
||||||
if not declareAlgoEllipsoideFirst:
|
if not declareAlgoEllipsoideFirst:
|
||||||
algo3d = bloc1.Tetrahedron(algo=smeshBuilder.NETGEN,geom=ellipsoidep)
|
algo3d = bloc1.Tetrahedron(algo=smeshBuilder.NETGEN,geom=ellipsoidep)
|
||||||
hypo3d = algo3d.MaxElementVolume(1000.0)
|
hypo3d = algo3d.MaxElementVolume(1000.0)
|
||||||
putName(algo3d.GetSubMesh(), "ellipsoide")
|
putName(algo3d.GetSubMesh(), "ellipsoide", i_pref=nro_cas)
|
||||||
putName(algo3d, "algo3d_ellipsoide")
|
putName(algo3d, "algo3d_ellipsoide", i_pref=nro_cas)
|
||||||
putName(hypo3d, "hypo3d_ellipsoide")
|
putName(hypo3d, "hypo3d_ellipsoide", i_pref=nro_cas)
|
||||||
|
|
||||||
_ = bloc1.GroupOnGeom(faceFissure,'FACE1',SMESH.FACE)
|
_ = bloc1.GroupOnGeom(faceFissure,'FACE1',SMESH.FACE)
|
||||||
_ = bloc1.GroupOnGeom(gencnt,'nfondfis',SMESH.NODE)
|
_ = 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)
|
algo3d = blocMesh.Tetrahedron(algo=smeshBuilder.NETGEN)
|
||||||
hypo3d = algo3d.MaxElementVolume(1000.0)
|
hypo3d = algo3d.MaxElementVolume(1000.0)
|
||||||
putName(algo3d.GetSubMesh(), "bloc")
|
putName(algo3d.GetSubMesh(), "bloc", i_pref=nro_cas)
|
||||||
putName(algo3d, "algo3d_bloc")
|
putName(algo3d, "algo3d_bloc", i_pref=nro_cas)
|
||||||
putName(hypo3d, "hypo3d_bloc")
|
putName(hypo3d, "hypo3d_bloc", i_pref=nro_cas)
|
||||||
|
|
||||||
is_done = blocMesh.Compute()
|
is_done = blocMesh.Compute()
|
||||||
text = "blocMesh.Compute"
|
text = "blocMesh.Compute"
|
||||||
|
@ -17,9 +17,9 @@
|
|||||||
#
|
#
|
||||||
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
#
|
#
|
||||||
|
|
||||||
"""Nommage des objets mesh (algorithme, hypothèse, subMesh)"""
|
"""Nommage des objets mesh (algorithme, hypothèse, subMesh)"""
|
||||||
|
|
||||||
|
#import logging
|
||||||
from .geomsmesh import smesh
|
from .geomsmesh import smesh
|
||||||
|
|
||||||
def putName (objmesh, name, i_suff=-1, i_pref=-1):
|
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
|
@i_pref un éventuel préfixe
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
#logging.info("putName pour %s - i_suff=%d, i_pref=%d", name, i_suff, i_pref)
|
||||||
# suffixe éventuel :
|
# suffixe éventuel :
|
||||||
if i_suff >= 0:
|
if i_suff >= 0:
|
||||||
suffixe = "_{}".format(i_suff)
|
suffixe = "_{}".format(i_suff)
|
||||||
@ -40,5 +41,6 @@ def putName (objmesh, name, i_suff=-1, i_pref=-1):
|
|||||||
if i_pref >= 0:
|
if i_pref >= 0:
|
||||||
prefixe = "Cas{:02d}_".format(i_pref)
|
prefixe = "Cas{:02d}_".format(i_pref)
|
||||||
name = prefixe + name
|
name = prefixe + name
|
||||||
|
#logging.info("Au final : %s", name)
|
||||||
|
|
||||||
smesh.SetName(objmesh, name)
|
smesh.SetName(objmesh, name)
|
||||||
|
Loading…
Reference in New Issue
Block a user