mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-02-05 01:54: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">
|
<item row="1" column="0">
|
||||||
<widget class="QPushButton" name="pb_facefiss">
|
<widget class="QPushButton" name="pb_facefiss">
|
||||||
<property name="toolTip">
|
<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>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>face fissure</string>
|
<string>face fissure</string>
|
||||||
@ -83,7 +83,7 @@
|
|||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<widget class="QPushButton" name="pb_maillage">
|
<widget class="QPushButton" name="pb_maillage">
|
||||||
<property name="toolTip">
|
<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>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>maillage sain</string>
|
<string>maillage sain</string>
|
||||||
@ -545,6 +545,16 @@
|
|||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
<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>
|
<item>
|
||||||
<widget class="QPushButton" name="pb_reset">
|
<widget class="QPushButton" name="pb_reset">
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
@ -600,11 +610,14 @@
|
|||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QDialogButtonBox" name="bb_OkCancel">
|
<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">
|
<property name="orientation">
|
||||||
<enum>Qt::Horizontal</enum>
|
<enum>Qt::Horizontal</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="standardButtons">
|
<property name="standardButtons">
|
||||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
<set>QDialogButtonBox::Close|QDialogButtonBox::Ok</set>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
@ -63,6 +63,8 @@ def fissureGeneraleDlg(context):
|
|||||||
self.ui.lb_calcul.hide()
|
self.ui.lb_calcul.hide()
|
||||||
|
|
||||||
# Connect up the buttons.
|
# 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.connect(self.ui.pb_valPrec, QtCore.SIGNAL("clicked()"),
|
||||||
self.readValPrec)
|
self.readValPrec)
|
||||||
self.connect(self.ui.pb_reset, QtCore.SIGNAL("clicked()"),
|
self.connect(self.ui.pb_reset, QtCore.SIGNAL("clicked()"),
|
||||||
@ -188,6 +190,18 @@ def fissureGeneraleDlg(context):
|
|||||||
f.write(str(dico))
|
f.write(str(dico))
|
||||||
f.close()
|
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):
|
def readValPrec(self):
|
||||||
filedef = self.fileDefault()
|
filedef = self.fileDefault()
|
||||||
if os.path.exists(filedef):
|
if os.path.exists(filedef):
|
||||||
@ -223,6 +237,8 @@ def fissureGeneraleDlg(context):
|
|||||||
if fileDiag.exec_() :
|
if fileDiag.exec_() :
|
||||||
fileNames = fileDiag.selectedFiles()
|
fileNames = fileDiag.selectedFiles()
|
||||||
filedef = fileNames[0]
|
filedef = fileNames[0]
|
||||||
|
if filedef[-4:] not in ['.dic']:
|
||||||
|
filedef += '.dic'
|
||||||
dico = self.creeDico()
|
dico = self.creeDico()
|
||||||
f = open(filedef, 'w')
|
f = open(filedef, 'w')
|
||||||
f.write(str(dico))
|
f.write(str(dico))
|
||||||
@ -324,6 +340,7 @@ def fissureGeneraleDlg(context):
|
|||||||
NOK = self.testval(dico)
|
NOK = self.testval(dico)
|
||||||
if not(NOK):
|
if not(NOK):
|
||||||
self.writeDefault(dico)
|
self.writeDefault(dico)
|
||||||
|
self.ui.lb_calcul.setText("--- Calcul en cours ---")
|
||||||
self.ui.lb_calcul.show()
|
self.ui.lb_calcul.show()
|
||||||
logfile=os.path.join(dico['reptrav'], dico['nomres']+".log")
|
logfile=os.path.join(dico['reptrav'], dico['nomres']+".log")
|
||||||
self.setLogVerbosity(logfile)
|
self.setLogVerbosity(logfile)
|
||||||
@ -352,7 +369,8 @@ def fissureGeneraleDlg(context):
|
|||||||
# except Exception as erreur:
|
# except Exception as erreur:
|
||||||
# print "exception non répertoriée"
|
# print "exception non répertoriée"
|
||||||
self.NOK = NOK
|
self.NOK = NOK
|
||||||
self.accept()
|
self.ui.lb_calcul.hide()
|
||||||
|
#self.accept()
|
||||||
|
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user