mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-02-04 23:04:18 +05:00
blocFissure general dialog improvement
This commit is contained in:
parent
b219607edd
commit
316b62512c
@ -66,7 +66,7 @@
|
||||
<item row="1" column="0">
|
||||
<widget class="QPushButton" name="pb_facefiss">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>sélection du fichier brep (géométrie) décrivant la face de fissure.</p></body></html></string>
|
||||
<string><html><head/><body><p>sélection du fichier brep (géométrie) décrivant la face de fissure.</p><p>Un champ rouge correspond à un fichier inexistant.</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>face fissure</string>
|
||||
@ -83,7 +83,7 @@
|
||||
<item row="0" column="0">
|
||||
<widget class="QPushButton" name="pb_maillage">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>sélection du fichier med du maillage sain (hexaèdres)</p></body></html></string>
|
||||
<string><html><head/><body><p>sélection du fichier med du maillage sain (hexaèdres)</p><p>Un champ rouge correspond à un fichier inexistant.</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>maillage sain</string>
|
||||
@ -545,6 +545,16 @@
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<item>
|
||||
<widget class="QPushButton" name="pb_exemple">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>génération de jeux de données exemple :</p><p>maillages sain et face de fissure.</p><p>(from blocFissure.materielCasTests import genereMateriel)</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Exemple</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pb_reset">
|
||||
<property name="toolTip">
|
||||
@ -600,11 +610,14 @@
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QDialogButtonBox" name="bb_OkCancel">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>OK : lancer le calcul, sans sauver les paramètres.</p><p>Close : fermer le dialogue sans exécution ni sauvegarde.</p><p><br/></p></body></html></string>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="standardButtons">
|
||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
||||
<set>QDialogButtonBox::Close|QDialogButtonBox::Ok</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -63,6 +63,8 @@ def fissureGeneraleDlg(context):
|
||||
self.ui.lb_calcul.hide()
|
||||
|
||||
# Connect up the buttons.
|
||||
self.connect(self.ui.pb_exemple, QtCore.SIGNAL("clicked()"),
|
||||
self.genereExemples)
|
||||
self.connect(self.ui.pb_valPrec, QtCore.SIGNAL("clicked()"),
|
||||
self.readValPrec)
|
||||
self.connect(self.ui.pb_reset, QtCore.SIGNAL("clicked()"),
|
||||
@ -188,6 +190,18 @@ def fissureGeneraleDlg(context):
|
||||
f.write(str(dico))
|
||||
f.close()
|
||||
|
||||
def genereExemples(self):
|
||||
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:
|
||||
self.ui.lb_calcul.setText("--- Génération exemples en cours ---")
|
||||
self.ui.lb_calcul.show()
|
||||
from blocFissure.materielCasTests import genereMateriel
|
||||
self.ui.lb_calcul.hide()
|
||||
self.initDialog(self.defaut)
|
||||
|
||||
def readValPrec(self):
|
||||
filedef = self.fileDefault()
|
||||
if os.path.exists(filedef):
|
||||
@ -223,6 +237,8 @@ def fissureGeneraleDlg(context):
|
||||
if fileDiag.exec_() :
|
||||
fileNames = fileDiag.selectedFiles()
|
||||
filedef = fileNames[0]
|
||||
if filedef[-4:] not in ['.dic']:
|
||||
filedef += '.dic'
|
||||
dico = self.creeDico()
|
||||
f = open(filedef, 'w')
|
||||
f.write(str(dico))
|
||||
@ -324,6 +340,7 @@ def fissureGeneraleDlg(context):
|
||||
NOK = self.testval(dico)
|
||||
if not(NOK):
|
||||
self.writeDefault(dico)
|
||||
self.ui.lb_calcul.setText("--- Calcul en cours ---")
|
||||
self.ui.lb_calcul.show()
|
||||
logfile=os.path.join(dico['reptrav'], dico['nomres']+".log")
|
||||
self.setLogVerbosity(logfile)
|
||||
@ -352,7 +369,8 @@ def fissureGeneraleDlg(context):
|
||||
# except Exception as erreur:
|
||||
# print "exception non répertoriée"
|
||||
self.NOK = NOK
|
||||
self.accept()
|
||||
self.ui.lb_calcul.hide()
|
||||
#self.accept()
|
||||
|
||||
pass
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user