Salome HOME
Mise à la norme python des fichiers
authorGERALD NICOLAS <D68518@dsp0864451.atlas.edf.fr>
Fri, 22 Jan 2021 17:31:51 +0000 (18:31 +0100)
committerGERALD NICOLAS <D68518@dsp0864451.atlas.edf.fr>
Fri, 22 Jan 2021 17:31:51 +0000 (18:31 +0100)
15 files changed:
src/Tools/blocFissure/CasTests/cubeCoin.py
src/Tools/blocFissure/CasTests/cubeMilieu.py
src/Tools/blocFissure/CasTests/cubeTransverse.py
src/Tools/blocFissure/CasTests/cylindre.py
src/Tools/blocFissure/CasTests/cylindre_2.py
src/Tools/blocFissure/CasTests/disquePerce.py
src/Tools/blocFissure/CasTests/ellipse_1.py
src/Tools/blocFissure/CasTests/ellipse_2.py
src/Tools/blocFissure/CasTests/eprouvetteCourbe.py
src/Tools/blocFissure/CasTests/eprouvetteDroite.py
src/Tools/blocFissure/CasTests/eprouvetteDroite_2.py
src/Tools/blocFissure/CasTests/faceGauche.py
src/Tools/blocFissure/CasTests/faceGauche_2.py
src/Tools/blocFissure/exemple.py
src/Tools/blocFissure/ihm/fissureGenerale_plugin.py

index deed87e4e86d098b3c8e9bf94f3ef52918fd8c29..d9af4b5ec90cc81284fe4fa6ac31d69d39113fe5 100644 (file)
@@ -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),
index f615c8852e6c1404006b95ab4ce25610582b94cd..fa5a6c42cd133086ceccbfcb4be0202f26d58c54 100644 (file)
@@ -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),
index c3b45860d7f09bbbe8580441415b4b41050f7375..8ddb5bee67c36961e706e8194bf5d4d3f54fe02c 100644 (file)
@@ -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),
index 1e9b2651c33f47981b32d1858f9c49053b23a3b5..5b72caa36da72da00988bf4fa5bdb1efcc372d14 100644 (file)
@@ -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' )
index 517d1d442a458b4794c85085d878cce3d2c58ff7..241ff0ce88b34bb56a8d1fd90c2b595aec316986 100644 (file)
@@ -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' )
index b0ceb9931ba6adabf94f4003adc54e8d09f9a23e..1f821426b51a4b23e6ca8c11fa7695488749d388 100644 (file)
@@ -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),
index ef4ca730aa4c995a9ca1c14835f3033f4d383106..2d19901d59f05f3ece3b6baa6faf39f22c6eca9d 100644 (file)
@@ -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' )
index 1b998477f99dbe0b98b7bcef1eeeb05356001df1..557a8d67840193a1c876817acb859733cc3dba31 100644 (file)
@@ -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' )
index 36bde04671e53667188ffdc952a197b5f49d1233..c9f1a240326f2e27d42f848b04a94442bfbbbfc6 100644 (file)
@@ -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' )
index 1ecb81162a7fad65252b6cbdabc9a1626eaf6595..0be566d341a961977e8eef1bd4b2975e90918145 100644 (file)
@@ -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' )
index fc6c04d4c909bc73f5e363cb8db8bb0c9813650a..1db76fcbcbd3437b443b83672589bd72958839ce 100644 (file)
@@ -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' )
index 1be9de5c4eed1692a25380558fb25fca25308c31..0736bdb549e2b2ad2ddf7d45722147e9322ff0d2 100644 (file)
@@ -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' )
index 8ebf743614a505bbf82668d702f1ac8f8b66a5b0..4bcc36494d01b656ec409ed73c7964d9a8956c26 100644 (file)
@@ -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' )
index ba279c38bb2d80cacc25bf371fef78f45ed5dbf4..1cc04aa27ec2ceedb9fd17e6577c220ede44c0fe 100644 (file)
@@ -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),
index 2e20dd2edf19881cde17909513be700bb0d2763c..875270b340bb741b37d976687d32298c6db186a4 100644 (file)
@@ -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: