From: GERALD NICOLAS Date: Tue, 26 Jan 2021 16:00:07 +0000 (+0100) Subject: mise à jour des cas-tests X-Git-Tag: V9_7_0a1~13^2~44 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=65d5c162a53ab3e5dde959524035211c9da8f194;p=modules%2Fsmesh.git mise à jour des cas-tests --- diff --git a/src/Tools/blocFissure/CasTests/cylindre_2.py b/src/Tools/blocFissure/CasTests/cylindre_2.py index 246145709..9b94dc3f2 100644 --- a/src/Tools/blocFissure/CasTests/cylindre_2.py +++ b/src/Tools/blocFissure/CasTests/cylindre_2.py @@ -63,13 +63,13 @@ class cylindre_2(cylindre): # --------------------------------------------------------------------------- def setReferencesMaillageFissure(self): self.referencesMaillageFissure = dict( \ - Entity_Quad_Pyramid = 1158, Entity_Quad_Quadrangle = 7028, \ Entity_Quad_Hexa = 18366, \ Entity_Node = 105035, \ Entity_Quad_Edge = 735, \ Entity_Quad_Triangle = 1056, \ Entity_Quad_Tetra = 16305, \ + Entity_Quad_Pyramid = 1158, \ Entity_Quad_Penta = 384 \ ) diff --git a/src/Tools/blocFissure/CasTests/disquePerce.py b/src/Tools/blocFissure/CasTests/disquePerce.py index 1f821426b..34211ce29 100644 --- a/src/Tools/blocFissure/CasTests/disquePerce.py +++ b/src/Tools/blocFissure/CasTests/disquePerce.py @@ -35,12 +35,14 @@ dicoParams = dict(nomCas = 'disque', # --------------------------------------------------------------------------- -referencesMaillageFissure = dict(Entity_Quad_Pyramid = 610, - Entity_Quad_Triangle = 1284, - Entity_Quad_Edge = 393, - Entity_Quad_Penta = 592, - Entity_Quad_Hexa = 6952, - Entity_Node = 51119, - Entity_Quad_Tetra = 11672, - Entity_Quad_Quadrangle = 3000) +referencesMaillageFissure = dict ( \ + Entity_Quad_Quadrangle = 1630, \ + Entity_Quad_Hexa = 3523, \ + Entity_Node = 18874, \ + Entity_Quad_Edge = 261, \ + Entity_Quad_Triangle = 190, \ + Entity_Quad_Tetra = 1322, \ + Entity_Quad_Pyramid = 172, \ + Entity_Quad_Penta = 64 \ + ) diff --git a/src/Tools/blocFissure/CasTests/faceGauche_2.py b/src/Tools/blocFissure/CasTests/faceGauche_2.py index d16921f50..bbddb5852 100644 --- a/src/Tools/blocFissure/CasTests/faceGauche_2.py +++ b/src/Tools/blocFissure/CasTests/faceGauche_2.py @@ -111,13 +111,13 @@ class faceGauche_2(fissureGenerique): # --------------------------------------------------------------------------- def setReferencesMaillageFissure(self): self.referencesMaillageFissure = dict( \ - Entity_Quad_Pyramid = 859, - Entity_Quad_Triangle = 634, - Entity_Quad_Edge = 323, - Entity_Quad_Penta = 288, - Entity_Quad_Hexa = 3435, - Entity_Node = 44095, - Entity_Quad_Tetra = 18400, - Entity_Quad_Quadrangle = 2542 + Entity_Quad_Quadrangle = 2542, \ + Entity_Quad_Hexa = 3435, \ + Entity_Node = 44095, \ + Entity_Quad_Edge = 323, \ + Entity_Quad_Triangle = 634, \ + Entity_Quad_Tetra = 18400, \ + Entity_Quad_Pyramid = 859, \ + Entity_Quad_Penta = 288 \ ) diff --git a/src/Tools/blocFissure/CasTests/vis_1.py b/src/Tools/blocFissure/CasTests/vis_1.py index 4ddd3715b..164fc752d 100644 --- a/src/Tools/blocFissure/CasTests/vis_1.py +++ b/src/Tools/blocFissure/CasTests/vis_1.py @@ -47,47 +47,53 @@ class vis_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/visSain.med")) - smesh.SetName(objetSain.GetMesh(), 'objetSain') + ([objetSain], _) = smesh.CreateMeshesFromMED(os.path.join(gmu.pathBloc, "materielCasTests", "visSain.med")) + smesh.SetName(objetSain.GetMesh(), "{}_objetSain".format(self.nomProbleme)) return [objetSain, True] # True : maillage hexa # --------------------------------------------------------------------------- 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 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 = "setParamShapeFissure pour '{}'".format(self.nomCas) + logging.info(texte) self.shapeFissureParams = dict(lgInfluence = 0.6, rayonPipe = 0.1) # --------------------------------------------------------------------------- def genereShapeFissure( self, geometriesSaines, geomParams, shapeFissureParams): - logging.info("genereShapeFissure %s", self.nomCas) + """Importe la géométrie de la fissure et crée le groupe du fond de la fissure""" + texte = "genereShapeFissure pour '{}'".format(self.nomCas) + logging.info(texte) lgInfluence = shapeFissureParams['lgInfluence'] - shellFiss = geompy.ImportBREP(os.path.join(gmu.pathBloc, "materielCasTests/visFiss.brep")) + shellFiss = geompy.ImportBREP(os.path.join(gmu.pathBloc, "materielCasTests", "visFiss.brep")) fondFiss = geompy.CreateGroup(shellFiss, geompy.ShapeType["EDGE"]) - geompy.UnionIDs(fondFiss, [6, 8]) + geompy.UnionIDs(fondFiss, [6, 8, 3]) geompy.addToStudy( shellFiss, 'shellFiss' ) geompy.addToStudyInFather( shellFiss, fondFiss, 'fondFiss' ) - coordsNoeudsFissure = genereMeshCalculZoneDefaut(shellFiss, 0.1 ,0.2) centre = None + return [shellFiss, centre, lgInfluence, coordsNoeudsFissure, fondFiss] # --------------------------------------------------------------------------- def setParamMaillageFissure(self): - self.maillageFissureParams = dict(nomRep = '.', + texte = "setParamMaillageFissure pour '{}'".format(self.nomCas) + logging.info(texte) + self.maillageFissureParams = dict(nomRep = os.curdir, nomFicSain = self.nomCas, nomFicFissure = 'fissure_' + self.nomCas, nbsegRad = 5, @@ -103,6 +109,8 @@ class vis_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) @@ -110,12 +118,14 @@ class vis_1(fissureGenerique): # --------------------------------------------------------------------------- def setReferencesMaillageFissure(self): - self.referencesMaillageFissure = dict(Entity_Quad_Pyramid = 1284, - Entity_Quad_Triangle = 2336, - Entity_Quad_Edge = 758, - Entity_Quad_Penta = 984, - Entity_Quad_Hexa = 6416, - Entity_Node = 85673, - Entity_Quad_Tetra = 35990, - Entity_Quad_Quadrangle = 4285) + self.referencesMaillageFissure = dict( \ + Entity_Quad_Quadrangle = 4285 ,\ + Entity_Quad_Hexa = 6416, \ + Entity_Node = 85673, \ + Entity_Quad_Edge = 758, \ + Entity_Quad_Triangle = 2336, \ + Entity_Quad_Tetra = 35990, \ + Entity_Quad_Pyramid = 1284, \ + Entity_Quad_Penta = 984 \ + )