mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-11-15 10:08:34 +05:00
0020095: EDF 896 SMESH : Advanced Mesh info on a group
Additional minor fix
This commit is contained in:
parent
3ba3d8a91d
commit
76756b1464
@ -816,6 +816,20 @@ class smeshDC(SMESH._objref_SMESH_Gen):
|
|||||||
def CreateHypothesis(self, theHType, theLibName="libStdMeshersEngine.so"):
|
def CreateHypothesis(self, theHType, theLibName="libStdMeshersEngine.so"):
|
||||||
return SMESH._objref_SMESH_Gen.CreateHypothesis(self, theHType, theLibName )
|
return SMESH._objref_SMESH_Gen.CreateHypothesis(self, theHType, theLibName )
|
||||||
|
|
||||||
|
## Gets the mesh stattistic
|
||||||
|
# @return dictionary type element - count of elements
|
||||||
|
# @ingroup l1_meshinfo
|
||||||
|
def GetMeshInfo(self, obj):
|
||||||
|
if isinstance( obj, Mesh ):
|
||||||
|
obj = obj.GetMesh()
|
||||||
|
d = {}
|
||||||
|
if hasattr(obj, "_narrow") and obj._narrow(SMESH.SMESH_IDSource):
|
||||||
|
values = obj.GetMeshInfo()
|
||||||
|
for i in range(SMESH.Entity_Last._v):
|
||||||
|
if i < len(values): d[SMESH.EntityType._item(i)]=values[i]
|
||||||
|
pass
|
||||||
|
return d
|
||||||
|
|
||||||
import omniORB
|
import omniORB
|
||||||
#Registering the new proxy for SMESH_Gen
|
#Registering the new proxy for SMESH_Gen
|
||||||
omniORB.registerObjref(SMESH._objref_SMESH_Gen._NP_RepositoryId, smeshDC)
|
omniORB.registerObjref(SMESH._objref_SMESH_Gen._NP_RepositoryId, smeshDC)
|
||||||
@ -1650,13 +1664,7 @@ class Mesh:
|
|||||||
# @ingroup l1_meshinfo
|
# @ingroup l1_meshinfo
|
||||||
def GetMeshInfo(self, obj = None):
|
def GetMeshInfo(self, obj = None):
|
||||||
if not obj: obj = self.mesh
|
if not obj: obj = self.mesh
|
||||||
d = {}
|
return self.smeshpyD.GetMeshInfo(obj)
|
||||||
if hasattr(obj, "_narrow") and obj._narrow(SMESH.SMESH_IDSource):
|
|
||||||
values = obj.GetMeshInfo()
|
|
||||||
for i in range(SMESH.Entity_Last._v):
|
|
||||||
if i < len(values): d[SMESH.EntityType._item(i)]=values[i]
|
|
||||||
pass
|
|
||||||
return d
|
|
||||||
|
|
||||||
## Returns the number of nodes in the mesh
|
## Returns the number of nodes in the mesh
|
||||||
# @return an integer value
|
# @return an integer value
|
||||||
|
Loading…
Reference in New Issue
Block a user