Conformité python avec import os

This commit is contained in:
GERALD NICOLAS 2021-01-26 15:12:35 +01:00
parent 361885ae5e
commit 93b3222f60
24 changed files with 75 additions and 36 deletions

View File

@ -18,6 +18,8 @@
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
import os
from .cubeAngle import cubeAngle
class cubeAngle2(cubeAngle):
@ -40,7 +42,7 @@ class cubeAngle2(cubeAngle):
# ---------------------------------------------------------------------------
def setParamMaillageFissure(self):
self.maillageFissureParams = dict(nomRep = '.',
self.maillageFissureParams = dict(nomRep = os.curdir,
nomFicSain = self.nomCas,
nomFicFissure = 'fissure_' + self.nomCas,
nbsegRad = 5,

View File

@ -89,7 +89,7 @@ class cylindre(fissureGenerique):
# ---------------------------------------------------------------------------
def setParamMaillageFissure(self):
self.maillageFissureParams = dict(nomRep = '.',
self.maillageFissureParams = dict(nomRep = os.curdir,
nomFicSain = self.nomCas,
nomFicFissure = 'fissure_' + self.nomCas,
nbsegRad = 5,

View File

@ -93,7 +93,7 @@ class ellipse_1(fissureGenerique):
# ---------------------------------------------------------------------------
def setParamMaillageFissure(self):
self.maillageFissureParams = dict(nomRep = '.',
self.maillageFissureParams = dict(nomRep = os.curdir,
nomFicSain = self.nomCas,
nomFicFissure = 'fissure_' + self.nomCas,
nbsegRad = 5,

View File

@ -87,7 +87,7 @@ class eprouvetteCourbe(fissureGenerique):
# ---------------------------------------------------------------------------
def setParamMaillageFissure(self):
self.maillageFissureParams = dict(nomRep = '.',
self.maillageFissureParams = dict(nomRep = os.curdir,
nomFicSain = self.nomCas,
nomFicFissure = 'fissure_' + self.nomCas,
nbsegRad = 5,

View File

@ -91,7 +91,7 @@ class eprouvetteDroite(fissureGenerique):
# ---------------------------------------------------------------------------
def setParamMaillageFissure(self):
self.maillageFissureParams = dict(nomRep = '.',
self.maillageFissureParams = dict(nomRep = os.curdir,
nomFicSain = self.nomCas,
nomFicFissure = 'fissure_' + self.nomCas,
nbsegRad = 5,

View File

@ -87,7 +87,7 @@ class faceGauche(fissureGenerique):
# ---------------------------------------------------------------------------
def setParamMaillageFissure(self):
self.maillageFissureParams = dict(nomRep = '.',
self.maillageFissureParams = dict(nomRep = os.curdir,
nomFicSain = self.nomCas,
nomFicFissure = 'fissure_' + self.nomCas,
nbsegRad = 5,

View File

@ -18,6 +18,8 @@
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
import os
from blocFissure.gmu.fissureCoude import fissureCoude
class fissureCoude_1(fissureCoude):
@ -88,7 +90,7 @@ class fissureCoude_1(fissureCoude):
nbSegCercle = nombre de secteurs
areteFaceFissure = taille cible de l'arête des triangles en face de fissure.
"""
self.maillageFissureParams = dict(nomRep = '.',
self.maillageFissureParams = dict(nomRep = os.curdir,
nomFicSain = self.nomCas,
nomFicFissure = 'fissure_' + self.nomCas,
nbsegRad = 5,

View File

@ -18,6 +18,8 @@
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
import os
from blocFissure.gmu.fissureCoude import fissureCoude
class fissureCoude_10(fissureCoude):
@ -90,7 +92,7 @@ class fissureCoude_10(fissureCoude):
nbSegCercle = nombre de secteurs
areteFaceFissure = taille cible de l'arête des triangles en face de fissure.
"""
self.maillageFissureParams = dict(nomRep = '.',
self.maillageFissureParams = dict(nomRep = os.curdir,
nomFicSain = self.nomCas,
nomFicFissure = 'fissure_' + self.nomCas,
nbsegRad = 3,

View File

@ -18,6 +18,8 @@
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
import os
from blocFissure.gmu.fissureCoude import fissureCoude
class fissureCoude_2(fissureCoude):
@ -89,7 +91,7 @@ class fissureCoude_2(fissureCoude):
nbSegCercle = nombre de secteurs
areteFaceFissure = taille cible de l'arête des triangles en face de fissure.
"""
self.maillageFissureParams = dict(nomRep = '.',
self.maillageFissureParams = dict(nomRep = os.curdir,
nomFicSain = self.nomCas,
nomFicFissure = 'fissure_' + self.nomCas,
nbsegRad = 5,

View File

@ -18,6 +18,8 @@
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
import os
from blocFissure.gmu.fissureCoude import fissureCoude
class fissureCoude_3(fissureCoude):
@ -88,7 +90,7 @@ class fissureCoude_3(fissureCoude):
nbSegCercle = nombre de secteurs
areteFaceFissure = taille cible de l'arête des triangles en face de fissure.
"""
self.maillageFissureParams = dict(nomRep = '.',
self.maillageFissureParams = dict(nomRep = os.curdir,
nomFicSain = self.nomCas,
nomFicFissure = 'fissure_' + self.nomCas,
nbsegRad = 5,

View File

@ -18,6 +18,8 @@
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
import os
from blocFissure.gmu.fissureCoude import fissureCoude
class fissureCoude_4(fissureCoude):
@ -88,7 +90,7 @@ class fissureCoude_4(fissureCoude):
nbSegCercle = nombre de secteurs
areteFaceFissure = taille cible de l'arête des triangles en face de fissure.
"""
self.maillageFissureParams = dict(nomRep = '.',
self.maillageFissureParams = dict(nomRep = os.curdir,
nomFicSain = self.nomCas,
nomFicFissure = 'fissure_' + self.nomCas,
nbsegRad = 5,

View File

@ -18,6 +18,8 @@
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
import os
from blocFissure.gmu.fissureCoude import fissureCoude
class fissureCoude_5(fissureCoude):
@ -88,7 +90,7 @@ class fissureCoude_5(fissureCoude):
nbSegCercle = nombre de secteurs
areteFaceFissure = taille cible de l'arête des triangles en face de fissure.
"""
self.maillageFissureParams = dict(nomRep = '.',
self.maillageFissureParams = dict(nomRep = os.curdir,
nomFicSain = self.nomCas,
nomFicFissure = 'fissure_' + self.nomCas,
nbsegRad = 5,

View File

@ -18,6 +18,8 @@
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
import os
from blocFissure.gmu.fissureCoude import fissureCoude
class fissureCoude_6(fissureCoude):
@ -89,7 +91,7 @@ class fissureCoude_6(fissureCoude):
nbSegCercle = nombre de secteurs
areteFaceFissure = taille cible de l'arête des triangles en face de fissure.
"""
self.maillageFissureParams = dict(nomRep = '.',
self.maillageFissureParams = dict(nomRep = os.curdir,
nomFicSain = self.nomCas,
nomFicFissure = 'fissure_' + self.nomCas,
nbsegRad = 5,

View File

@ -18,6 +18,8 @@
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
import os
from blocFissure.gmu.fissureCoude import fissureCoude
class fissureCoude_7(fissureCoude):
@ -90,7 +92,7 @@ class fissureCoude_7(fissureCoude):
nbSegCercle = nombre de secteurs
areteFaceFissure = taille cible de l'arête des triangles en face de fissure.
"""
self.maillageFissureParams = dict(nomRep = '.',
self.maillageFissureParams = dict(nomRep = os.curdir,
nomFicSain = self.nomCas,
nomFicFissure = 'fissure_' + self.nomCas,
nbsegRad = 5,

View File

@ -18,6 +18,8 @@
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
import os
from blocFissure.gmu.fissureCoude import fissureCoude
class fissureCoude_8(fissureCoude):
@ -90,7 +92,7 @@ class fissureCoude_8(fissureCoude):
nbSegCercle = nombre de secteurs
areteFaceFissure = taille cible de l'arête des triangles en face de fissure.
"""
self.maillageFissureParams = dict(nomRep = '.',
self.maillageFissureParams = dict(nomRep = os.curdir,
nomFicSain = self.nomCas,
nomFicFissure = 'fissure_' + self.nomCas,
nbsegRad = 4,

View File

@ -18,6 +18,8 @@
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
import os
from blocFissure.gmu.fissureCoude import fissureCoude
class fissureCoude_9(fissureCoude):
@ -88,7 +90,7 @@ class fissureCoude_9(fissureCoude):
nbSegCercle = nombre de secteurs
areteFaceFissure = taille cible de l'arête des triangles en face de fissure.
"""
self.maillageFissureParams = dict(nomRep = '.',
self.maillageFissureParams = dict(nomRep = os.curdir,
nomFicSain = self.nomCas,
nomFicFissure = 'fissure_' + self.nomCas,
nbsegRad = 6,

View File

@ -18,6 +18,8 @@
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
import os
from blocFissure import gmu
from blocFissure.gmu.geomsmesh import geompy, smesh
@ -477,7 +479,7 @@ class fissure_Coude(fissureGenerique):
# ---------------------------------------------------------------------------
def setParamMaillageFissure(self):
self.maillageFissureParams = dict(nomRep = '.',
self.maillageFissureParams = dict(nomRep = os.curdir,
nomFicSain = self.nomCas,
nomFicFissure = 'fissure_' + self.nomCas,
nbsegExt = 5,

View File

@ -18,6 +18,8 @@
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
import os
from .fissure_Coude import fissure_Coude
class fissure_Coude_4(fissure_Coude):
@ -67,7 +69,7 @@ class fissure_Coude_4(fissure_Coude):
externe : True : fissure face externe, False : fissure face interne
"""
print("setParamShapeFissure", self.nomCas)
self.shapeFissureParams = dict(nomRep = '.',
self.shapeFissureParams = dict(nomRep = os.curdir,
nomFicSain = self.nomCas,
nomFicFissure = 'fissure_' + self.nomCas,
profondeur = 10,

View File

@ -18,6 +18,8 @@
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
import os
from .geomsmesh import geompy, smesh
from .geomsmesh import geomPublish
from .geomsmesh import geomPublishInFather
@ -656,7 +658,7 @@ class fissureCoude(fissureGenerique):
nbSegCercle = nombre de secteurs
areteFaceFissure = taille cible de l'arête des triangles en face de fissure.
"""
self.maillageFissureParams = dict(nomRep = '.',
self.maillageFissureParams = dict(nomRep = os.curdir,
nomFicSain = self.nomCas,
nomFicFissure = 'fissure_' + self.nomCas,
nbsegRad = 5,

View File

@ -18,6 +18,8 @@
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
import os
import logging
import salome
from .geomsmesh import geompy
@ -81,8 +83,8 @@ def insereFissureElliptique(geometriesSaines, maillagesSains,
nbsegFis = maillageFissureParams['nbsegFis'] # 20
lensegEllipsoide = maillageFissureParams['lensegEllipso'] # 1.0
fichierMaillageSain = nomRep + '/' + nomFicSain + '.med'
fichierMaillageFissure = nomRep + '/' + nomFicFissure + '.med'
fichierMaillageSain = os.path.join(nomRep, '{}.med'.format(nomFicSain))
fichierMaillageFissure = os.path.join(nomRep, '{}.med'.format(nomFicFissure))
facesDefaut = elementsDefaut[0]
centreDefaut = elementsDefaut[1]

View File

@ -18,6 +18,8 @@
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
import os
import logging
import salome
from .geomsmesh import geompy
@ -100,8 +102,8 @@ def insereFissureGenerale(maillagesSains,
if isPointInterne:
pointInterne = geompy.MakeVertex(pointIn_x, pointIn_y, pointIn_z)
#fichierMaillageSain = nomRep + '/' + nomFicSain + '.med'
fichierMaillageFissure = nomRep + '/' + nomFicFissure + '.med'
#fichierMaillageSain = os.path.join(nomRep, '{}.med'.format(nomFicSain))
fichierMaillageFissure = os.path.join(nomRep, '{}.med'.format(nomFicFissure))
# fillings des faces en peau
facesDefaut = elementsDefaut[0]

View File

@ -18,6 +18,8 @@
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
import os
import logging
import salome
from .geomsmesh import geompy
@ -79,8 +81,8 @@ def insereFissureLongue(geometriesSaines, maillagesSains,
#nbsegFis = maillageFissureParams['nbsegFis'] # 20
#lensegEllipsoide = maillageFissureParams['lensegEllipso'] # 1.0
#fichierMaillageSain = nomRep + '/' + nomFicSain + '.med'
fichierMaillageFissure = nomRep + '/' + nomFicFissure + '.med'
#fichierMaillageSain = os.path.join(nomRep, '{}.med'.format(nomFicSain))
fichierMaillageFissure = os.path.join(nomRep, '{}.med'.format(nomFicFissure))
facesDefaut = elementsDefaut[0]
#centreDefaut = elementsDefaut[1]

View File

@ -18,6 +18,8 @@
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
import os
from blocFissure.gmu.fissureCoude import fissureCoude
class fissureCoude_ihm(fissureCoude):
@ -94,7 +96,7 @@ class fissureCoude_ihm(fissureCoude):
nbSegCercle = nombre de secteurs
areteFaceFissure = taille cible de l'arête des triangles en face de fissure.
"""
self.maillageFissureParams = dict(nomRep = '.',
self.maillageFissureParams = dict(nomRep = os.curdir,
nomFicSain = self.nomCas,
nomFicFissure = 'fissure_' + self.nomCas,
nbsegRad = self.dico['nbCouronnes'],
@ -103,12 +105,14 @@ class fissureCoude_ihm(fissureCoude):
# ---------------------------------------------------------------------------
def setReferencesMaillageFissure(self):
self.referencesMaillageFissure = dict(Entity_Node = 0,
Entity_Quad_Edge = 0,
Entity_Quad_Triangle = 0,
Entity_Quad_Quadrangle = 0,
Entity_Quad_Tetra = 0,
Entity_Quad_Hexa = 0,
Entity_Quad_Penta = 0,
Entity_Quad_Pyramid = 0)
self.referencesMaillageFissure = dict( \
Entity_Quad_Pyramid = 0,
Entity_Quad_Quadrangle = 0, \
Entity_Quad_Hexa = 0, \
Entity_Node = 0, \
Entity_Quad_Edge = 0, \
Entity_Quad_Triangle = 0, \
Entity_Quad_Tetra = 0, \
Entity_Quad_Penta = 0 \
)

View File

@ -22,6 +22,7 @@
# if you already have plugins defined in a salome_plugins.py file, add this file at the end.
# if not, copy this file as ${HOME}/Plugins/smesh_plugins.py or ${APPLI}/Plugins/smesh_plugins.py
import os
import math
import sys
import traceback
@ -255,7 +256,7 @@ def fissureCoudeDlg(context):
return incomplet
def fileDefault(self):
filedef = os.path.expanduser("~/.config/salome/dialogFissureCoude.dic")
filedef = os.path.expanduser( os.path.join(os.environ["HOME"],".config", "salome", "dialogFissureCoude.dic") )
print(filedef)
return filedef