Salome HOME
projects
/
modules
/
smesh.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
c365f36
)
Improve GetMinMax()
author
eap
<eap@opencascade.com>
Fri, 30 May 2014 16:24:08 +0000
(20:24 +0400)
committer
eap
<eap@opencascade.com>
Fri, 30 May 2014 16:24:08 +0000
(20:24 +0400)
src/SMESH_SWIG/smeshBuilder.py
patch
|
blob
|
history
diff --git
a/src/SMESH_SWIG/smeshBuilder.py
b/src/SMESH_SWIG/smeshBuilder.py
index 6e0812455081549f998ed16694018a11e7158522..b243f38509421b69a649acd34295fc3f70044c4d 100644
(file)
--- a/
src/SMESH_SWIG/smeshBuilder.py
+++ b/
src/SMESH_SWIG/smeshBuilder.py
@@
-4635,12
+4635,22
@@
class Mesh:
## Return minimal and maximal value of a given functor.
# @param funType a functor type, an item of SMESH.FunctorType enum
# (one of SMESH.FunctorType._items)
## Return minimal and maximal value of a given functor.
# @param funType a functor type, an item of SMESH.FunctorType enum
# (one of SMESH.FunctorType._items)
+ # @param meshPart a part of mesh (group, sub-mesh) to treat
# @return tuple (min,max)
# @ingroup l1_measurements
# @return tuple (min,max)
# @ingroup l1_measurements
- def GetMinMax(self, funType):
+ def GetMinMax(self, funType, meshPart=None):
+ unRegister = genObjUnRegister()
+ if isinstance( meshPart, list ):
+ meshPart = self.GetIDSource( meshPart, SMESH.ALL )
+ unRegister.set( meshPart )
+ if isinstance( meshPart, Mesh ):
+ meshPart = meshPart.mesh
fun = self._getFunctor( funType )
if fun:
fun = self._getFunctor( funType )
if fun:
- hist = fun.GetHistogram( 1, False )
+ if meshPart:
+ hist = fun.GetLocalHistogram( 1, False, meshPart )
+ else:
+ hist = fun.GetHistogram( 1, False )
if hist:
return hist[0].min, hist[0].max
return None
if hist:
return hist[0].min, hist[0].max
return None