mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-28 00:50:33 +05:00
Nommage des maillags intermédiaires
This commit is contained in:
parent
3f3ca40e45
commit
1a2209c281
@ -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
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
|
@ -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
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
|
@ -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
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
|
@ -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
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
|
@ -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
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
|
@ -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
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
|
@ -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
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
|
@ -498,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
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
|
@ -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
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
|
@ -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
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
|
@ -167,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
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
|
@ -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()
|
||||
|
@ -671,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
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
|
@ -95,9 +95,13 @@ def insereFissureElliptique(geometriesSaines, maillagesSains, \
|
||||
zoneDefaut_internalFaces = elementsDefaut[12]
|
||||
zoneDefaut_internalEdges = elementsDefaut[13]
|
||||
|
||||
maillageComplet = None
|
||||
|
||||
while True:
|
||||
|
||||
## --- ellipse incomplete : generatrice
|
||||
#if step == 5:
|
||||
#return None
|
||||
#break
|
||||
|
||||
#allonge = demiGrandAxe/demiPetitAxe
|
||||
#rayonTore = demiPetitAxe/5.0
|
||||
@ -106,7 +110,7 @@ def insereFissureElliptique(geometriesSaines, maillagesSains, \
|
||||
|
||||
## --- positionnement sur le bloc defaut de generatrice, tore et plan fissure
|
||||
#if step == 6:
|
||||
#return None
|
||||
#break
|
||||
|
||||
#pipe0 = self.rotTrans(Pipe_1, orientation, centreDefaut, normalDefaut)
|
||||
#gener1 = self.rotTrans(generatrice, orientation, centreDefaut, normalDefaut)
|
||||
@ -124,7 +128,7 @@ def insereFissureElliptique(geometriesSaines, maillagesSains, \
|
||||
|
||||
# --- partition du bloc défaut par génératrice, tore et plan fissure
|
||||
if step == 7:
|
||||
return None
|
||||
break
|
||||
|
||||
[ blocPartition, _, tore, \
|
||||
faceFissure, facesExternes, facesExtBloc, facesExtElli,
|
||||
@ -136,38 +140,38 @@ def insereFissureElliptique(geometriesSaines, maillagesSains, \
|
||||
# --- TORE
|
||||
# --- faces toriques du tore
|
||||
if step == 8:
|
||||
return None
|
||||
break
|
||||
|
||||
[facetore1, facetore2, _, _] = facesVolumesToriques(tore, plane1, facesDefaut)
|
||||
|
||||
# --- faces 1/2 circulaires et edges dans le plan de fissure
|
||||
if step == 9:
|
||||
return None
|
||||
break
|
||||
|
||||
[faces, centres, edges, reverses] = facesCirculaires(extrusionDefaut, tore)
|
||||
|
||||
# --- recherche et classement des edges du tore par propagate
|
||||
if step == 10:
|
||||
return None
|
||||
break
|
||||
|
||||
[diams, circles, geners] = propagateTore(tore)
|
||||
|
||||
# --- tri par longueur des 3 génératrices
|
||||
if step == 11:
|
||||
return None
|
||||
break
|
||||
|
||||
[_, genint, gencnt] = sortGeneratrices(tore, geners)
|
||||
|
||||
# --- faces fissure dans et hors tore, et edges face hors tore
|
||||
if step == 12:
|
||||
return None
|
||||
break
|
||||
|
||||
[_, facefissoutore, _, edgeext, reverext] = \
|
||||
facesFissure(ellipsoidep, faceFissure, extrusionDefaut, genint)
|
||||
|
||||
# --- identification des faces tore et fissure dans le solide hors tore
|
||||
if step == 13:
|
||||
return None
|
||||
break
|
||||
|
||||
[_, _, _] = \
|
||||
facesToreInBloc(ellipsoidep, facefissoutore, facetore1, facetore2)
|
||||
@ -176,36 +180,38 @@ def insereFissureElliptique(geometriesSaines, maillagesSains, \
|
||||
|
||||
#shapesAModifier = self.shapesSurFissure(blocPartition, plane1 faceFissure, gencnt)
|
||||
if step == 14:
|
||||
return None
|
||||
break
|
||||
|
||||
extrusionFaceFissure, _ = shapeSurFissure(plane1)
|
||||
|
||||
# --- maillage du bloc partitionne
|
||||
|
||||
if step == 15:
|
||||
return None
|
||||
break
|
||||
|
||||
[_, 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) \
|
||||
|
||||
nbsegExt, nbsegGen, nbsegRad, scaleRad, reverses, reverext, nbsegCercle, \
|
||||
nbsegFis, dmoyen, lensegEllipsoide)
|
||||
if step == 16:
|
||||
return None
|
||||
break
|
||||
|
||||
maillageSain = enleveDefaut(maillageSain, zoneDefaut, zoneDefaut_skin, zoneDefaut_internalFaces, zoneDefaut_internalEdges)
|
||||
|
||||
if step == 17:
|
||||
return None
|
||||
maillageComplet = RegroupeSainEtDefaut(maillageSain, blocComplet, extrusionFaceFissure, faceFissure, 'VOLUMES')
|
||||
break
|
||||
|
||||
maillageComplet = RegroupeSainEtDefaut(maillageSain, blocComplet, extrusionFaceFissure, faceFissure, 'VOLUMES')
|
||||
if step == 18:
|
||||
return None
|
||||
break
|
||||
|
||||
maillageComplet.ExportMED(fichierMaillageFissure)
|
||||
putName(maillageComplet, nomFicFissure)
|
||||
logging.info("fichier maillage fissure : %s", fichierMaillageFissure)
|
||||
|
||||
break
|
||||
|
||||
if salome.sg.hasDesktop():
|
||||
salome.sg.updateObjBrowser()
|
||||
|
||||
|
@ -217,6 +217,7 @@ 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)
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user