Mise à la norme python des fichiers

This commit is contained in:
GERALD NICOLAS 2021-01-22 18:31:51 +01:00
parent b3c9d09a8a
commit cd96b6d3d4
15 changed files with 37 additions and 37 deletions

View 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),

View 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),

View 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),

View 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' )

View 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' )

View 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),

View 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' )

View 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' )

View 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' )

View 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' )

View 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' )

View 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' )

View 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' )

View 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),

View 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: