From e66f809aa1443c6dfd10ceff4d1008dc472bcf69 Mon Sep 17 00:00:00 2001 From: GERALD NICOLAS Date: Tue, 26 Jan 2021 11:34:18 +0100 Subject: [PATCH] =?utf8?q?Mise=20=C3=A0=20jour=20des=20donn=C3=A9es=20des?= =?utf8?q?=20cas-test=20de=20cube?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/Tools/blocFissure/CasTests/cubeAngle.py | 18 +++++++++++------- src/Tools/blocFissure/CasTests/cubeCoin.py | 20 +++++++++++--------- src/Tools/blocFissure/CasTests/cubeMilieu.py | 20 +++++++++++--------- 3 files changed, 33 insertions(+), 25 deletions(-) diff --git a/src/Tools/blocFissure/CasTests/cubeAngle.py b/src/Tools/blocFissure/CasTests/cubeAngle.py index 456d125f2..32f701b01 100644 --- a/src/Tools/blocFissure/CasTests/cubeAngle.py +++ b/src/Tools/blocFissure/CasTests/cubeAngle.py @@ -47,10 +47,10 @@ class cubeAngle(fissureGenerique): # --------------------------------------------------------------------------- def genereMaillageSain(self, geometriesSaines, meshParams): - logging.info("genereMaillageSain %s", self.nomCas) + logging.info("genereMaillageSain pour '{}'".format(self.nomCas)) - ([objetSain], status) = smesh.CreateMeshesFromMED(os.path.join(gmu.pathBloc, 'materielCasTests/CubeAngle.med')) - smesh.SetName(objetSain.GetMesh(), 'objetSain') + ([objetSain], status) = 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,17 +61,18 @@ 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 %s", self.nomCas) + logging.info("setParamShapeFissure pour '{}'".format(self.nomCas)) self.shapeFissureParams = dict(lgInfluence = 20, rayonPipe = 10) # --------------------------------------------------------------------------- def genereShapeFissure( self, geometriesSaines, geomParams, shapeFissureParams): - logging.info("genereShapeFissure %s", self.nomCas) + """Importe la géométrie de la fissure""" + logging.info("genereShapeFissure pour '{}'".format(self.nomCas)) lgInfluence = shapeFissureParams['lgInfluence'] - shellFiss = geompy.ImportBREP(os.path.join(gmu.pathBloc, "materielCasTests/CubeAngleFiss.brep")) + shellFiss = geompy.ImportBREP(os.path.join(gmu.pathBloc, "materielCasTests", "CubeAngleFiss.brep")) fondFiss = geompy.CreateGroup(shellFiss, geompy.ShapeType["EDGE"]) geompy.UnionIDs(fondFiss, [3]) geompy.addToStudy( shellFiss, 'shellFiss' ) @@ -81,11 +82,13 @@ class cubeAngle(fissureGenerique): coordsNoeudsFissure = genereMeshCalculZoneDefaut(shellFiss, 5 ,10) centre = None + return [shellFiss, centre, lgInfluence, coordsNoeudsFissure, fondFiss] # --------------------------------------------------------------------------- def setParamMaillageFissure(self): - self.maillageFissureParams = dict(nomRep = '.', + logging.info("setParamMaillageFissure pour '{}'".format(self.nomCas)) + self.maillageFissureParams = dict(nomRep = os.curdir, nomFicSain = self.nomCas, nomFicFissure = 'fissure_' + self.nomCas, nbsegRad = 5, @@ -101,6 +104,7 @@ class cubeAngle(fissureGenerique): def genereMaillageFissure(self, geometriesSaines, maillagesSains, shapesFissure, shapeFissureParams, maillageFissureParams, elementsDefaut, step): + logging.info("genereMaillageFissure pour '{}'".format(self.nomCas)) maillageFissure = construitFissureGenerale(maillagesSains, shapesFissure, shapeFissureParams, maillageFissureParams, elementsDefaut, step) diff --git a/src/Tools/blocFissure/CasTests/cubeCoin.py b/src/Tools/blocFissure/CasTests/cubeCoin.py index d9af4b5ec..821145c33 100644 --- a/src/Tools/blocFissure/CasTests/cubeCoin.py +++ b/src/Tools/blocFissure/CasTests/cubeCoin.py @@ -24,7 +24,7 @@ from blocFissure import gmu dicoParams = dict(nomCas = "cubeCoin", maillageSain = os.path.join(gmu.pathBloc, "materielCasTests", "cubeFin.med"), brepFaceFissure = os.path.join(gmu.pathBloc, "materielCasTests", "cubeFin_Coin.brep"), - edgeFissIds = [6], + edgeFissIds = [3], lgInfluence = 50, meshBrep = (5,10), rayonPipe = 10, @@ -35,12 +35,14 @@ dicoParams = dict(nomCas = "cubeCoin", # --------------------------------------------------------------------------- -referencesMaillageFissure = dict(Entity_Quad_Pyramid = 0, - Entity_Quad_Triangle = 0, - Entity_Quad_Edge = 0, - Entity_Quad_Penta = 0, - Entity_Quad_Hexa = 0, - Entity_Node = 0, - Entity_Quad_Tetra = 0, - Entity_Quad_Quadrangle = 0) +referencesMaillageFissure = dict( \ + Entity_Quad_Quadrangle = 2740, \ + Entity_Quad_Hexa = 7420, \ + Entity_Node = 46394, \ + Entity_Quad_Edge = 323, \ + Entity_Quad_Triangle = 486, \ + Entity_Quad_Tetra = 8512, \ + Entity_Quad_Pyramid = 460, \ + Entity_Quad_Penta = 80 \ + ) diff --git a/src/Tools/blocFissure/CasTests/cubeMilieu.py b/src/Tools/blocFissure/CasTests/cubeMilieu.py index fa5a6c42c..b276d6b30 100644 --- a/src/Tools/blocFissure/CasTests/cubeMilieu.py +++ b/src/Tools/blocFissure/CasTests/cubeMilieu.py @@ -24,7 +24,7 @@ from blocFissure import gmu dicoParams = dict(nomCas = "cubeMilieu", maillageSain = os.path.join(gmu.pathBloc, "materielCasTests", "cubeFin.med"), brepFaceFissure = os.path.join(gmu.pathBloc, "materielCasTests", "cubeFin_Milieu.brep"), - edgeFissIds = [6], + edgeFissIds = [3], lgInfluence = 50, meshBrep = (5,10), rayonPipe = 10, @@ -35,12 +35,14 @@ dicoParams = dict(nomCas = "cubeMilieu", # --------------------------------------------------------------------------- -referencesMaillageFissure = dict(Entity_Quad_Pyramid = 0, - Entity_Quad_Triangle = 0, - Entity_Quad_Edge = 0, - Entity_Quad_Penta = 0, - Entity_Quad_Hexa = 0, - Entity_Node = 0, - Entity_Quad_Tetra = 0, - Entity_Quad_Quadrangle = 0) +referencesMaillageFissure = dict( \ + Entity_Quad_Quadrangle = 3140, \ + Entity_Quad_Hexa = 7120, \ + Entity_Node = 61414, \ + Entity_Quad_Edge = 346, \ + Entity_Quad_Triangle = 818, \ + Entity_Quad_Tetra = 19117, \ + Entity_Quad_Pyramid = 990, \ + Entity_Quad_Penta = 230 \ + ) -- 2.39.2