0051789: TC7.2.0: NoteBook cannot update study

In StdMeshersDC_RadialPrism3D, create LayerDistribution hyp only as needed
This commit is contained in:
eap 2013-03-29 13:29:39 +00:00
parent 35ba9b8c12
commit 9c81b247e5

View File

@ -870,7 +870,7 @@ class StdMeshersDC_Prism3D(Mesh_Algorithm):
else: else:
self.algoType = "RadialPrism_3D" self.algoType = "RadialPrism_3D"
self.Create(mesh, geom, "RadialPrism_3D") self.Create(mesh, geom, "RadialPrism_3D")
self.distribHyp = self.Hypothesis("LayerDistribution", UseExisting=0) self.distribHyp = None #self.Hypothesis("LayerDistribution", UseExisting=0)
self.nbLayers = None self.nbLayers = None
pass pass
pass pass
@ -895,6 +895,8 @@ class StdMeshersDC_Prism3D(Mesh_Algorithm):
self.mesh.smeshpyD.SetCurrentStudy( None ) self.mesh.smeshpyD.SetCurrentStudy( None )
hyp = self.mesh.smeshpyD.CreateHypothesis(hypType, so) hyp = self.mesh.smeshpyD.CreateHypothesis(hypType, so)
self.mesh.smeshpyD.SetCurrentStudy( study ) # enables publishing self.mesh.smeshpyD.SetCurrentStudy( study ) # enables publishing
if not distribHyp:
self.distribHyp = self.Hypothesis("LayerDistribution", UseExisting=0)
self.distribHyp.SetLayerDistribution( hyp ) self.distribHyp.SetLayerDistribution( hyp )
return hyp return hyp
@ -1012,7 +1014,7 @@ class StdMeshersDC_RadialPrism3D(StdMeshersDC_Prism3D):
if not shape: if not shape:
shape = mesh.geom shape = mesh.geom
self.Create(mesh, geom, "RadialPrism_3D") self.Create(mesh, geom, "RadialPrism_3D")
self.distribHyp = self.Hypothesis("LayerDistribution", UseExisting=0) self.distribHyp = None
self.nbLayers = None self.nbLayers = None
return return