Salome HOME
projects
/
modules
/
gui.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'hydro/imps_2015' of https://git.salome-platform.org/gitpub/modules...
[modules/gui.git]
/
src
/
SalomeApp
/
pluginsdemo
/
minmax_plugin.py
diff --git
a/src/SalomeApp/pluginsdemo/minmax_plugin.py
b/src/SalomeApp/pluginsdemo/minmax_plugin.py
index ee44188e578460d250ba5ea69de49ca23eb80a3d..adc7594261714fe04b48b66808d42c4a122a0236 100644
(file)
--- a/
src/SalomeApp/pluginsdemo/minmax_plugin.py
+++ b/
src/SalomeApp/pluginsdemo/minmax_plugin.py
@@
-115,23
+115,20
@@
def minmax(context):
mm = study.FindObjectID(objId).GetObject()
mesh = None
try:
mm = study.FindObjectID(objId).GetObject()
mesh = None
try:
- mesh = mm.Load()
+ mm.Load()
+ mesh = mm
except:
except:
- #print "No mesh selected"
self.clearLineEdit()
mesh = None
pass
if mesh:
self.clearLineEdit()
mesh = None
pass
if mesh:
+ name = smeshBuilder.GetName( mm )
self.ui.mesh.setStyleSheet("")
self.ui.mesh.setStyleSheet("")
- self.ui.mesh.setText(mesh.getName())
- #print "Mesh selected: ", mesh.getName()
+ self.ui.mesh.setText( name )
self.mm = mm
e = self.mm.NbEdges()
f = self.mm.NbFaces()
v = self.mm.NbVolumes()
self.mm = mm
e = self.mm.NbEdges()
f = self.mm.NbFaces()
v = self.mm.NbVolumes()
- #print "NbEdges: ",e
- #print "NbFaces: ",f
- #print "NbVolumes: ",v
controls = []
if e:
controls += controls_1d
controls = []
if e:
controls += controls_1d
@@
-162,20
+159,16
@@
Inputs:
pass
def compute_minmax(self):
pass
def compute_minmax(self):
- if self.mm:
- control = self.ui.control.currentText()
- #print "Compute control: ",control
+ control = self.ui.control.currentText()
+ if self.mm and control:
fun = smesh.GetFunctor(controls_dict[str(control)])
fun = smesh.GetFunctor(controls_dict[str(control)])
- fun.SetMesh(self.mm
.GetMesh()
)
- hist = fun.GetHistogram(1)
+ fun.SetMesh(self.mm)
+ hist = fun.GetHistogram(1
,False
)
maxVal = hist[0].max
minVal = hist[0].min
maxVal = hist[0].max
minVal = hist[0].min
- #print "Max value for %s: %f"%(control, maxVal)
- #print "Min value for %s: %f"%(control, minVal)
self.ui.maxvalue.setText("%f"%(maxVal))
self.ui.minvalue.setText("%f"%(minVal))
else:
self.ui.maxvalue.setText("%f"%(maxVal))
self.ui.minvalue.setText("%f"%(minVal))
else:
- print "Pas de maillage"
pass
pass
pass
pass
pass
pass