mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-11-15 10:08:34 +05:00
in GetCriterion(), publish a not published threshold shape instead of
throwing an exception
This commit is contained in:
parent
e867938e10
commit
3ac36b919f
@ -642,7 +642,11 @@ class smeshDC(SMESH._objref_SMESH_Gen):
|
|||||||
aCriterion.ThresholdStr = GetName(aThreshold)
|
aCriterion.ThresholdStr = GetName(aThreshold)
|
||||||
aCriterion.ThresholdID = aThreshold.GetStudyEntry()
|
aCriterion.ThresholdID = aThreshold.GetStudyEntry()
|
||||||
if not aCriterion.ThresholdID:
|
if not aCriterion.ThresholdID:
|
||||||
raise RuntimeError, "Threshold shape must be published"
|
name = aCriterion.ThresholdStr
|
||||||
|
if not name:
|
||||||
|
name = "%s_%s"%(aThreshold.GetShapeType(), id(aThreshold)%10000)
|
||||||
|
aCriterion.ThresholdID = self.geompyD.addToStudy( aThreshold, name )
|
||||||
|
#raise RuntimeError, "Threshold shape must be published"
|
||||||
else:
|
else:
|
||||||
print "Error: The Threshold should be a shape."
|
print "Error: The Threshold should be a shape."
|
||||||
return None
|
return None
|
||||||
|
Loading…
Reference in New Issue
Block a user