Conformité python

This commit is contained in:
GERALD NICOLAS 2021-01-26 16:54:49 +01:00
parent a37f701f67
commit d6d7f3ffb4
2 changed files with 143 additions and 147 deletions

View File

@ -34,8 +34,8 @@ class fissureCoude_ihm(fissureCoude):
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
def setParamGeometrieSaine(self): def setParamGeometrieSaine(self):
""" """Paramètres géométriques du tuyau coudé sain:
Paramètres géométriques du tuyau coudé sain:
angleCoude angleCoude
r_cintr r_cintr
l_tube_p1 l_tube_p1
@ -43,26 +43,26 @@ class fissureCoude_ihm(fissureCoude):
epais epais
de de
""" """
self.geomParams = dict(angleCoude = self.dico['angle'], self.geomParams = dict(angleCoude = self.dico['angle'], \
r_cintr = self.dico['rCintr'], r_cintr = self.dico['rCintr'], \
l_tube_p1 = self.dico['lTubeP1'], l_tube_p1 = self.dico['lTubeP1'], \
l_tube_p2 = self.dico['lTubeP2'], l_tube_p2 = self.dico['lTubeP2'], \
epais = self.dico['epais'], epais = self.dico['epais'], \
de = self.dico['dext']) de = self.dico['dext'])
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
def setParamMaillageSain(self): def setParamMaillageSain(self):
self.meshParams = dict(n_long_p1 = self.dico['nbAxeTubeP1'], self.meshParams = dict(n_long_p1 = self.dico['nbAxeTubeP1'], \
n_ep = self.dico['nbEpaisseur'], n_ep = self.dico['nbEpaisseur'], \
n_long_coude = self.dico['nbAxeCoude'], n_long_coude = self.dico['nbAxeCoude'], \
n_circ_g = self.dico['nbCirconf'], n_circ_g = self.dico['nbCirconf'], \
n_circ_d = self.dico['nbCirconf'], n_circ_d = self.dico['nbCirconf'], \
n_long_p2 = self.dico['nbAxeTubeP2']) n_long_p2 = self.dico['nbAxeTubeP2'])
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
def setParamShapeFissure(self): def setParamShapeFissure(self):
""" """paramètres de la fissure pour le tuyau coude
paramètres de la fissure pour le tuyau coude
profondeur : 0 < profondeur <= épaisseur profondeur : 0 < profondeur <= épaisseur
rayonPipe : rayon du pipe correspondant au maillage rayonnant rayonPipe : rayon du pipe correspondant au maillage rayonnant
lenSegPipe : longueur des mailles rayonnantes le long du fond de fissure (= rayonPipe par défaut) lenSegPipe : longueur des mailles rayonnantes le long du fond de fissure (= rayonPipe par défaut)
@ -76,43 +76,43 @@ class fissureCoude_ihm(fissureCoude):
externe : True : fissure face externe, False : fissure face interne externe : True : fissure face externe, False : fissure face interne
""" """
print("setParamShapeFissure", self.nomCas) print("setParamShapeFissure", self.nomCas)
self.shapeFissureParams = dict(profondeur = self.dico['profondeur'], self.shapeFissureParams = dict(profondeur = self.dico['profondeur'], \
rayonPipe = self.dico['rayonTore'], rayonPipe = self.dico['rayonTore'], \
lenSegPipe = self.dico['lenSegPipe'], lenSegPipe = self.dico['lenSegPipe'], \
azimut = self.dico['azimut'], azimut = self.dico['azimut'], \
alpha = self.dico['posiAngul'], alpha = self.dico['posiAngul'], \
longueur = self.dico['longueur'], longueur = self.dico['longueur'], \
orientation = self.dico['orientation'], orientation = self.dico['orientation'], \
lgInfluence = self.dico['influence'], lgInfluence = self.dico['influence'], \
elliptique = self.dico['cbForceEllipse'], elliptique = self.dico['cbForceEllipse'], \
externe = self.dico['rbFissExt']) externe = self.dico['rbFissExt'])
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
def setParamMaillageFissure(self): def setParamMaillageFissure(self):
""" """Paramètres du maillage de la fissure pour le tuyau coudé
Paramètres du maillage de la fissure pour le tuyau coudé
Voir également setParamShapeFissure, paramètres rayonPipe et lenSegPipe. Voir également setParamShapeFissure, paramètres rayonPipe et lenSegPipe.
nbSegRad = nombre de couronnes nbSegRad = nombre de couronnes
nbSegCercle = nombre de secteurs nbSegCercle = nombre de secteurs
areteFaceFissure = taille cible de l'arête des triangles en face de fissure. areteFaceFissure = taille cible de l'arête des triangles en face de fissure.
""" """
self.maillageFissureParams = dict(nomRep = os.curdir, self.maillageFissureParams = dict(nomRep = os.curdir, \
nomFicSain = self.nomCas, nomFicSain = self.nomCas, \
nomFicFissure = 'fissure_' + self.nomCas, nomFicFissure = 'fissure_' + self.nomCas, \
nbsegRad = self.dico['nbCouronnes'], nbsegRad = self.dico['nbCouronnes'], \
nbsegCercle = self.dico['nbSecteurs'], nbsegCercle = self.dico['nbSecteurs'], \
areteFaceFissure = self.dico['aretesFaceFissure']) areteFaceFissure = self.dico['aretesFaceFissure'])
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
def setReferencesMaillageFissure(self): def setReferencesMaillageFissure(self):
self.referencesMaillageFissure = dict( \ self.referencesMaillageFissure = dict( \
Entity_Quad_Pyramid = 0,
Entity_Quad_Quadrangle = 0, \ Entity_Quad_Quadrangle = 0, \
Entity_Quad_Hexa = 0, \ Entity_Quad_Hexa = 0, \
Entity_Node = 0, \ Entity_Node = 0, \
Entity_Quad_Edge = 0, \ Entity_Quad_Edge = 0, \
Entity_Quad_Triangle = 0, \ Entity_Quad_Triangle = 0, \
Entity_Quad_Tetra = 0, \ Entity_Quad_Tetra = 0, \
Entity_Quad_Pyramid = 0, \
Entity_Quad_Penta = 0 \ Entity_Quad_Penta = 0 \
) )

View File

@ -34,26 +34,25 @@ def fissureCoudeDlg(context):
# get context study, salomeGui # get context study, salomeGui
study = context.study study = context.study
sg = context.sg sg = context.sg
import os
#import subprocess #import subprocess
#import tempfile #import tempfile
from qtsalome import QFileDialog, QMessageBox, QPalette, QColor, QDialog from qtsalome import QFileDialog, QMessageBox, QPalette, QColor, QDialog
from blocFissure.ihm.fissureCoude_ui import Ui_Dialog from blocFissure.ihm.fissureCoude_ui import Ui_Dialog
class fissureCoudeDialog(QDialog): class fissureCoudeDialog(QDialog):
def __init__(self): def __init__(self):
QDialog.__init__(self) QDialog.__init__(self)
# Set up the user interface from Designer. # Set up the user interface from Designer.
self.ui = Ui_Dialog() self.ui = Ui_Dialog()
self.ui.setupUi(self) self.ui.setupUi(self)
self.blackPalette = self.ui.dsb_angle.palette() self.blackPalette = self.ui.dsb_angle.palette()
self.redPalette = QPalette() self.redPalette = QPalette()
self.redPalette.setColor(QPalette.Text, QColor(255,0,0)) self.redPalette.setColor(QPalette.Text, QColor(255,0,0))
self.NOK = False self.NOK = False
self.initDefaut() self.initDefaut()
self.initDialog(self.defaut) self.initDialog(self.defaut)
self.ui.dsb_angle.setSpecialValueText("saisie_obligatoire") self.ui.dsb_angle.setSpecialValueText("saisie_obligatoire")
@ -74,7 +73,7 @@ def fissureCoudeDlg(context):
self.ui.dsb_aretesFaceFissure.setSpecialValueText("automatique") self.ui.dsb_aretesFaceFissure.setSpecialValueText("automatique")
self.ui.dsb_influence.setSpecialValueText("automatique") self.ui.dsb_influence.setSpecialValueText("automatique")
self.ui.lb_calcul.hide() self.ui.lb_calcul.hide()
# Connect up the buttons. # Connect up the buttons.
self.ui.pb_valPrec.clicked.connect(self.readValPrec) self.ui.pb_valPrec.clicked.connect(self.readValPrec)
self.ui.pb_reset.clicked.connect(self.resetVal) self.ui.pb_reset.clicked.connect(self.resetVal)
@ -82,39 +81,39 @@ def fissureCoudeDlg(context):
self.ui.pb_sauver.clicked.connect(self.sauver) self.ui.pb_sauver.clicked.connect(self.sauver)
self.ui.buttonBox.accepted.disconnect(self.accept) self.ui.buttonBox.accepted.disconnect(self.accept)
self.ui.buttonBox.accepted.connect(self.execute) self.ui.buttonBox.accepted.connect(self.execute)
def initDefaut(self): def initDefaut(self):
self.defaut = dict( self.defaut = dict( \
angle = -181.0, angle = -181.0, \
rCintr = 0.0, rCintr = 0.0, \
lTubeP1 = 0.0, lTubeP1 = 0.0, \
lTubeP2 = 0.0, lTubeP2 = 0.0, \
epais = 0.0, epais = 0.0, \
dext = 0.0, dext = 0.0, \
profondeur = 0.0, profondeur = 0.0, \
longueur = 0.0, longueur = 0.0, \
azimut = -181.0, azimut = -181.0, \
orientation = -1.0, orientation = -1.0, \
posiAngul = -181.0, posiAngul = -181.0, \
absCurv = 0.0, absCurv = 0.0, \
nbTranches = 7, nbTranches = 7, \
nbCouronnes = 1, nbCouronnes = 1, \
nbSecteurs = 3, nbSecteurs = 3, \
cbOptDiscrSain = False, cbOptDiscrSain = False, \
cbOptDiscrFiss = False, cbOptDiscrFiss = False, \
rbPosiAngul = True, rbPosiAngul = True, \
rbFissExt = True, rbFissExt = True, \
cbForceEllipse = False, cbForceEllipse = False, \
nbAxeTubeP1 = 15, nbAxeTubeP1 = 15, \
nbAxeTubeP2 = 15, nbAxeTubeP2 = 15, \
nbAxeCoude = 10, nbAxeCoude = 10, \
nbCirconf = 20, nbCirconf = 20, \
nbEpaisseur = 3, nbEpaisseur = 3, \
rayonTore = 2.0, rayonTore = 2.0, \
aretesFaceFissure = 0.0, aretesFaceFissure = 0.0, \
influence = 0.0, influence = 0.0, \
) )
def initDialog(self, dico): def initDialog(self, dico):
self.ui.dsb_angle.setValue(dico['angle']) self.ui.dsb_angle.setValue(dico['angle'])
self.ui.dsb_rCintr.setValue(dico['rCintr']) self.ui.dsb_rCintr.setValue(dico['rCintr'])
@ -159,7 +158,7 @@ def fissureCoudeDlg(context):
self.ui.cb_forceEllipse.setChecked(dico['cbForceEllipse']) self.ui.cb_forceEllipse.setChecked(dico['cbForceEllipse'])
incomplet = self.testval(dico) incomplet = self.testval(dico)
pass pass
def testval(self, dico): def testval(self, dico):
incomplet = False incomplet = False
if dico['angle'] < -180.0: if dico['angle'] < -180.0:
@ -167,109 +166,109 @@ def fissureCoudeDlg(context):
incomplet = True incomplet = True
else: else:
self.ui.dsb_angle.setPalette(self.blackPalette) self.ui.dsb_angle.setPalette(self.blackPalette)
if dico['rCintr'] == 0.0: if dico['rCintr'] == 0.0:
self.ui.dsb_rCintr.setPalette(self.redPalette) self.ui.dsb_rCintr.setPalette(self.redPalette)
incomplet = True incomplet = True
else: else:
self.ui.dsb_rCintr.setPalette(self.blackPalette) self.ui.dsb_rCintr.setPalette(self.blackPalette)
if dico['lTubeP1'] == 0.0: if dico['lTubeP1'] == 0.0:
self.ui.dsb_lTubeP1.setPalette(self.redPalette) self.ui.dsb_lTubeP1.setPalette(self.redPalette)
incomplet = True incomplet = True
else: else:
self.ui.dsb_lTubeP1.setPalette(self.blackPalette) self.ui.dsb_lTubeP1.setPalette(self.blackPalette)
if dico['lTubeP2'] == 0.0: if dico['lTubeP2'] == 0.0:
self.ui.dsb_lTubeP2.setPalette(self.redPalette) self.ui.dsb_lTubeP2.setPalette(self.redPalette)
incomplet = True incomplet = True
else: else:
self.ui.dsb_lTubeP2.setPalette(self.blackPalette) self.ui.dsb_lTubeP2.setPalette(self.blackPalette)
if dico['epais'] == 0.0: if dico['epais'] == 0.0:
self.ui.dsb_epais.setPalette(self.redPalette) self.ui.dsb_epais.setPalette(self.redPalette)
incomplet = True incomplet = True
else: else:
self.ui.dsb_epais.setPalette(self.blackPalette) self.ui.dsb_epais.setPalette(self.blackPalette)
if dico['dext'] == 0.0: if dico['dext'] == 0.0:
self.ui.dsb_dext.setPalette(self.redPalette) self.ui.dsb_dext.setPalette(self.redPalette)
incomplet = True incomplet = True
else: else:
self.ui.dsb_dext.setPalette(self.blackPalette) self.ui.dsb_dext.setPalette(self.blackPalette)
if dico['profondeur'] == 0.0: if dico['profondeur'] == 0.0:
self.ui.dsb_profondeur.setPalette(self.redPalette) self.ui.dsb_profondeur.setPalette(self.redPalette)
incomplet = True incomplet = True
else: else:
self.ui.dsb_profondeur.setPalette(self.blackPalette) self.ui.dsb_profondeur.setPalette(self.blackPalette)
if dico['longueur'] == 0.0: if dico['longueur'] == 0.0:
self.ui.dsb_longueur.setPalette(self.redPalette) self.ui.dsb_longueur.setPalette(self.redPalette)
incomplet = True incomplet = True
else: else:
self.ui.dsb_longueur.setPalette(self.blackPalette) self.ui.dsb_longueur.setPalette(self.blackPalette)
if dico['azimut'] < -180.0: if dico['azimut'] < -180.0:
self.ui.dsb_azimut.setPalette(self.redPalette) self.ui.dsb_azimut.setPalette(self.redPalette)
incomplet = True incomplet = True
else: else:
self.ui.dsb_azimut.setPalette(self.blackPalette) self.ui.dsb_azimut.setPalette(self.blackPalette)
if dico['orientation'] < 0.0: if dico['orientation'] < 0.0:
self.ui.dsb_orientation.setPalette(self.redPalette) self.ui.dsb_orientation.setPalette(self.redPalette)
incomplet = True incomplet = True
else: else:
self.ui.dsb_orientation.setPalette(self.blackPalette) self.ui.dsb_orientation.setPalette(self.blackPalette)
if dico['posiAngul'] < -180.0 and dico['rbPosiAngul'] == True: if ( ( dico['posiAngul'] < -180.0 ) and dico['rbPosiAngul'] ):
self.ui.dsb_posiAngul.setPalette(self.redPalette) self.ui.dsb_posiAngul.setPalette(self.redPalette)
incomplet = True incomplet = True
else: else:
self.ui.dsb_posiAngul.setPalette(self.blackPalette) self.ui.dsb_posiAngul.setPalette(self.blackPalette)
if dico['absCurv'] == 0.0 and dico['rbPosiAngul'] == False: if ( ( dico['absCurv'] == 0.0 ) and ( not dico['rbPosiAngul'] ) ):
self.ui.dsb_absCurv.setPalette(self.redPalette) self.ui.dsb_absCurv.setPalette(self.redPalette)
incomplet = True incomplet = True
else: else:
self.ui.dsb_absCurv.setPalette(self.blackPalette) self.ui.dsb_absCurv.setPalette(self.blackPalette)
if dico['nbTranches'] == 7: if dico['nbTranches'] == 7:
self.ui.sb_nbTranches.setPalette(self.redPalette) self.ui.sb_nbTranches.setPalette(self.redPalette)
incomplet = True incomplet = True
else: else:
self.ui.sb_nbTranches.setPalette(self.blackPalette) self.ui.sb_nbTranches.setPalette(self.blackPalette)
if dico['nbCouronnes'] == 1: if dico['nbCouronnes'] == 1:
self.ui.sb_nbCouronne.setPalette(self.redPalette) self.ui.sb_nbCouronne.setPalette(self.redPalette)
incomplet = True incomplet = True
else: else:
self.ui.sb_nbCouronne.setPalette(self.blackPalette) self.ui.sb_nbCouronne.setPalette(self.blackPalette)
if dico['nbSecteurs'] == 3: if dico['nbSecteurs'] == 3:
self.ui.sb_nbSecteur.setPalette(self.redPalette) self.ui.sb_nbSecteur.setPalette(self.redPalette)
incomplet = True incomplet = True
else: else:
self.ui.sb_nbSecteur.setPalette(self.blackPalette) self.ui.sb_nbSecteur.setPalette(self.blackPalette)
print("incomplet: ", incomplet) print("incomplet: ", incomplet)
return incomplet return incomplet
def fileDefault(self): def fileDefault(self):
filedef = os.path.expanduser( os.path.join(os.environ["HOME"],".config", "salome", "dialogFissureCoude.dic") ) filedef = os.path.expanduser( os.path.join(os.environ["HOME"],".config", "salome", "dialogFissureCoude.dic") )
print(filedef) print(filedef)
return filedef return filedef
def writeDefault(self, dico): def writeDefault(self, dico):
filedef = self.fileDefault() filedef = self.fileDefault()
with open(filedef, 'w') as f: with open(filedef, 'w') as f:
f.write(str(dico)) f.write(str(dico))
def readValPrec(self): def readValPrec(self):
filedef = self.fileDefault() filedef = self.fileDefault()
if os.path.exists(filedef): if os.path.exists(filedef):
with open(filedef, 'r') as f: with open(filedef, 'r') as f:
txt = f.read() txt = f.read()
dico = eval(txt) dico = eval(txt)
print(dico) print(dico)
self.initDialog(dico) self.initDialog(dico)
@ -277,7 +276,7 @@ def fissureCoudeDlg(context):
def resetVal(self): def resetVal(self):
#self.initDefaut() #self.initDefaut()
self.initDialog(self.defaut) self.initDialog(self.defaut)
def sauver(self): def sauver(self):
print("sauver") print("sauver")
fileDiag = QFileDialog(self) fileDiag = QFileDialog(self)
@ -289,8 +288,8 @@ def fissureCoudeDlg(context):
filedef = fileNames[0] filedef = fileNames[0]
dico = self.creeDico() dico = self.creeDico()
with open(filedef, 'w') as f: with open(filedef, 'w') as f:
f.write(str(dico)) f.write(str(dico))
def recharger(self): def recharger(self):
print("recharger") print("recharger")
fileDiag = QFileDialog(self) fileDiag = QFileDialog(self)
@ -303,45 +302,45 @@ def fissureCoudeDlg(context):
print(filedef) print(filedef)
if os.path.exists(filedef): if os.path.exists(filedef):
with open(filedef, 'r') as f: with open(filedef, 'r') as f:
txt = f.read() txt = f.read()
dico = eval(txt) dico = eval(txt)
print(dico) print(dico)
self.initDialog(dico) self.initDialog(dico)
def creeDico(self): def creeDico(self):
dico = dict( dico = dict( \
angle = self.ui.dsb_angle.value(), angle = self.ui.dsb_angle.value(), \
rCintr = self.ui.dsb_rCintr.value(), rCintr = self.ui.dsb_rCintr.value(), \
lTubeP1 = self.ui.dsb_lTubeP1.value(), lTubeP1 = self.ui.dsb_lTubeP1.value(), \
lTubeP2 = self.ui.dsb_lTubeP2.value(), lTubeP2 = self.ui.dsb_lTubeP2.value(), \
epais = self.ui.dsb_epais.value(), epais = self.ui.dsb_epais.value(), \
dext = self.ui.dsb_dext.value(), dext = self.ui.dsb_dext.value(), \
profondeur = self.ui.dsb_profondeur.value(), profondeur = self.ui.dsb_profondeur.value(), \
longueur = self.ui.dsb_longueur.value(), longueur = self.ui.dsb_longueur.value(), \
azimut = self.ui.dsb_azimut.value(), azimut = self.ui.dsb_azimut.value(), \
orientation = self.ui.dsb_orientation.value(), orientation = self.ui.dsb_orientation.value(), \
posiAngul = self.ui.dsb_posiAngul.value(), posiAngul = self.ui.dsb_posiAngul.value(), \
absCurv = self.ui.dsb_absCurv.value(), absCurv = self.ui.dsb_absCurv.value(), \
nbTranches = self.ui.sb_nbTranches.value(), nbTranches = self.ui.sb_nbTranches.value(), \
nbCouronnes = self.ui.sb_nbCouronne.value(), nbCouronnes = self.ui.sb_nbCouronne.value(), \
nbSecteurs = self.ui.sb_nbSecteur.value(), nbSecteurs = self.ui.sb_nbSecteur.value(), \
cbOptDiscrSain = self.ui.cb_optDiscrSain.isChecked(), cbOptDiscrSain = self.ui.cb_optDiscrSain.isChecked(), \
cbOptDiscrFiss = self.ui.cb_optDiscrFiss.isChecked(), cbOptDiscrFiss = self.ui.cb_optDiscrFiss.isChecked(), \
rbPosiAngul = self.ui.rb_posiAngul.isChecked(), rbPosiAngul = self.ui.rb_posiAngul.isChecked(), \
rbFissExt = self.ui.rb_fissExt.isChecked(), rbFissExt = self.ui.rb_fissExt.isChecked(), \
cbForceEllipse = self.ui.cb_forceEllipse.isChecked(), cbForceEllipse = self.ui.cb_forceEllipse.isChecked(), \
nbAxeTubeP1 = self.ui.sb_nbAxeTubeP1.value(), nbAxeTubeP1 = self.ui.sb_nbAxeTubeP1.value(), \
nbAxeTubeP2 = self.ui.sb_nbAxeTubeP2.value(), nbAxeTubeP2 = self.ui.sb_nbAxeTubeP2.value(), \
nbAxeCoude = self.ui.sb_nbAxeCoude.value(), nbAxeCoude = self.ui.sb_nbAxeCoude.value(), \
nbCirconf = self.ui.sb_nbCirconf.value(), nbCirconf = self.ui.sb_nbCirconf.value(), \
nbEpaisseur = self.ui.sb_nbEpaisseur.value(), nbEpaisseur = self.ui.sb_nbEpaisseur.value(), \
rayonTore = self.ui.dsb_rayonTore.value(), rayonTore = self.ui.dsb_rayonTore.value(), \
aretesFaceFissure = self.ui.dsb_aretesFaceFissure.value(), aretesFaceFissure = self.ui.dsb_aretesFaceFissure.value(), \
influence = self.ui.dsb_influence.value(), influence = self.ui.dsb_influence.value(), \
) )
print(dico) print(dico)
return dico return dico
def checkValues(self): def checkValues(self):
return self.NOK return self.NOK
@ -352,7 +351,7 @@ def fissureCoudeDlg(context):
from blocFissure.gmu import geomsmesh from blocFissure.gmu import geomsmesh
from blocFissure.gmu.casStandard import casStandard from blocFissure.gmu.casStandard import casStandard
from blocFissure.ihm.fissureCoude_ihm import fissureCoude_ihm from blocFissure.ihm.fissureCoude_ihm import fissureCoude_ihm
dico = self.creeDico() dico = self.creeDico()
NOK = self.testval(dico) NOK = self.testval(dico)
if not(NOK): if not(NOK):
@ -370,14 +369,14 @@ def fissureCoudeDlg(context):
if dico['aretesFaceFissure'] == 0: if dico['aretesFaceFissure'] == 0:
dico['aretesFaceFissure'] = (areteMinAngle + areteMinCirco)/2.0 dico['aretesFaceFissure'] = (areteMinAngle + areteMinCirco)/2.0
print('aretesFaceFissure', dico['aretesFaceFissure']) print('aretesFaceFissure', dico['aretesFaceFissure'])
if dico['rbPosiAngul'] == False: if not dico['rbPosiAngul']:
rmoy = (dico['dext'] - dico['epais'])/2.0 rmoy = (dico['dext'] - dico['epais'])/2.0
eta = 1 eta = 1
if dico['rbFissExt'] == False: if not dico['rbFissExt']:
eta = -1 eta = -1
dico['posiAngul'] = (180.0/math.pi)*dico['absCurv']/(dico['rCintr']+(rmoy+eta*dico['epais']/2.0)*math.cos(math.pi*dico['azimut']/180.)) dico['posiAngul'] = (180.0/math.pi)*dico['absCurv']/(dico['rCintr']+(rmoy+eta*dico['epais']/2.0)*math.cos(math.pi*dico['azimut']/180.))
print('posiAngul' , dico['posiAngul']) print('posiAngul' , dico['posiAngul'])
self.writeDefault(dico) self.writeDefault(dico)
self.ui.lb_calcul.show() self.ui.lb_calcul.show()
probleme = fissureCoude_ihm(0) probleme = fissureCoude_ihm(0)
@ -385,11 +384,9 @@ def fissureCoudeDlg(context):
probleme.executeProbleme() probleme.executeProbleme()
self.NOK = NOK self.NOK = NOK
self.accept() self.accept()
pass
# ---------------------------------------------------------------------------- # ----------------------------------------------------------------------------
window = fissureCoudeDialog() window = fissureCoudeDialog()
# window.ui.dsb_tolerance.setValue(0.01) # window.ui.dsb_tolerance.setValue(0.01)
retry = True retry = True
@ -403,5 +400,4 @@ def fissureCoudeDlg(context):
retry = window.checkValues() retry = window.checkValues()
else: else:
print("dialog rejected, exit") print("dialog rejected, exit")
pass