mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-11-12 00:29:17 +05:00
Normes python
This commit is contained in:
parent
f6ad065a74
commit
37d2759a1c
@ -18,27 +18,21 @@
|
||||
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
#
|
||||
|
||||
import os
|
||||
from blocFissure import gmu
|
||||
from blocFissure.gmu.geomsmesh import geompy, smesh
|
||||
"""problème de fissure plane coupant 2 faces (angle), débouches normaux, objet plan"""
|
||||
|
||||
import math
|
||||
import GEOM
|
||||
import SALOMEDS
|
||||
import SMESH
|
||||
#import StdMeshers
|
||||
#import GHS3DPlugin
|
||||
#import NETGENPlugin
|
||||
import os
|
||||
import logging
|
||||
|
||||
from blocFissure import gmu
|
||||
from blocFissure.gmu.geomsmesh import geompy, smesh
|
||||
from blocFissure.gmu.fissureGenerique import fissureGenerique
|
||||
|
||||
from blocFissure.gmu.triedreBase import triedreBase
|
||||
from blocFissure.gmu.genereMeshCalculZoneDefaut import genereMeshCalculZoneDefaut
|
||||
from blocFissure.gmu.creeZoneDefautDansObjetSain import creeZoneDefautDansObjetSain
|
||||
from blocFissure.gmu.construitFissureGenerale import construitFissureGenerale
|
||||
|
||||
O, OX, OY, OZ = triedreBase()
|
||||
import GEOM
|
||||
import SALOMEDS
|
||||
import SMESH
|
||||
|
||||
class cubeAngle(fissureGenerique):
|
||||
"""problème de fissure plane coupant 2 faces (angle), débouches normaux, objet plan"""
|
||||
@ -47,9 +41,10 @@ class cubeAngle(fissureGenerique):
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
def genereMaillageSain(self, geometriesSaines, meshParams):
|
||||
logging.info("genereMaillageSain pour '{}'".format(self.nomCas))
|
||||
texte = "genereMaillageSain pour '{}'".format(self.nomCas)
|
||||
logging.info(texte)
|
||||
|
||||
([objetSain], status) = smesh.CreateMeshesFromMED(os.path.join(gmu.pathBloc, "materielCasTests", "CubeAngle.med"))
|
||||
([objetSain], _) = smesh.CreateMeshesFromMED(os.path.join(gmu.pathBloc, "materielCasTests", "CubeAngle.med"))
|
||||
smesh.SetName(objetSain.GetMesh(), "{}_objetSain".format(self.nomProbleme))
|
||||
|
||||
return [objetSain, True] # True : maillage hexa
|
||||
@ -61,14 +56,16 @@ class cubeAngle(fissureGenerique):
|
||||
lgInfluence : distance autour de la shape de fissure a remailler (A ajuster selon le maillage)
|
||||
rayonPipe : le rayon du pile maillé en hexa autour du fond de fissure
|
||||
"""
|
||||
logging.info("setParamShapeFissure pour '{}'".format(self.nomCas))
|
||||
texte = "genereMaillageSain pour '{}'".format(self.nomCas)
|
||||
logging.info(texte)
|
||||
self.shapeFissureParams = dict(lgInfluence = 20,
|
||||
rayonPipe = 10)
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
def genereShapeFissure( self, geometriesSaines, geomParams, shapeFissureParams):
|
||||
"""Importe la géométrie de la fissure"""
|
||||
logging.info("genereShapeFissure pour '{}'".format(self.nomCas))
|
||||
texte = "genereShapeFissure pour '{}'".format(self.nomCas)
|
||||
logging.info(texte)
|
||||
|
||||
lgInfluence = shapeFissureParams['lgInfluence']
|
||||
|
||||
@ -87,7 +84,8 @@ class cubeAngle(fissureGenerique):
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
def setParamMaillageFissure(self):
|
||||
logging.info("setParamMaillageFissure pour '{}'".format(self.nomCas))
|
||||
texte = "setParamMaillageFissure pour '{}'".format(self.nomCas)
|
||||
logging.info(texte)
|
||||
self.maillageFissureParams = dict(nomRep = os.curdir,
|
||||
nomFicSain = self.nomCas,
|
||||
nomFicFissure = 'fissure_' + self.nomCas,
|
||||
@ -104,7 +102,8 @@ class cubeAngle(fissureGenerique):
|
||||
def genereMaillageFissure(self, geometriesSaines, maillagesSains,
|
||||
shapesFissure, shapeFissureParams,
|
||||
maillageFissureParams, elementsDefaut, step):
|
||||
logging.info("genereMaillageFissure pour '{}'".format(self.nomCas))
|
||||
texte = "genereMaillageFissure pour '{}'".format(self.nomCas)
|
||||
logging.info(texte)
|
||||
maillageFissure = construitFissureGenerale(maillagesSains,
|
||||
shapesFissure, shapeFissureParams,
|
||||
maillageFissureParams, elementsDefaut, step)
|
||||
@ -122,4 +121,3 @@ class cubeAngle(fissureGenerique):
|
||||
Entity_Quad_Pyramid = 172, \
|
||||
Entity_Quad_Penta = 64 \
|
||||
)
|
||||
|
||||
|
@ -17,6 +17,7 @@
|
||||
#
|
||||
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
#
|
||||
"""problème de fissure plane coupant 2 faces (angle)"""
|
||||
|
||||
import os
|
||||
|
||||
@ -25,15 +26,15 @@ from .cubeAngle import cubeAngle
|
||||
class cubeAngle2(cubeAngle):
|
||||
"""problème de fissure plane coupant 2 faces (angle), débouches normaux, objet plan
|
||||
|
||||
detection d'un probleme de tolerance sur les edges de jonction pipe et face fissure externe
|
||||
detection d'un probleme de tolerance sur les edges de jonction pipe et face fissure externe
|
||||
"""
|
||||
|
||||
nomProbleme = "cubeAngle2"
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
def setParamShapeFissure(self):
|
||||
"""
|
||||
paramètres de la fissure pour méthode construitFissureGenerale
|
||||
"""paramètres de la fissure pour méthode construitFissureGenerale
|
||||
|
||||
lgInfluence : distance autour de la shape de fissure a remailler (A ajuster selon le maillage)
|
||||
rayonPipe : le rayon du pile maillé en hexa autour du fond de fissure
|
||||
"""
|
||||
@ -61,4 +62,3 @@ class cubeAngle2(cubeAngle):
|
||||
Entity_Quad_Pyramid = 620, \
|
||||
Entity_Quad_Penta = 512 \
|
||||
)
|
||||
|
||||
|
@ -18,6 +18,8 @@
|
||||
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
#
|
||||
|
||||
"""problème de fissure plane coupant le cube dans un coin"""
|
||||
|
||||
import os
|
||||
from blocFissure import gmu
|
||||
|
||||
@ -45,4 +47,3 @@ referencesMaillageFissure = dict( \
|
||||
Entity_Quad_Pyramid = 460, \
|
||||
Entity_Quad_Penta = 80 \
|
||||
)
|
||||
|
||||
|
@ -18,6 +18,8 @@
|
||||
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
#
|
||||
|
||||
"""problème de fissure plane coupant le cube au milieu"""
|
||||
|
||||
import os
|
||||
from blocFissure import gmu
|
||||
|
||||
@ -45,4 +47,3 @@ referencesMaillageFissure = dict( \
|
||||
Entity_Quad_Pyramid = 990, \
|
||||
Entity_Quad_Penta = 230 \
|
||||
)
|
||||
|
||||
|
@ -18,6 +18,8 @@
|
||||
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
#
|
||||
|
||||
"""problème de fissure plane coupant le cube au milieu"""
|
||||
|
||||
import os
|
||||
from blocFissure import gmu
|
||||
|
||||
@ -45,4 +47,3 @@ referencesMaillageFissure = dict( \
|
||||
Entity_Quad_Pyramid = 780, \
|
||||
Entity_Quad_Penta = 200 \
|
||||
)
|
||||
|
||||
|
@ -18,27 +18,21 @@
|
||||
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
#
|
||||
|
||||
import os
|
||||
from blocFissure import gmu
|
||||
from blocFissure.gmu.geomsmesh import geompy, smesh
|
||||
"""problème de fissure plane sur cylindre, grand fond de fissure en arc de cercle"""
|
||||
|
||||
import math
|
||||
import GEOM
|
||||
import SALOMEDS
|
||||
import SMESH
|
||||
#import StdMeshers
|
||||
#import GHS3DPlugin
|
||||
#import NETGENPlugin
|
||||
import os
|
||||
import logging
|
||||
|
||||
from blocFissure import gmu
|
||||
from blocFissure.gmu.geomsmesh import geompy, smesh
|
||||
from blocFissure.gmu.fissureGenerique import fissureGenerique
|
||||
|
||||
from blocFissure.gmu.triedreBase import triedreBase
|
||||
from blocFissure.gmu.genereMeshCalculZoneDefaut import genereMeshCalculZoneDefaut
|
||||
from blocFissure.gmu.creeZoneDefautDansObjetSain import creeZoneDefautDansObjetSain
|
||||
from blocFissure.gmu.construitFissureGenerale import construitFissureGenerale
|
||||
|
||||
O, OX, OY, OZ = triedreBase()
|
||||
import GEOM
|
||||
import SALOMEDS
|
||||
import SMESH
|
||||
|
||||
class cylindre(fissureGenerique):
|
||||
"""problème de fissure plane sur cylindre, grand fond de fissure en arc de cercle"""
|
||||
@ -53,7 +47,7 @@ class cylindre(fissureGenerique):
|
||||
"""
|
||||
logging.info("genereMaillageSain %s", self.nomCas)
|
||||
|
||||
([objetSain], status) = 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')
|
||||
|
||||
return [objetSain, True] # True : maillage hexa
|
||||
@ -122,4 +116,3 @@ class cylindre(fissureGenerique):
|
||||
Entity_Quad_Pyramid = 1110, \
|
||||
Entity_Quad_Penta = 336 \
|
||||
)
|
||||
|
||||
|
@ -18,25 +18,21 @@
|
||||
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
#
|
||||
|
||||
"""problème de fissure plane sur cylindre hexa, fond de fissure complexe : polyline"""
|
||||
|
||||
import os
|
||||
import logging
|
||||
|
||||
from blocFissure import gmu
|
||||
from blocFissure.gmu.geomsmesh import geompy, smesh
|
||||
from blocFissure.gmu.genereMeshCalculZoneDefaut import genereMeshCalculZoneDefaut
|
||||
|
||||
import math
|
||||
import GEOM
|
||||
import SALOMEDS
|
||||
import SMESH
|
||||
import logging
|
||||
|
||||
from .cylindre import cylindre
|
||||
|
||||
from blocFissure.gmu.triedreBase import triedreBase
|
||||
from blocFissure.gmu.genereMeshCalculZoneDefaut import genereMeshCalculZoneDefaut
|
||||
from blocFissure.gmu.creeZoneDefautDansObjetSain import creeZoneDefautDansObjetSain
|
||||
from blocFissure.gmu.construitFissureGenerale import construitFissureGenerale
|
||||
|
||||
O, OX, OY, OZ = triedreBase()
|
||||
|
||||
class cylindre_2(cylindre):
|
||||
"""problème de fissure plane sur cylindre hexa, fond de fissure complexe : polyline"""
|
||||
|
||||
@ -72,4 +68,3 @@ class cylindre_2(cylindre):
|
||||
Entity_Quad_Pyramid = 1158, \
|
||||
Entity_Quad_Penta = 384 \
|
||||
)
|
||||
|
||||
|
@ -18,6 +18,8 @@
|
||||
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
#
|
||||
|
||||
"""disque percé"""
|
||||
|
||||
import os
|
||||
from blocFissure import gmu
|
||||
|
||||
@ -45,4 +47,3 @@ referencesMaillageFissure = dict ( \
|
||||
Entity_Quad_Pyramid = 172, \
|
||||
Entity_Quad_Penta = 64 \
|
||||
)
|
||||
|
||||
|
@ -18,27 +18,21 @@
|
||||
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
#
|
||||
|
||||
import os
|
||||
from blocFissure import gmu
|
||||
from blocFissure.gmu.geomsmesh import geompy, smesh
|
||||
"""problème de fissure non plane, débouchante non normale"""
|
||||
|
||||
import math
|
||||
import GEOM
|
||||
import SALOMEDS
|
||||
import SMESH
|
||||
#import StdMeshers
|
||||
#import GHS3DPlugin
|
||||
#import NETGENPlugin
|
||||
import os
|
||||
import logging
|
||||
|
||||
from blocFissure import gmu
|
||||
from blocFissure.gmu.geomsmesh import geompy, smesh
|
||||
from blocFissure.gmu.fissureGenerique import fissureGenerique
|
||||
|
||||
from blocFissure.gmu.triedreBase import triedreBase
|
||||
from blocFissure.gmu.genereMeshCalculZoneDefaut import genereMeshCalculZoneDefaut
|
||||
from blocFissure.gmu.creeZoneDefautDansObjetSain import creeZoneDefautDansObjetSain
|
||||
from blocFissure.gmu.construitFissureGenerale import construitFissureGenerale
|
||||
|
||||
O, OX, OY, OZ = triedreBase()
|
||||
import GEOM
|
||||
import SALOMEDS
|
||||
import SMESH
|
||||
|
||||
class ellipse_1(fissureGenerique):
|
||||
"""problème de fissure non plane, débouchante non normale"""
|
||||
@ -53,10 +47,11 @@ class ellipse_1(fissureGenerique):
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
def genereMaillageSain(self, geometriesSaines, meshParams):
|
||||
logging.info("genereMaillageSain %s", self.nomCas)
|
||||
texte = "genereMaillageSain pour '{}'".format(self.nomCas)
|
||||
logging.info(texte)
|
||||
|
||||
([objetSain], status) = smesh.CreateMeshesFromMED(os.path.join(gmu.pathBloc, "materielCasTests", "boiteSaine.med"))
|
||||
smesh.SetName(objetSain.GetMesh(), 'objetSain')
|
||||
([objetSain], _) = smesh.CreateMeshesFromMED(os.path.join(gmu.pathBloc, "materielCasTests", "boiteSaine.med"))
|
||||
smesh.SetName(objetSain.GetMesh(), "{}_objetSain".format(self.nomProbleme))
|
||||
|
||||
return [objetSain, True] # True : maillage hexa
|
||||
|
||||
@ -69,13 +64,16 @@ class ellipse_1(fissureGenerique):
|
||||
convexe : optionnel, True : la face est convexe (vue de l'exterieur) sert si on ne donne pas de point interne
|
||||
pointIn_x : optionnel, coordonnée x d'un point dans le solide sain (pour orienter la face)
|
||||
"""
|
||||
logging.info("setParamShapeFissure %s", self.nomCas)
|
||||
texte = "genereMaillageSain pour '{}'".format(self.nomCas)
|
||||
logging.info(texte)
|
||||
self.shapeFissureParams = dict(lgInfluence = 50,
|
||||
rayonPipe = 20)
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
def genereShapeFissure( self, geometriesSaines, geomParams, shapeFissureParams):
|
||||
logging.info("genereShapeFissure %s", self.nomCas)
|
||||
"""Importe la géométrie de la fissure"""
|
||||
texte = "genereShapeFissure pour '{}'".format(self.nomCas)
|
||||
logging.info(texte)
|
||||
|
||||
lgInfluence = shapeFissureParams['lgInfluence']
|
||||
|
||||
@ -85,14 +83,16 @@ class ellipse_1(fissureGenerique):
|
||||
geompy.addToStudy( shellFiss, 'shellFiss' )
|
||||
geompy.addToStudyInFather( shellFiss, fondFiss, 'fondFiss' )
|
||||
|
||||
|
||||
coordsNoeudsFissure = genereMeshCalculZoneDefaut(shellFiss, 5 ,25)
|
||||
|
||||
centre = None
|
||||
|
||||
return [shellFiss, centre, lgInfluence, coordsNoeudsFissure, fondFiss]
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
def setParamMaillageFissure(self):
|
||||
texte = "setParamMaillageFissure pour '{}'".format(self.nomCas)
|
||||
logging.info(texte)
|
||||
self.maillageFissureParams = dict(nomRep = os.curdir,
|
||||
nomFicSain = self.nomCas,
|
||||
nomFicFissure = 'fissure_' + self.nomCas,
|
||||
@ -109,6 +109,8 @@ class ellipse_1(fissureGenerique):
|
||||
def genereMaillageFissure(self, geometriesSaines, maillagesSains,
|
||||
shapesFissure, shapeFissureParams,
|
||||
maillageFissureParams, elementsDefaut, step):
|
||||
texte = "genereMaillageFissure pour '{}'".format(self.nomCas)
|
||||
logging.info(texte)
|
||||
maillageFissure = construitFissureGenerale(maillagesSains,
|
||||
shapesFissure, shapeFissureParams,
|
||||
maillageFissureParams, elementsDefaut, step)
|
||||
@ -126,4 +128,3 @@ class ellipse_1(fissureGenerique):
|
||||
Entity_Quad_Pyramid = 199, \
|
||||
Entity_Quad_Penta = 120 \
|
||||
)
|
||||
|
||||
|
@ -18,27 +18,23 @@
|
||||
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
#
|
||||
|
||||
import os
|
||||
from blocFissure import gmu
|
||||
from blocFissure.gmu.geomsmesh import geompy, smesh
|
||||
"""problème de fissure non plane, débouchante non normale"""
|
||||
|
||||
import math
|
||||
import GEOM
|
||||
import SALOMEDS
|
||||
import SMESH
|
||||
#import StdMeshers
|
||||
#import GHS3DPlugin
|
||||
#import NETGENPlugin
|
||||
import os
|
||||
import logging
|
||||
|
||||
from .ellipse_1 import ellipse_1
|
||||
|
||||
from blocFissure.gmu.triedreBase import triedreBase
|
||||
from blocFissure import gmu
|
||||
from blocFissure.gmu.geomsmesh import geompy, smesh
|
||||
from blocFissure.gmu.fissureGenerique import fissureGenerique
|
||||
from blocFissure.gmu.genereMeshCalculZoneDefaut import genereMeshCalculZoneDefaut
|
||||
from blocFissure.gmu.creeZoneDefautDansObjetSain import creeZoneDefautDansObjetSain
|
||||
from blocFissure.gmu.construitFissureGenerale import construitFissureGenerale
|
||||
|
||||
O, OX, OY, OZ = triedreBase()
|
||||
import GEOM
|
||||
import SALOMEDS
|
||||
import SMESH
|
||||
|
||||
from .ellipse_1 import ellipse_1
|
||||
|
||||
class ellipse_2(ellipse_1):
|
||||
"""problème de fissure non plane, débouchante non normale"""
|
||||
@ -47,7 +43,9 @@ class ellipse_2(ellipse_1):
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
def genereShapeFissure( self, geometriesSaines, geomParams, shapeFissureParams):
|
||||
logging.info("genereShapeFissure %s", self.nomCas)
|
||||
"""Importe la géométrie de la fissure"""
|
||||
texte = "genereShapeFissure pour '{}'".format(self.nomCas)
|
||||
logging.info(texte)
|
||||
|
||||
lgInfluence = shapeFissureParams['lgInfluence']
|
||||
|
||||
@ -57,10 +55,10 @@ class ellipse_2(ellipse_1):
|
||||
geompy.addToStudy( shellFiss, 'shellFiss' )
|
||||
geompy.addToStudyInFather( shellFiss, fondFiss, 'fondFiss' )
|
||||
|
||||
|
||||
coordsNoeudsFissure = genereMeshCalculZoneDefaut(shellFiss, 5 ,25)
|
||||
|
||||
centre = None
|
||||
|
||||
return [shellFiss, centre, lgInfluence, coordsNoeudsFissure, fondFiss]
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
|
@ -18,27 +18,21 @@
|
||||
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
#
|
||||
|
||||
import os
|
||||
from blocFissure import gmu
|
||||
from blocFissure.gmu.geomsmesh import geompy, smesh
|
||||
"""problème de fissure plane coupant 3 faces (éprouvette), faces au débouché non planes, incidence presque normale"""
|
||||
|
||||
import math
|
||||
import GEOM
|
||||
import SALOMEDS
|
||||
import SMESH
|
||||
#import StdMeshers
|
||||
#import GHS3DPlugin
|
||||
#import NETGENPlugin
|
||||
import os
|
||||
import logging
|
||||
|
||||
from blocFissure import gmu
|
||||
from blocFissure.gmu.geomsmesh import geompy, smesh
|
||||
from blocFissure.gmu.fissureGenerique import fissureGenerique
|
||||
|
||||
from blocFissure.gmu.triedreBase import triedreBase
|
||||
from blocFissure.gmu.genereMeshCalculZoneDefaut import genereMeshCalculZoneDefaut
|
||||
from blocFissure.gmu.creeZoneDefautDansObjetSain import creeZoneDefautDansObjetSain
|
||||
from blocFissure.gmu.construitFissureGenerale import construitFissureGenerale
|
||||
|
||||
O, OX, OY, OZ = triedreBase()
|
||||
import GEOM
|
||||
import SALOMEDS
|
||||
import SMESH
|
||||
|
||||
class eprouvetteCourbe(fissureGenerique):
|
||||
"""problème de fissure plane coupant 3 faces (éprouvette), faces au débouché non planes, incidence presque normale"""
|
||||
@ -47,9 +41,10 @@ class eprouvetteCourbe(fissureGenerique):
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
def genereMaillageSain(self, geometriesSaines, meshParams):
|
||||
logging.info("genereMaillageSain %s", self.nomCas)
|
||||
texte = "genereMaillageSain pour '{}'".format(self.nomCas)
|
||||
logging.info(texte)
|
||||
|
||||
([objetSain], status) = 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')
|
||||
|
||||
return [objetSain, True] # True : maillage hexa
|
||||
@ -63,13 +58,16 @@ class eprouvetteCourbe(fissureGenerique):
|
||||
convexe : optionnel True : la face est convexe (vue de l'exterieur) sert si on ne donne pas de point interne
|
||||
pointIn_x : optionnel coordonnée x d'un point dans le solide sain (pour orienter la face)
|
||||
"""
|
||||
logging.info("setParamShapeFissure %s", self.nomCas)
|
||||
texte = "genereMaillageSain pour '{}'".format(self.nomCas)
|
||||
logging.info(texte)
|
||||
self.shapeFissureParams = dict(lgInfluence = 30,
|
||||
rayonPipe = 10)
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
def genereShapeFissure( self, geometriesSaines, geomParams, shapeFissureParams):
|
||||
logging.info("genereShapeFissure %s", self.nomCas)
|
||||
"""Importe la géométrie de la fissure"""
|
||||
texte = "genereShapeFissure pour '{}'".format(self.nomCas)
|
||||
logging.info(texte)
|
||||
|
||||
lgInfluence = shapeFissureParams['lgInfluence']
|
||||
|
||||
@ -79,14 +77,16 @@ class eprouvetteCourbe(fissureGenerique):
|
||||
geompy.addToStudy( shellFiss, 'shellFiss' )
|
||||
geompy.addToStudyInFather( shellFiss, fondFiss, 'fondFiss' )
|
||||
|
||||
|
||||
coordsNoeudsFissure = genereMeshCalculZoneDefaut(shellFiss, 5 ,10)
|
||||
|
||||
centre = None
|
||||
|
||||
return [shellFiss, centre, lgInfluence, coordsNoeudsFissure, fondFiss]
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
def setParamMaillageFissure(self):
|
||||
texte = "setParamMaillageFissure pour '{}'".format(self.nomCas)
|
||||
logging.info(texte)
|
||||
self.maillageFissureParams = dict(nomRep = os.curdir,
|
||||
nomFicSain = self.nomCas,
|
||||
nomFicFissure = 'fissure_' + self.nomCas,
|
||||
@ -103,6 +103,8 @@ class eprouvetteCourbe(fissureGenerique):
|
||||
def genereMaillageFissure(self, geometriesSaines, maillagesSains,
|
||||
shapesFissure, shapeFissureParams,
|
||||
maillageFissureParams, elementsDefaut, step):
|
||||
texte = "genereMaillageFissure pour '{}'".format(self.nomCas)
|
||||
logging.info(texte)
|
||||
maillageFissure = construitFissureGenerale(maillagesSains,
|
||||
shapesFissure, shapeFissureParams,
|
||||
maillageFissureParams, elementsDefaut, step)
|
||||
@ -120,4 +122,3 @@ class eprouvetteCourbe(fissureGenerique):
|
||||
Entity_Quad_Pyramid = 578, \
|
||||
Entity_Quad_Penta = 128 \
|
||||
)
|
||||
|
||||
|
@ -18,26 +18,22 @@
|
||||
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
#
|
||||
|
||||
import os
|
||||
from blocFissure import gmu
|
||||
from blocFissure.gmu.geomsmesh import geompy, smesh
|
||||
"""problème de fissure plane dans un tube"""
|
||||
|
||||
import math
|
||||
import GEOM
|
||||
import SALOMEDS
|
||||
import SMESH
|
||||
#import StdMeshers
|
||||
#import GHS3DPlugin
|
||||
#import NETGENPlugin
|
||||
import os
|
||||
import logging
|
||||
|
||||
from blocFissure import gmu
|
||||
from blocFissure.gmu.geomsmesh import geompy, smesh
|
||||
from blocFissure.gmu.fissureGenerique import fissureGenerique
|
||||
|
||||
from blocFissure.gmu.triedreBase import triedreBase
|
||||
from blocFissure.gmu.genereMeshCalculZoneDefaut import genereMeshCalculZoneDefaut
|
||||
from blocFissure.gmu.creeZoneDefautDansObjetSain import creeZoneDefautDansObjetSain
|
||||
from blocFissure.gmu.construitFissureGenerale import construitFissureGenerale
|
||||
|
||||
import GEOM
|
||||
import SALOMEDS
|
||||
import SMESH
|
||||
|
||||
class tube(fissureGenerique):
|
||||
"""problème de fissure plane dans un tube"""
|
||||
|
||||
@ -45,9 +41,10 @@ class tube(fissureGenerique):
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
def genereMaillageSain(self, geometriesSaines, meshParams):
|
||||
logging.info("genereMaillageSain pour '{}'".format(self.nomCas))
|
||||
texte = "genereMaillageSain pour '{}'".format(self.nomCas)
|
||||
logging.info(texte)
|
||||
|
||||
([objetSain], status) = smesh.CreateMeshesFromMED(os.path.join(gmu.pathBloc, "materielCasTests", "Tube.med"))
|
||||
([objetSain], _) = smesh.CreateMeshesFromMED(os.path.join(gmu.pathBloc, "materielCasTests", "Tube.med"))
|
||||
smesh.SetName(objetSain.GetMesh(), "{}_objetSain".format(self.nomProbleme))
|
||||
|
||||
return [objetSain, True] # True : maillage hexa
|
||||
@ -59,18 +56,19 @@ class tube(fissureGenerique):
|
||||
lgInfluence : distance autour de la shape de fissure a remailler (A ajuster selon le maillage)
|
||||
rayonPipe : le rayon du pile maillé en hexa autour du fond de fissure
|
||||
"""
|
||||
logging.info("setParamShapeFissure pour '{}'".format(self.nomCas))
|
||||
texte = "genereMaillageSain pour '{}'".format(self.nomCas)
|
||||
logging.info(texte)
|
||||
self.shapeFissureParams = dict(lgInfluence = 1.,
|
||||
rayonPipe = 0.05)
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
def genereShapeFissure( self, geometriesSaines, geomParams, shapeFissureParams):
|
||||
"""Importe la géométrie de la fissure"""
|
||||
logging.info("genereShapeFissure pour '{}'".format(self.nomCas))
|
||||
texte = "genereShapeFissure pour '{}'".format(self.nomCas)
|
||||
logging.info(texte)
|
||||
|
||||
lgInfluence = shapeFissureParams['lgInfluence']
|
||||
|
||||
|
||||
(_, shellFiss, _, l_groups, _) = geompy.ImportXAO(os.path.join(gmu.pathBloc, "materielCasTests", "TubeFiss.xao"))
|
||||
l_aux = list()
|
||||
for group in l_groups:
|
||||
@ -89,7 +87,8 @@ class tube(fissureGenerique):
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
def setParamMaillageFissure(self):
|
||||
logging.info("setParamMaillageFissure pour '{}'".format(self.nomCas))
|
||||
texte = "setParamMaillageFissure pour '{}'".format(self.nomCas)
|
||||
logging.info(texte)
|
||||
self.maillageFissureParams = dict(nomRep = os.curdir,
|
||||
nomFicSain = self.nomCas,
|
||||
nomFicFissure = 'fissure_' + self.nomCas,
|
||||
@ -106,7 +105,8 @@ class tube(fissureGenerique):
|
||||
def genereMaillageFissure(self, geometriesSaines, maillagesSains,
|
||||
shapesFissure, shapeFissureParams,
|
||||
maillageFissureParams, elementsDefaut, step):
|
||||
logging.info("genereMaillageFissure pour '{}'".format(self.nomCas))
|
||||
texte = "genereMaillageFissure pour '{}'".format(self.nomCas)
|
||||
logging.info(texte)
|
||||
maillageFissure = construitFissureGenerale(maillagesSains,
|
||||
shapesFissure, shapeFissureParams,
|
||||
maillageFissureParams, elementsDefaut, step)
|
||||
@ -124,4 +124,3 @@ class tube(fissureGenerique):
|
||||
Entity_Quad_Pyramid = 172, \
|
||||
Entity_Quad_Penta = 64 \
|
||||
)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user