mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-30 10:20:32 +05:00
PAL13473 (Build repetitive mesh):
remove LayersDistribution hyp when NbOfLayers is assigned
This commit is contained in:
parent
2bb9a7b8b4
commit
c5588b6611
@ -930,6 +930,7 @@ class Mesh_RadialPrism3D(Mesh_Algorithm):
|
|||||||
def __init__(self, mesh, geom=0):
|
def __init__(self, mesh, geom=0):
|
||||||
self.Create(mesh, geom, "RadialPrism_3D")
|
self.Create(mesh, geom, "RadialPrism_3D")
|
||||||
self.distribHyp = self.Hypothesis( "LayerDistribution" )
|
self.distribHyp = self.Hypothesis( "LayerDistribution" )
|
||||||
|
self.nbLayers = None
|
||||||
|
|
||||||
## Return 3D hypothesis holding the 1D one
|
## Return 3D hypothesis holding the 1D one
|
||||||
def Get3DHypothesis(self):
|
def Get3DHypothesis(self):
|
||||||
@ -938,6 +939,9 @@ class Mesh_RadialPrism3D(Mesh_Algorithm):
|
|||||||
## Private method creating 1D hypothes and storing it in the LayerDistribution
|
## Private method creating 1D hypothes and storing it in the LayerDistribution
|
||||||
# hypothes. Returns the created hypothes
|
# hypothes. Returns the created hypothes
|
||||||
def OwnHypothesis(self, hypType, args=[], so="libStdMeshersEngine.so"):
|
def OwnHypothesis(self, hypType, args=[], so="libStdMeshersEngine.so"):
|
||||||
|
if not self.nbLayers is None:
|
||||||
|
self.mesh.GetMesh().RemoveHypothesis( self.geom, self.nbLayers )
|
||||||
|
self.mesh.GetMesh().AddHypothesis( self.geom, self.distribHyp )
|
||||||
study = GetCurrentStudy() # prevent publishing of own 1D hypothesis
|
study = GetCurrentStudy() # prevent publishing of own 1D hypothesis
|
||||||
hyp = smesh.CreateHypothesis(hypType, so)
|
hyp = smesh.CreateHypothesis(hypType, so)
|
||||||
SetCurrentStudy( study ) # anable publishing
|
SetCurrentStudy( study ) # anable publishing
|
||||||
@ -947,9 +951,10 @@ class Mesh_RadialPrism3D(Mesh_Algorithm):
|
|||||||
## Define "NumberOfLayers" hypothesis, specifying a number of layers of
|
## Define "NumberOfLayers" hypothesis, specifying a number of layers of
|
||||||
# prisms to build between the inner and outer shells
|
# prisms to build between the inner and outer shells
|
||||||
def NumberOfLayers(self, n ):
|
def NumberOfLayers(self, n ):
|
||||||
hyp = self.Hypothesis("NumberOfLayers")
|
self.mesh.GetMesh().RemoveHypothesis( self.geom, self.distribHyp )
|
||||||
hyp.SetNumberOfLayers( n )
|
self.nbLayers = self.Hypothesis("NumberOfLayers")
|
||||||
return hyp
|
self.nbLayers.SetNumberOfLayers( n )
|
||||||
|
return self.nbLayers
|
||||||
|
|
||||||
## Define "LocalLength" hypothesis, specifying segment length
|
## Define "LocalLength" hypothesis, specifying segment length
|
||||||
# to build between the inner and outer shells
|
# to build between the inner and outer shells
|
||||||
|
Loading…
Reference in New Issue
Block a user