mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-14 02:30:33 +05:00
set log verbosity, general crack dialog
This commit is contained in:
parent
27d9294f19
commit
15a305400b
@ -1,7 +1,7 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import logging
|
||||
logging.info('start')
|
||||
#logging.info('start')
|
||||
import initLog
|
||||
|
||||
import salome
|
||||
@ -13,7 +13,7 @@ geompy = geomBuilder.New(salome.myStudy)
|
||||
from salome.smesh import smeshBuilder
|
||||
smesh = smeshBuilder.New(salome.myStudy)
|
||||
|
||||
logging.debug("initialisation de geompy et smesh OK")
|
||||
# logging.debug("initialisation de geompy et smesh OK")
|
||||
|
||||
def geomPublish(level,aShape, aName):
|
||||
if initLog.getLogLevel() <= level:
|
||||
|
@ -25,14 +25,6 @@
|
||||
import sys, traceback
|
||||
import math
|
||||
from blocFissure import gmu
|
||||
from blocFissure.gmu import initLog
|
||||
#initLog.setDebug()
|
||||
initLog.setVerbose()
|
||||
|
||||
from blocFissure.gmu import geomsmesh
|
||||
from blocFissure.gmu.casStandard import casStandard
|
||||
|
||||
from blocFissure.ihm.fissureCoude_ihm import fissureCoude_ihm
|
||||
|
||||
def fissureCoudeDlg(context):
|
||||
# get context study, studyId, salomeGui
|
||||
@ -363,6 +355,13 @@ def fissureCoudeDlg(context):
|
||||
return self.NOK
|
||||
|
||||
def execute(self):
|
||||
from blocFissure.gmu import initLog
|
||||
#initLog.setDebug()
|
||||
initLog.setVerbose() # don't set the level too early, to be able to modify it
|
||||
from blocFissure.gmu import geomsmesh
|
||||
from blocFissure.gmu.casStandard import casStandard
|
||||
from blocFissure.ihm.fissureCoude_ihm import fissureCoude_ihm
|
||||
|
||||
dico = self.creeDico()
|
||||
NOK = self.testval(dico)
|
||||
if not(NOK):
|
||||
|
@ -6,8 +6,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>631</width>
|
||||
<height>560</height>
|
||||
<width>629</width>
|
||||
<height>536</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
@ -16,7 +16,7 @@
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Insertion d'un maillage de fissure dans un maillage hexaédrique sain.</p><p>Le maillage sain est fourni sous forme de fichier Med.</p><p>La face de fissure est décrite par une géométrie dans un fichier brep.</p><p>La ou les arêtes de fond de fissure sont données par leurs index dans la face de fissure.</p><p>La procédure identfie des mailles saines à enlever et remailler, construit un maillage régulier rayonnant autour de la ligne de fond de fissure, reconstitue les faces externes en triangles, complète la zone à remailler en tétraèdres.</p></body></html></string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="title">
|
||||
@ -35,7 +35,7 @@
|
||||
<item>
|
||||
<widget class="QLineEdit" name="le_fondfiss">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Index des edges décrivant le fond de fissure, dans la face de fissure.</p><p>Sous forme d'une liste Python.</p><p>Exemples :<span style=" color:#00ffff;"/><span style=" font-style:italic; color:#00ffff;">[5,9]</span> ou <span style=" font-style:italic; color:#00ffff;">[3]</span></p><p>(on peut récupérer ces valeurs à l'aide du dialogue de création de groupes d'edges, dans GEOM)</p></body></html></string>
|
||||
<string><html><head/><body><p>Index des edges décrivant le fond de fissure, dans la face de fissure.</p><p>Sous forme d'une liste Python.</p><p>Exemples :<span style=" color:#00ffff;"/><span style=" font-style:italic; color:#000080;">[5,9]</span> ou <span style=" font-style:italic; color:#000080;">[3]</span></p><p>(on peut récupérer ces valeurs à l'aide du dialogue de création de groupes d'edges, dans GEOM)</p></body></html></string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@ -98,23 +98,23 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QGridLayout" name="gridLayout_10">
|
||||
<item row="0" column="0">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_12">
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_2">
|
||||
<property name="title">
|
||||
<string>identification zone à remailler</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_12">
|
||||
<item row="0" column="0">
|
||||
<layout class="QGridLayout" name="gridLayout_6">
|
||||
<item row="0" column="0">
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>distance influence</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<item>
|
||||
<widget class="QDoubleSpinBox" name="dsb_influence">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>La zone remaillée contiendra toutes les mailles du maillage sain à une distance de la face de fissure inférieure à cette valeur.</p></body></html></string>
|
||||
@ -126,101 +126,189 @@
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<spacer name="horizontalSpacer_6">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_8">
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_3">
|
||||
<property name="title">
|
||||
<string>prémaillage face fissure</string>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_7">
|
||||
<item>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>min</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QDoubleSpinBox" name="dsb_meshBrepMin">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Pour faciliter la détermination de la zone à remailler, il faut des points sur la face de fissure, suffisament resserrés, en relation avec la taille des mailles du maillage sain.</p><p>Ces points sont obtenus par pré maillage de la face de fissure, en triangles. On donne la taille min et max des triangles.</p></body></html></string>
|
||||
</property>
|
||||
<property name="decimals">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<double>1000000.000000000000000</double>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string>max</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QDoubleSpinBox" name="dsb_meshBrepMax">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Pour faciliter la détermination de la zone à remailler, il faut des points sur la face de fissure, suffisament resserrés, en relation avec la taille des mailles du maillage sain.</p><p>Ces points sont obtenus par pré maillage de la face de fissure, en triangles. On donne la taille min et max des triangles.</p></body></html></string>
|
||||
</property>
|
||||
<property name="decimals">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<double>1000000.000000000000000</double>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>13</width>
|
||||
<height>17</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_9">
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_7">
|
||||
<property name="title">
|
||||
<string>messages</string>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_6">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_10">
|
||||
<property name="text">
|
||||
<string>mode</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="cb_log">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>L'affichage de messages pendant le calcul peut aider à la mise au point du maillage.</p><p>- Le mode <span style=" font-weight:600;">silencieux</span> donne très peu d'information,</p><p>- Le mode <span style=" font-weight:600;">verbeux</span> liste les principales étapes du calcul,</p><p>- Le mode <span style=" font-weight:600;">debug</span> donne un maximum de détail, et publie des objets intermédiaires dans l'étude.</p><p><br/></p></body></html></string>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>silencieux</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>verbeux</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>debug</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_9">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>18</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>20</height>
|
||||
<width>20</width>
|
||||
<height>17</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="1" column="0" colspan="2">
|
||||
<widget class="QGroupBox" name="groupBox_3">
|
||||
<property name="title">
|
||||
<string>prémaillage face fissure</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_5">
|
||||
<item row="0" column="0">
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>min</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QDoubleSpinBox" name="dsb_meshBrepMin">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Pour faciliter la détermination de la zone à remailler, il faut des points sur la face de fissure, suffisament resserrés, en relation avec la taille des mailles du maillage sain.</p><p>Ces points sont obtenus par pré maillage de la face de fissure, en triangles. On donne la taille min et max des triangles.</p></body></html></string>
|
||||
</property>
|
||||
<property name="decimals">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<double>1000000.000000000000000</double>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string>max</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QDoubleSpinBox" name="dsb_meshBrepMax">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Pour faciliter la détermination de la zone à remailler, il faut des points sur la face de fissure, suffisament resserrés, en relation avec la taille des mailles du maillage sain.</p><p>Ces points sont obtenus par pré maillage de la face de fissure, en triangles. On donne la taille min et max des triangles.</p></body></html></string>
|
||||
</property>
|
||||
<property name="decimals">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<double>1000000.000000000000000</double>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<spacer name="horizontalSpacer_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>34</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
<zorder>groupBox_3</zorder>
|
||||
<zorder>groupBox_7</zorder>
|
||||
<zorder>horizontalSpacer_3</zorder>
|
||||
<zorder>verticalSpacer</zorder>
|
||||
<zorder>horizontalSpacer_3</zorder>
|
||||
<zorder>horizontalSpacer_9</zorder>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1" rowspan="2">
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_6">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>17</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_4">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>maillage zone de fissure</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_9">
|
||||
<item row="0" column="0">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_5">
|
||||
<property name="title">
|
||||
<string>pipe rayonnant</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_7">
|
||||
<item row="0" column="0">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_10">
|
||||
<item>
|
||||
<layout class="QGridLayout" name="gridLayout_3">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_5">
|
||||
@ -310,7 +398,7 @@
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_4">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
@ -326,20 +414,20 @@
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_6">
|
||||
<property name="title">
|
||||
<string>faces externes</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_8">
|
||||
<item row="0" column="0">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_11">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_9">
|
||||
<property name="text">
|
||||
<string>aretes face fissure</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<item>
|
||||
<widget class="QDoubleSpinBox" name="dsb_areteFaceFissure">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Faces externes de la zone à remailler.</p><p>Mailage en triangles : valeur cible des arêtes.</p></body></html></string>
|
||||
@ -352,7 +440,7 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_5">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
@ -371,19 +459,6 @@
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>112</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
|
@ -25,12 +25,6 @@
|
||||
import sys, traceback
|
||||
import math
|
||||
from blocFissure import gmu
|
||||
from blocFissure.gmu import initLog
|
||||
#initLog.setDebug()
|
||||
initLog.setVerbose()
|
||||
|
||||
from blocFissure.gmu import geomsmesh
|
||||
from blocFissure.gmu.casStandard import casStandard
|
||||
|
||||
def fissureGeneraleDlg(context):
|
||||
# get context study, studyId, salomeGui
|
||||
@ -52,6 +46,7 @@ def fissureGeneraleDlg(context):
|
||||
class fissureGeneraleDialog(QtGui.QDialog):
|
||||
|
||||
def __init__(self):
|
||||
print "__init__"
|
||||
QtGui.QDialog.__init__(self)
|
||||
# Set up the user interface from Designer.
|
||||
self.ui = Ui_Dialog()
|
||||
@ -195,6 +190,19 @@ def fissureGeneraleDlg(context):
|
||||
#self.initDefaut()
|
||||
self.initDialog(self.defaut)
|
||||
|
||||
def setLogVerbosity(self):
|
||||
from blocFissure.gmu import initLog # le mode de log s'initialise une seule fois
|
||||
print "setLogVerbosity"
|
||||
index = self.ui.cb_log.currentIndex()
|
||||
print index
|
||||
if index == 0:
|
||||
initLog.setRelease()
|
||||
elif index == 1:
|
||||
initLog.setVerbose()
|
||||
elif index == 2:
|
||||
initLog.setDebug()
|
||||
|
||||
|
||||
def sauver(self):
|
||||
print "sauver"
|
||||
fileDiag = QFileDialog(self)
|
||||
@ -268,11 +276,15 @@ def fissureGeneraleDlg(context):
|
||||
return self.NOK
|
||||
|
||||
def execute(self):
|
||||
print "execute"
|
||||
dico = self.creeDico()
|
||||
NOK = self.testval(dico)
|
||||
if not(NOK):
|
||||
self.writeDefault(dico)
|
||||
self.ui.lb_calcul.show()
|
||||
self.setLogVerbosity()
|
||||
from blocFissure.gmu import geomsmesh # après intialisation log dans setLogVerbosity
|
||||
from blocFissure.gmu.casStandard import casStandard # après intialisation log dans setLogVerbosity
|
||||
execInstance = casStandard(dico)
|
||||
self.NOK = NOK
|
||||
self.accept()
|
||||
@ -280,7 +292,8 @@ def fissureGeneraleDlg(context):
|
||||
pass
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
|
||||
|
||||
print "main"
|
||||
window = fissureGeneraleDialog()
|
||||
retry = True
|
||||
while(retry):
|
||||
|
Loading…
Reference in New Issue
Block a user