mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-12-26 09:20:34 +05:00
Conformité python avec import os
This commit is contained in:
parent
361885ae5e
commit
93b3222f60
@ -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,
|
||||
|
@ -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,
|
||||
|
@ -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,
|
||||
|
@ -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,
|
||||
|
@ -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,
|
||||
|
@ -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,
|
||||
|
@ -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,
|
||||
|
@ -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,
|
||||
|
@ -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,
|
||||
|
@ -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,
|
||||
|
@ -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,
|
||||
|
@ -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,
|
||||
|
@ -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,
|
||||
|
@ -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,
|
||||
|
@ -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,
|
||||
|
@ -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,
|
||||
|
@ -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,
|
||||
|
@ -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,
|
||||
|
@ -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,
|
||||
|
@ -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]
|
||||
|
@ -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]
|
||||
|
@ -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]
|
||||
@ -674,4 +676,4 @@ def insereFissureLongue(geometriesSaines, maillagesSains,
|
||||
if salome.sg.hasDesktop():
|
||||
salome.sg.updateObjBrowser()
|
||||
|
||||
return maillageComplet
|
||||
return maillageComplet
|
||||
|
@ -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 \
|
||||
)
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user