Salome HOME
IMP 22635: EDF 8345 - Creation of group based on groups
[modules/smesh.git] / src / SMESH_SWIG / smeshBuilder.py
index b85912b6b66779ddb3a88c3b1c7be579728ae81a..07d46509b3362c896619414bcafe7749e41355a7 100644 (file)
@@ -757,6 +757,13 @@ class smeshBuilder(object, SMESH._objref_SMESH_Gen):
                     raise ValueError, "Group type mismatches Element type"
                 aCriterion.ThresholdStr = aThreshold.GetName()
                 aCriterion.ThresholdID  = salome.orb.object_to_string( aThreshold )
+                study = self.GetCurrentStudy()
+                if study:
+                    so = study.FindObjectIOR( aCriterion.ThresholdID )
+                    if so:
+                        entry = so.GetID()
+                        if entry:
+                            aCriterion.ThresholdID = entry
             else:
                 raise TypeError, "The Threshold should be a Mesh Group"
         elif CritType == FT_RangeOfIds: