mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-12-29 02:40:35 +05:00
Dump Python extension.
This commit is contained in:
parent
df96082091
commit
e184ed39fa
@ -164,6 +164,8 @@ NO_NAME = "NoName"
|
|||||||
|
|
||||||
## Gets object name
|
## Gets object name
|
||||||
def GetName(obj):
|
def GetName(obj):
|
||||||
|
if isinstance(obj, BaseWrapper):
|
||||||
|
obj = obj.GetAlgorithm()
|
||||||
ior = salome.orb.object_to_string(obj)
|
ior = salome.orb.object_to_string(obj)
|
||||||
sobj = salome.myStudy.FindObjectIOR(ior)
|
sobj = salome.myStudy.FindObjectIOR(ior)
|
||||||
if sobj is None:
|
if sobj is None:
|
||||||
@ -346,6 +348,17 @@ class smeshDC(SMESH._objref_SMESH_Gen):
|
|||||||
aMesh = Mesh(self, self.geompyD, aSmeshMesh)
|
aMesh = Mesh(self, self.geompyD, aSmeshMesh)
|
||||||
return aMesh
|
return aMesh
|
||||||
|
|
||||||
|
## Create hyporthesis
|
||||||
|
# @return an instance of hypothesis
|
||||||
|
# @ingroup l2_impexp
|
||||||
|
def CreateHypothesis(self, hyp, so):
|
||||||
|
hypo = SMESH._objref_SMESH_Gen.CreateHypothesis(self, hyp, so)
|
||||||
|
if hyp == "LocalLength":
|
||||||
|
hypo = LocalLength(hypo)
|
||||||
|
|
||||||
|
return hypo
|
||||||
|
|
||||||
|
|
||||||
## Creates a Mesh object(s) importing data from the given MED file
|
## Creates a Mesh object(s) importing data from the given MED file
|
||||||
# @return a list of Mesh class instances
|
# @return a list of Mesh class instances
|
||||||
# @ingroup l2_impexp
|
# @ingroup l2_impexp
|
||||||
@ -2876,9 +2889,13 @@ class Mesh_Algorithm:
|
|||||||
pass
|
pass
|
||||||
SetName(hypo, hyp + a)
|
SetName(hypo, hyp + a)
|
||||||
pass
|
pass
|
||||||
status = self.mesh.mesh.AddHypothesis(self.geom, hypo)
|
bhypo = None
|
||||||
|
if isinstance(hypo,BaseWrapper):
|
||||||
|
bhypo = hypo.GetAlgorithm()
|
||||||
|
else:
|
||||||
|
bhypo = hypo
|
||||||
|
status = self.mesh.mesh.AddHypothesis(self.geom, bhypo)
|
||||||
TreatHypoStatus( status, GetName(hypo), GetName(self.geom), 0 )
|
TreatHypoStatus( status, GetName(hypo), GetName(self.geom), 0 )
|
||||||
hypo = WrapHypothesis(hypo,hyp)
|
|
||||||
return hypo
|
return hypo
|
||||||
|
|
||||||
|
|
||||||
@ -4019,11 +4036,6 @@ class Mesh_UseExisting(Mesh_Algorithm):
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
def WrapHypothesis(hypo, hyp):
|
|
||||||
if hyp == "LocalLength":
|
|
||||||
return LocalLength(hypo)
|
|
||||||
return hypo
|
|
||||||
|
|
||||||
from salome_notebook import *
|
from salome_notebook import *
|
||||||
|
|
||||||
##Base class for wrap all StdMeshers interfaces
|
##Base class for wrap all StdMeshers interfaces
|
||||||
|
Loading…
Reference in New Issue
Block a user