mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-12-27 09:50:34 +05:00
Mise à la norme python des fichiers
This commit is contained in:
parent
b3c9d09a8a
commit
cd96b6d3d4
@ -21,9 +21,9 @@
|
|||||||
import os
|
import os
|
||||||
from blocFissure import gmu
|
from blocFissure import gmu
|
||||||
|
|
||||||
dicoParams = dict(nomCas = 'cubeCoin',
|
dicoParams = dict(nomCas = "cubeCoin",
|
||||||
maillageSain = os.path.join(gmu.pathBloc, 'materielCasTests/cubeFin.med'),
|
maillageSain = os.path.join(gmu.pathBloc, "materielCasTests", "cubeFin.med"),
|
||||||
brepFaceFissure = os.path.join(gmu.pathBloc, "materielCasTests/cubeFin_Coin.brep"),
|
brepFaceFissure = os.path.join(gmu.pathBloc, "materielCasTests", "cubeFin_Coin.brep"),
|
||||||
edgeFissIds = [6],
|
edgeFissIds = [6],
|
||||||
lgInfluence = 50,
|
lgInfluence = 50,
|
||||||
meshBrep = (5,10),
|
meshBrep = (5,10),
|
||||||
|
@ -21,9 +21,9 @@
|
|||||||
import os
|
import os
|
||||||
from blocFissure import gmu
|
from blocFissure import gmu
|
||||||
|
|
||||||
dicoParams = dict(nomCas = 'cubeMilieu',
|
dicoParams = dict(nomCas = "cubeMilieu",
|
||||||
maillageSain = os.path.join(gmu.pathBloc, 'materielCasTests/cubeFin.med'),
|
maillageSain = os.path.join(gmu.pathBloc, "materielCasTests", "cubeFin.med"),
|
||||||
brepFaceFissure = os.path.join(gmu.pathBloc, "materielCasTests/cubeFin_Milieu.brep"),
|
brepFaceFissure = os.path.join(gmu.pathBloc, "materielCasTests", "cubeFin_Milieu.brep"),
|
||||||
edgeFissIds = [6],
|
edgeFissIds = [6],
|
||||||
lgInfluence = 50,
|
lgInfluence = 50,
|
||||||
meshBrep = (5,10),
|
meshBrep = (5,10),
|
||||||
|
@ -21,9 +21,9 @@
|
|||||||
import os
|
import os
|
||||||
from blocFissure import gmu
|
from blocFissure import gmu
|
||||||
|
|
||||||
dicoParams = dict(nomCas = 'cubeTransverse',
|
dicoParams = dict(nomCas = "cubeTransverse",
|
||||||
maillageSain = os.path.join(gmu.pathBloc, 'materielCasTests/cubeFin.med'),
|
maillageSain = os.path.join(gmu.pathBloc, "materielCasTests", "cubeFin.med"),
|
||||||
brepFaceFissure = os.path.join(gmu.pathBloc, "materielCasTests/cubeFin_Transverse.brep"),
|
brepFaceFissure = os.path.join(gmu.pathBloc, "materielCasTests", "cubeFin_Transverse.brep"),
|
||||||
edgeFissIds = [6],
|
edgeFissIds = [6],
|
||||||
lgInfluence = 50,
|
lgInfluence = 50,
|
||||||
meshBrep = (5,10),
|
meshBrep = (5,10),
|
||||||
|
@ -53,7 +53,7 @@ class cylindre(fissureGenerique):
|
|||||||
"""
|
"""
|
||||||
logging.info("genereMaillageSain %s", self.nomCas)
|
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')
|
smesh.SetName(objetSain.GetMesh(), 'objetSain')
|
||||||
|
|
||||||
return [objetSain, True] # True : maillage hexa
|
return [objetSain, True] # True : maillage hexa
|
||||||
@ -75,7 +75,7 @@ class cylindre(fissureGenerique):
|
|||||||
|
|
||||||
lgInfluence = shapeFissureParams['lgInfluence']
|
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"])
|
fondFiss = geompy.CreateGroup(shellFiss, geompy.ShapeType["EDGE"])
|
||||||
geompy.UnionIDs(fondFiss, [6])
|
geompy.UnionIDs(fondFiss, [6])
|
||||||
geompy.addToStudy( shellFiss, 'shellFiss' )
|
geompy.addToStudy( shellFiss, 'shellFiss' )
|
||||||
|
@ -48,7 +48,7 @@ class cylindre_2(cylindre):
|
|||||||
|
|
||||||
lgInfluence = shapeFissureParams['lgInfluence']
|
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"])
|
fondFiss = geompy.CreateGroup(shellFiss, geompy.ShapeType["EDGE"])
|
||||||
geompy.UnionIDs(fondFiss, [3])
|
geompy.UnionIDs(fondFiss, [3])
|
||||||
geompy.addToStudy( shellFiss, 'shellFiss' )
|
geompy.addToStudy( shellFiss, 'shellFiss' )
|
||||||
|
@ -22,8 +22,8 @@ import os
|
|||||||
from blocFissure import gmu
|
from blocFissure import gmu
|
||||||
|
|
||||||
dicoParams = dict(nomCas = 'disque',
|
dicoParams = dict(nomCas = 'disque',
|
||||||
maillageSain = os.path.join(gmu.pathBloc, 'materielCasTests/disque.med'),
|
maillageSain = os.path.join(gmu.pathBloc, "materielCasTests", "disque.med"),
|
||||||
brepFaceFissure = os.path.join(gmu.pathBloc, "materielCasTests/ellipse_disque.brep"),
|
brepFaceFissure = os.path.join(gmu.pathBloc, "materielCasTests", "ellipse_disque.brep"),
|
||||||
edgeFissIds = [3],
|
edgeFissIds = [3],
|
||||||
lgInfluence = 10,
|
lgInfluence = 10,
|
||||||
meshBrep = (0.5,2.5),
|
meshBrep = (0.5,2.5),
|
||||||
|
@ -55,7 +55,7 @@ class ellipse_1(fissureGenerique):
|
|||||||
def genereMaillageSain(self, geometriesSaines, meshParams):
|
def genereMaillageSain(self, geometriesSaines, meshParams):
|
||||||
logging.info("genereMaillageSain %s", self.nomCas)
|
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')
|
smesh.SetName(objetSain.GetMesh(), 'objetSain')
|
||||||
|
|
||||||
return [objetSain, True] # True : maillage hexa
|
return [objetSain, True] # True : maillage hexa
|
||||||
@ -79,7 +79,7 @@ class ellipse_1(fissureGenerique):
|
|||||||
|
|
||||||
lgInfluence = shapeFissureParams['lgInfluence']
|
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"])
|
fondFiss = geompy.CreateGroup(shellFiss, geompy.ShapeType["EDGE"])
|
||||||
geompy.UnionIDs(fondFiss, [3])
|
geompy.UnionIDs(fondFiss, [3])
|
||||||
geompy.addToStudy( shellFiss, 'shellFiss' )
|
geompy.addToStudy( shellFiss, 'shellFiss' )
|
||||||
|
@ -51,7 +51,7 @@ class ellipse_2(ellipse_1):
|
|||||||
|
|
||||||
lgInfluence = shapeFissureParams['lgInfluence']
|
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"])
|
fondFiss = geompy.CreateGroup(shellFiss, geompy.ShapeType["EDGE"])
|
||||||
geompy.UnionIDs(fondFiss, [3])
|
geompy.UnionIDs(fondFiss, [3])
|
||||||
geompy.addToStudy( shellFiss, 'shellFiss' )
|
geompy.addToStudy( shellFiss, 'shellFiss' )
|
||||||
|
@ -49,7 +49,7 @@ class eprouvetteCourbe(fissureGenerique):
|
|||||||
def genereMaillageSain(self, geometriesSaines, meshParams):
|
def genereMaillageSain(self, geometriesSaines, meshParams):
|
||||||
logging.info("genereMaillageSain %s", self.nomCas)
|
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')
|
smesh.SetName(objetSain.GetMesh(), 'objetSain')
|
||||||
|
|
||||||
return [objetSain, True] # True : maillage hexa
|
return [objetSain, True] # True : maillage hexa
|
||||||
@ -73,7 +73,7 @@ class eprouvetteCourbe(fissureGenerique):
|
|||||||
|
|
||||||
lgInfluence = shapeFissureParams['lgInfluence']
|
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"])
|
fondFiss = geompy.CreateGroup(shellFiss, geompy.ShapeType["EDGE"])
|
||||||
geompy.UnionIDs(fondFiss, [8])
|
geompy.UnionIDs(fondFiss, [8])
|
||||||
geompy.addToStudy( shellFiss, 'shellFiss' )
|
geompy.addToStudy( shellFiss, 'shellFiss' )
|
||||||
|
@ -52,7 +52,7 @@ class eprouvetteDroite(fissureGenerique):
|
|||||||
def genereMaillageSain(self, geometriesSaines, meshParams):
|
def genereMaillageSain(self, geometriesSaines, meshParams):
|
||||||
logging.info("genereMaillageSain %s", self.nomCas)
|
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')
|
smesh.SetName(objetSain.GetMesh(), 'objetSain')
|
||||||
|
|
||||||
return [objetSain, True] # True : maillage hexa
|
return [objetSain, True] # True : maillage hexa
|
||||||
@ -77,7 +77,7 @@ class eprouvetteDroite(fissureGenerique):
|
|||||||
|
|
||||||
lgInfluence = shapeFissureParams['lgInfluence']
|
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"])
|
fondFiss = geompy.CreateGroup(shellFiss, geompy.ShapeType["EDGE"])
|
||||||
geompy.UnionIDs(fondFiss, [8])
|
geompy.UnionIDs(fondFiss, [8])
|
||||||
geompy.addToStudy( shellFiss, 'shellFiss' )
|
geompy.addToStudy( shellFiss, 'shellFiss' )
|
||||||
|
@ -51,7 +51,7 @@ class eprouvetteDroite_2(eprouvetteDroite):
|
|||||||
|
|
||||||
lgInfluence = shapeFissureParams['lgInfluence']
|
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"])
|
fondFiss = geompy.CreateGroup(shellFiss, geompy.ShapeType["EDGE"])
|
||||||
geompy.UnionIDs(fondFiss, [10])
|
geompy.UnionIDs(fondFiss, [10])
|
||||||
geompy.addToStudy( shellFiss, 'shellFiss' )
|
geompy.addToStudy( shellFiss, 'shellFiss' )
|
||||||
|
@ -49,7 +49,7 @@ class faceGauche(fissureGenerique):
|
|||||||
def genereMaillageSain(self, geometriesSaines, meshParams):
|
def genereMaillageSain(self, geometriesSaines, meshParams):
|
||||||
logging.info("genereMaillageSain %s", self.nomCas)
|
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')
|
smesh.SetName(objetSain.GetMesh(), 'objetSain')
|
||||||
|
|
||||||
return [objetSain, True] # True : maillage hexa
|
return [objetSain, True] # True : maillage hexa
|
||||||
@ -73,7 +73,7 @@ class faceGauche(fissureGenerique):
|
|||||||
|
|
||||||
lgInfluence = shapeFissureParams['lgInfluence']
|
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"])
|
fondFiss = geompy.CreateGroup(shellFiss, geompy.ShapeType["EDGE"])
|
||||||
geompy.UnionIDs(fondFiss, [6])
|
geompy.UnionIDs(fondFiss, [6])
|
||||||
geompy.addToStudy( shellFiss, 'shellFiss' )
|
geompy.addToStudy( shellFiss, 'shellFiss' )
|
||||||
|
@ -50,7 +50,7 @@ class faceGauche_2(fissureGenerique):
|
|||||||
def genereMaillageSain(self, geometriesSaines, meshParams):
|
def genereMaillageSain(self, geometriesSaines, meshParams):
|
||||||
logging.info("genereMaillageSain %s", self.nomCas)
|
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')
|
smesh.SetName(objetSain.GetMesh(), 'objetSain')
|
||||||
|
|
||||||
return [objetSain, True] # True : maillage hexa
|
return [objetSain, True] # True : maillage hexa
|
||||||
@ -74,7 +74,7 @@ class faceGauche_2(fissureGenerique):
|
|||||||
|
|
||||||
lgInfluence = shapeFissureParams['lgInfluence']
|
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"])
|
fondFiss = geompy.CreateGroup(shellFiss, geompy.ShapeType["EDGE"])
|
||||||
geompy.UnionIDs(fondFiss, [14, 9])
|
geompy.UnionIDs(fondFiss, [14, 9])
|
||||||
geompy.addToStudy( shellFiss, 'shellFiss' )
|
geompy.addToStudy( shellFiss, 'shellFiss' )
|
||||||
|
@ -26,9 +26,9 @@ initLog.setDebug()
|
|||||||
|
|
||||||
from blocFissure.gmu.casStandard import casStandard
|
from blocFissure.gmu.casStandard import casStandard
|
||||||
|
|
||||||
dicoParams = dict(nomCas = 'angleCube',
|
dicoParams = dict(nomCas = "angleCube",
|
||||||
maillageSain = os.path.join(gmu.pathBloc, 'materielCasTests/CubeAngle.med'),
|
maillageSain = os.path.join(gmu.pathBloc, "materielCasTests", "CubeAngle.med"),
|
||||||
brepFaceFissure = os.path.join(gmu.pathBloc, "materielCasTests/CubeAngleFiss.brep"),
|
brepFaceFissure = os.path.join(gmu.pathBloc, "materielCasTests", "CubeAngleFiss.brep"),
|
||||||
edgeFissIds = [4],
|
edgeFissIds = [4],
|
||||||
lgInfluence = 20,
|
lgInfluence = 20,
|
||||||
meshBrep = (5,10),
|
meshBrep = (5,10),
|
||||||
|
@ -76,9 +76,9 @@ def fissureGeneraleDlg(context):
|
|||||||
|
|
||||||
def initDefaut(self):
|
def initDefaut(self):
|
||||||
self.defaut = dict( \
|
self.defaut = dict( \
|
||||||
nomCas = 'angleCube', \
|
nomCas = "angleCube", \
|
||||||
maillageSain = os.path.join(gmu.pathBloc, 'materielCasTests/CubeAngle.med'), \
|
maillageSain = os.path.join(gmu.pathBloc, "materielCasTests", "CubeAngle.med"), \
|
||||||
brepFaceFissure = os.path.join(gmu.pathBloc, "materielCasTests/CubeAngleFiss.brep"), \
|
brepFaceFissure = os.path.join(gmu.pathBloc, "materielCasTests", "CubeAngleFiss.brep"), \
|
||||||
edgeFissIds = [3], \
|
edgeFissIds = [3], \
|
||||||
lgInfluence = 20, \
|
lgInfluence = 20, \
|
||||||
meshBrep = (5,10), \
|
meshBrep = (5,10), \
|
||||||
@ -88,8 +88,8 @@ def fissureGeneraleDlg(context):
|
|||||||
nbSegCercle = 32, \
|
nbSegCercle = 32, \
|
||||||
areteFaceFissure = 10, \
|
areteFaceFissure = 10, \
|
||||||
areteVives = 0, \
|
areteVives = 0, \
|
||||||
reptrav = '.', \
|
reptrav = os.curdir, \
|
||||||
nomres = 'maillage_avec_fissure', \
|
nomres = "maillage_avec_fissure", \
|
||||||
verbosite = 0)
|
verbosite = 0)
|
||||||
|
|
||||||
|
|
||||||
@ -189,7 +189,7 @@ def fissureGeneraleDlg(context):
|
|||||||
return incomplet
|
return incomplet
|
||||||
|
|
||||||
def fileDefault(self):
|
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)
|
print(filedef)
|
||||||
return filedef
|
return filedef
|
||||||
|
|
||||||
@ -199,8 +199,8 @@ def fissureGeneraleDlg(context):
|
|||||||
f.write(str(dico))
|
f.write(str(dico))
|
||||||
|
|
||||||
def genereExemples(self):
|
def genereExemples(self):
|
||||||
maillageSain = os.path.join(gmu.pathBloc, 'materielCasTests/CubeAngle.med')
|
maillageSain = os.path.join(gmu.pathBloc, "materielCasTests", "CubeAngle.med")
|
||||||
brepFaceFissure = os.path.join(gmu.pathBloc, "materielCasTests/CubeAngleFiss.brep")
|
brepFaceFissure = os.path.join(gmu.pathBloc, "materielCasTests", "CubeAngleFiss.brep")
|
||||||
if (os.path.exists(maillageSain) and os.path.exists(brepFaceFissure)):
|
if (os.path.exists(maillageSain) and os.path.exists(brepFaceFissure)):
|
||||||
self.initDialog(self.defaut)
|
self.initDialog(self.defaut)
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user