From: GERALD NICOLAS Date: Fri, 22 Jan 2021 17:31:51 +0000 (+0100) Subject: Mise à la norme python des fichiers X-Git-Tag: V9_7_0a1~13^2~53 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=cd96b6d3d47e89f57ba4a83784a5843cd4fb9e18;p=modules%2Fsmesh.git Mise à la norme python des fichiers --- diff --git a/src/Tools/blocFissure/CasTests/cubeCoin.py b/src/Tools/blocFissure/CasTests/cubeCoin.py index deed87e4e..d9af4b5ec 100644 --- a/src/Tools/blocFissure/CasTests/cubeCoin.py +++ b/src/Tools/blocFissure/CasTests/cubeCoin.py @@ -21,9 +21,9 @@ import os 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"), +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], lgInfluence = 50, meshBrep = (5,10), diff --git a/src/Tools/blocFissure/CasTests/cubeMilieu.py b/src/Tools/blocFissure/CasTests/cubeMilieu.py index f615c8852..fa5a6c42c 100644 --- a/src/Tools/blocFissure/CasTests/cubeMilieu.py +++ b/src/Tools/blocFissure/CasTests/cubeMilieu.py @@ -21,9 +21,9 @@ import os 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"), +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], lgInfluence = 50, meshBrep = (5,10), diff --git a/src/Tools/blocFissure/CasTests/cubeTransverse.py b/src/Tools/blocFissure/CasTests/cubeTransverse.py index c3b45860d..8ddb5bee6 100644 --- a/src/Tools/blocFissure/CasTests/cubeTransverse.py +++ b/src/Tools/blocFissure/CasTests/cubeTransverse.py @@ -21,9 +21,9 @@ import os from blocFissure import gmu -dicoParams = dict(nomCas = 'cubeTransverse', - maillageSain = os.path.join(gmu.pathBloc, 'materielCasTests/cubeFin.med'), - brepFaceFissure = os.path.join(gmu.pathBloc, "materielCasTests/cubeFin_Transverse.brep"), +dicoParams = dict(nomCas = "cubeTransverse", + maillageSain = os.path.join(gmu.pathBloc, "materielCasTests", "cubeFin.med"), + brepFaceFissure = os.path.join(gmu.pathBloc, "materielCasTests", "cubeFin_Transverse.brep"), edgeFissIds = [6], lgInfluence = 50, meshBrep = (5,10), diff --git a/src/Tools/blocFissure/CasTests/cylindre.py b/src/Tools/blocFissure/CasTests/cylindre.py index 1e9b2651c..5b72caa36 100644 --- a/src/Tools/blocFissure/CasTests/cylindre.py +++ b/src/Tools/blocFissure/CasTests/cylindre.py @@ -53,7 +53,7 @@ class cylindre(fissureGenerique): """ logging.info("genereMaillageSain %s", self.nomCas) - ([objetSain], status) = smesh.CreateMeshesFromMED(os.path.join(gmu.pathBloc, "materielCasTests/CylindreSain.med")) + ([objetSain], status) = smesh.CreateMeshesFromMED(os.path.join(gmu.pathBloc, "materielCasTests", "CylindreSain.med")) smesh.SetName(objetSain.GetMesh(), 'objetSain') return [objetSain, True] # True : maillage hexa @@ -75,7 +75,7 @@ class cylindre(fissureGenerique): lgInfluence = shapeFissureParams['lgInfluence'] - shellFiss = geompy.ImportBREP(os.path.join(gmu.pathBloc, "materielCasTests/FissInCylindre2.brep")) + shellFiss = geompy.ImportBREP(os.path.join(gmu.pathBloc, "materielCasTests", "FissInCylindre2.brep")) fondFiss = geompy.CreateGroup(shellFiss, geompy.ShapeType["EDGE"]) geompy.UnionIDs(fondFiss, [6]) geompy.addToStudy( shellFiss, 'shellFiss' ) diff --git a/src/Tools/blocFissure/CasTests/cylindre_2.py b/src/Tools/blocFissure/CasTests/cylindre_2.py index 517d1d442..241ff0ce8 100644 --- a/src/Tools/blocFissure/CasTests/cylindre_2.py +++ b/src/Tools/blocFissure/CasTests/cylindre_2.py @@ -48,7 +48,7 @@ class cylindre_2(cylindre): lgInfluence = shapeFissureParams['lgInfluence'] - shellFiss = geompy.ImportBREP(os.path.join(gmu.pathBloc, "materielCasTests/FissInCylindre.brep")) + shellFiss = geompy.ImportBREP(os.path.join(gmu.pathBloc, "materielCasTests", "FissInCylindre.brep")) fondFiss = geompy.CreateGroup(shellFiss, geompy.ShapeType["EDGE"]) geompy.UnionIDs(fondFiss, [3]) geompy.addToStudy( shellFiss, 'shellFiss' ) diff --git a/src/Tools/blocFissure/CasTests/disquePerce.py b/src/Tools/blocFissure/CasTests/disquePerce.py index b0ceb9931..1f821426b 100644 --- a/src/Tools/blocFissure/CasTests/disquePerce.py +++ b/src/Tools/blocFissure/CasTests/disquePerce.py @@ -22,8 +22,8 @@ import os from blocFissure import gmu dicoParams = dict(nomCas = 'disque', - maillageSain = os.path.join(gmu.pathBloc, 'materielCasTests/disque.med'), - brepFaceFissure = os.path.join(gmu.pathBloc, "materielCasTests/ellipse_disque.brep"), + maillageSain = os.path.join(gmu.pathBloc, "materielCasTests", "disque.med"), + brepFaceFissure = os.path.join(gmu.pathBloc, "materielCasTests", "ellipse_disque.brep"), edgeFissIds = [3], lgInfluence = 10, meshBrep = (0.5,2.5), diff --git a/src/Tools/blocFissure/CasTests/ellipse_1.py b/src/Tools/blocFissure/CasTests/ellipse_1.py index ef4ca730a..2d19901d5 100644 --- a/src/Tools/blocFissure/CasTests/ellipse_1.py +++ b/src/Tools/blocFissure/CasTests/ellipse_1.py @@ -55,7 +55,7 @@ class ellipse_1(fissureGenerique): def genereMaillageSain(self, geometriesSaines, meshParams): logging.info("genereMaillageSain %s", self.nomCas) - ([objetSain], status) = smesh.CreateMeshesFromMED(os.path.join(gmu.pathBloc, "materielCasTests/boiteSaine.med")) + ([objetSain], status) = smesh.CreateMeshesFromMED(os.path.join(gmu.pathBloc, "materielCasTests", "boiteSaine.med")) smesh.SetName(objetSain.GetMesh(), 'objetSain') return [objetSain, True] # True : maillage hexa @@ -79,7 +79,7 @@ class ellipse_1(fissureGenerique): lgInfluence = shapeFissureParams['lgInfluence'] - shellFiss = geompy.ImportBREP(os.path.join(gmu.pathBloc, "materielCasTests/ellipse1.brep")) + shellFiss = geompy.ImportBREP(os.path.join(gmu.pathBloc, "materielCasTests", "ellipse1.brep")) fondFiss = geompy.CreateGroup(shellFiss, geompy.ShapeType["EDGE"]) geompy.UnionIDs(fondFiss, [3]) geompy.addToStudy( shellFiss, 'shellFiss' ) diff --git a/src/Tools/blocFissure/CasTests/ellipse_2.py b/src/Tools/blocFissure/CasTests/ellipse_2.py index 1b998477f..557a8d678 100644 --- a/src/Tools/blocFissure/CasTests/ellipse_2.py +++ b/src/Tools/blocFissure/CasTests/ellipse_2.py @@ -51,7 +51,7 @@ class ellipse_2(ellipse_1): lgInfluence = shapeFissureParams['lgInfluence'] - shellFiss = geompy.ImportBREP(os.path.join(gmu.pathBloc, "materielCasTests/ellipse1_pb.brep")) + shellFiss = geompy.ImportBREP(os.path.join(gmu.pathBloc, "materielCasTests", "ellipse1_pb.brep")) fondFiss = geompy.CreateGroup(shellFiss, geompy.ShapeType["EDGE"]) geompy.UnionIDs(fondFiss, [3]) geompy.addToStudy( shellFiss, 'shellFiss' ) diff --git a/src/Tools/blocFissure/CasTests/eprouvetteCourbe.py b/src/Tools/blocFissure/CasTests/eprouvetteCourbe.py index 36bde0467..c9f1a2403 100644 --- a/src/Tools/blocFissure/CasTests/eprouvetteCourbe.py +++ b/src/Tools/blocFissure/CasTests/eprouvetteCourbe.py @@ -49,7 +49,7 @@ class eprouvetteCourbe(fissureGenerique): def genereMaillageSain(self, geometriesSaines, meshParams): logging.info("genereMaillageSain %s", self.nomCas) - ([objetSain], status) = smesh.CreateMeshesFromMED(os.path.join(gmu.pathBloc, "materielCasTests/EprouvetteCourbe.med")) + ([objetSain], status) = smesh.CreateMeshesFromMED(os.path.join(gmu.pathBloc, "materielCasTests", "EprouvetteCourbe.med")) smesh.SetName(objetSain.GetMesh(), 'objetSain') return [objetSain, True] # True : maillage hexa @@ -73,7 +73,7 @@ class eprouvetteCourbe(fissureGenerique): lgInfluence = shapeFissureParams['lgInfluence'] - shellFiss = geompy.ImportBREP(os.path.join(gmu.pathBloc, "materielCasTests/EprouvetteCourbeFiss.brep")) + shellFiss = geompy.ImportBREP(os.path.join(gmu.pathBloc, "materielCasTests", "EprouvetteCourbeFiss.brep")) fondFiss = geompy.CreateGroup(shellFiss, geompy.ShapeType["EDGE"]) geompy.UnionIDs(fondFiss, [8]) geompy.addToStudy( shellFiss, 'shellFiss' ) diff --git a/src/Tools/blocFissure/CasTests/eprouvetteDroite.py b/src/Tools/blocFissure/CasTests/eprouvetteDroite.py index 1ecb81162..0be566d34 100644 --- a/src/Tools/blocFissure/CasTests/eprouvetteDroite.py +++ b/src/Tools/blocFissure/CasTests/eprouvetteDroite.py @@ -52,7 +52,7 @@ class eprouvetteDroite(fissureGenerique): def genereMaillageSain(self, geometriesSaines, meshParams): logging.info("genereMaillageSain %s", self.nomCas) - ([objetSain], status) = smesh.CreateMeshesFromMED(os.path.join(gmu.pathBloc, "materielCasTests/eprouvetteDroite.med")) + ([objetSain], status) = smesh.CreateMeshesFromMED(os.path.join(gmu.pathBloc, "materielCasTests", "eprouvetteDroite.med")) smesh.SetName(objetSain.GetMesh(), 'objetSain') return [objetSain, True] # True : maillage hexa @@ -77,7 +77,7 @@ class eprouvetteDroite(fissureGenerique): lgInfluence = shapeFissureParams['lgInfluence'] - shellFiss = geompy.ImportBREP(os.path.join(gmu.pathBloc, "materielCasTests/EprouvetteDroiteFiss_1.brep")) + shellFiss = geompy.ImportBREP(os.path.join(gmu.pathBloc, "materielCasTests", "EprouvetteDroiteFiss_1.brep")) fondFiss = geompy.CreateGroup(shellFiss, geompy.ShapeType["EDGE"]) geompy.UnionIDs(fondFiss, [8]) geompy.addToStudy( shellFiss, 'shellFiss' ) diff --git a/src/Tools/blocFissure/CasTests/eprouvetteDroite_2.py b/src/Tools/blocFissure/CasTests/eprouvetteDroite_2.py index fc6c04d4c..1db76fcbc 100644 --- a/src/Tools/blocFissure/CasTests/eprouvetteDroite_2.py +++ b/src/Tools/blocFissure/CasTests/eprouvetteDroite_2.py @@ -51,7 +51,7 @@ class eprouvetteDroite_2(eprouvetteDroite): lgInfluence = shapeFissureParams['lgInfluence'] - shellFiss = geompy.ImportBREP(os.path.join(gmu.pathBloc, "materielCasTests/EprouvetteDroiteFiss_2.brep")) + shellFiss = geompy.ImportBREP(os.path.join(gmu.pathBloc, "materielCasTests", "EprouvetteDroiteFiss_2.brep")) fondFiss = geompy.CreateGroup(shellFiss, geompy.ShapeType["EDGE"]) geompy.UnionIDs(fondFiss, [10]) geompy.addToStudy( shellFiss, 'shellFiss' ) diff --git a/src/Tools/blocFissure/CasTests/faceGauche.py b/src/Tools/blocFissure/CasTests/faceGauche.py index 1be9de5c4..0736bdb54 100644 --- a/src/Tools/blocFissure/CasTests/faceGauche.py +++ b/src/Tools/blocFissure/CasTests/faceGauche.py @@ -49,7 +49,7 @@ class faceGauche(fissureGenerique): def genereMaillageSain(self, geometriesSaines, meshParams): logging.info("genereMaillageSain %s", self.nomCas) - ([objetSain], status) = smesh.CreateMeshesFromMED(os.path.join(gmu.pathBloc, "materielCasTests/faceGaucheSain.med")) + ([objetSain], status) = smesh.CreateMeshesFromMED(os.path.join(gmu.pathBloc, "materielCasTests", "faceGaucheSain.med")) smesh.SetName(objetSain.GetMesh(), 'objetSain') return [objetSain, True] # True : maillage hexa @@ -73,7 +73,7 @@ class faceGauche(fissureGenerique): lgInfluence = shapeFissureParams['lgInfluence'] - shellFiss = geompy.ImportBREP(os.path.join(gmu.pathBloc, "materielCasTests/faceGaucheFiss.brep")) + shellFiss = geompy.ImportBREP(os.path.join(gmu.pathBloc, "materielCasTests", "faceGaucheFiss.brep")) fondFiss = geompy.CreateGroup(shellFiss, geompy.ShapeType["EDGE"]) geompy.UnionIDs(fondFiss, [6]) geompy.addToStudy( shellFiss, 'shellFiss' ) diff --git a/src/Tools/blocFissure/CasTests/faceGauche_2.py b/src/Tools/blocFissure/CasTests/faceGauche_2.py index 8ebf74361..4bcc36494 100644 --- a/src/Tools/blocFissure/CasTests/faceGauche_2.py +++ b/src/Tools/blocFissure/CasTests/faceGauche_2.py @@ -50,7 +50,7 @@ class faceGauche_2(fissureGenerique): def genereMaillageSain(self, geometriesSaines, meshParams): logging.info("genereMaillageSain %s", self.nomCas) - ([objetSain], status) = smesh.CreateMeshesFromMED(os.path.join(gmu.pathBloc, "materielCasTests/boiteSaine.med")) + ([objetSain], status) = smesh.CreateMeshesFromMED(os.path.join(gmu.pathBloc, "materielCasTests", "boiteSaine.med")) smesh.SetName(objetSain.GetMesh(), 'objetSain') return [objetSain, True] # True : maillage hexa @@ -74,7 +74,7 @@ class faceGauche_2(fissureGenerique): lgInfluence = shapeFissureParams['lgInfluence'] - shellFiss = geompy.ImportBREP(os.path.join(gmu.pathBloc, "materielCasTests/faceGauche2FissCoupe.brep")) + shellFiss = geompy.ImportBREP(os.path.join(gmu.pathBloc, "materielCasTests", "faceGauche2FissCoupe.brep")) fondFiss = geompy.CreateGroup(shellFiss, geompy.ShapeType["EDGE"]) geompy.UnionIDs(fondFiss, [14, 9]) geompy.addToStudy( shellFiss, 'shellFiss' ) diff --git a/src/Tools/blocFissure/exemple.py b/src/Tools/blocFissure/exemple.py index ba279c38b..1cc04aa27 100644 --- a/src/Tools/blocFissure/exemple.py +++ b/src/Tools/blocFissure/exemple.py @@ -26,9 +26,9 @@ initLog.setDebug() from blocFissure.gmu.casStandard import casStandard -dicoParams = dict(nomCas = 'angleCube', - maillageSain = os.path.join(gmu.pathBloc, 'materielCasTests/CubeAngle.med'), - brepFaceFissure = os.path.join(gmu.pathBloc, "materielCasTests/CubeAngleFiss.brep"), +dicoParams = dict(nomCas = "angleCube", + maillageSain = os.path.join(gmu.pathBloc, "materielCasTests", "CubeAngle.med"), + brepFaceFissure = os.path.join(gmu.pathBloc, "materielCasTests", "CubeAngleFiss.brep"), edgeFissIds = [4], lgInfluence = 20, meshBrep = (5,10), diff --git a/src/Tools/blocFissure/ihm/fissureGenerale_plugin.py b/src/Tools/blocFissure/ihm/fissureGenerale_plugin.py index 2e20dd2ed..875270b34 100644 --- a/src/Tools/blocFissure/ihm/fissureGenerale_plugin.py +++ b/src/Tools/blocFissure/ihm/fissureGenerale_plugin.py @@ -76,9 +76,9 @@ def fissureGeneraleDlg(context): def initDefaut(self): self.defaut = dict( \ - nomCas = 'angleCube', \ - maillageSain = os.path.join(gmu.pathBloc, 'materielCasTests/CubeAngle.med'), \ - brepFaceFissure = os.path.join(gmu.pathBloc, "materielCasTests/CubeAngleFiss.brep"), \ + nomCas = "angleCube", \ + maillageSain = os.path.join(gmu.pathBloc, "materielCasTests", "CubeAngle.med"), \ + brepFaceFissure = os.path.join(gmu.pathBloc, "materielCasTests", "CubeAngleFiss.brep"), \ edgeFissIds = [3], \ lgInfluence = 20, \ meshBrep = (5,10), \ @@ -88,8 +88,8 @@ def fissureGeneraleDlg(context): nbSegCercle = 32, \ areteFaceFissure = 10, \ areteVives = 0, \ - reptrav = '.', \ - nomres = 'maillage_avec_fissure', \ + reptrav = os.curdir, \ + nomres = "maillage_avec_fissure", \ verbosite = 0) @@ -189,7 +189,7 @@ def fissureGeneraleDlg(context): return incomplet def fileDefault(self): - filedef = os.path.expanduser("~/.config/salome/dialogFissureGenerale.dic") + filedef = os.path.expanduser( os.path.join(os.environ["HOME"],".config", "salome", "dialogFissureGenerale.dic") ) print(filedef) return filedef @@ -199,8 +199,8 @@ def fissureGeneraleDlg(context): f.write(str(dico)) def genereExemples(self): - maillageSain = os.path.join(gmu.pathBloc, 'materielCasTests/CubeAngle.med') - brepFaceFissure = os.path.join(gmu.pathBloc, "materielCasTests/CubeAngleFiss.brep") + maillageSain = os.path.join(gmu.pathBloc, "materielCasTests", "CubeAngle.med") + brepFaceFissure = os.path.join(gmu.pathBloc, "materielCasTests", "CubeAngleFiss.brep") if (os.path.exists(maillageSain) and os.path.exists(brepFaceFissure)): self.initDialog(self.defaut) else: