Salome HOME
Fix regressions
[modules/smesh.git] / doc / salome / examples / grouping_elements_ex05.py
index aa526d2952d7a82a7e6357cd45c7c94d89db06fc..047691b863aba6b0a22d4baa88c72b181fe0c5ae 100644 (file)
@@ -1,7 +1,7 @@
 # Union of groups
 
 import SMESH_mechanic
-import SMESH
+import SMESH, SALOMEDS
 
 smesh  = SMESH_mechanic.smesh
 mesh   = SMESH_mechanic.mesh
@@ -32,6 +32,7 @@ aGroup2.Add(anIds)
 
 # create union group : area >= 20
 aGroup3 = mesh.UnionListOfGroups([aGroup1, aGroup2], "Area >= 20")
+aGroup3.SetColor( SALOMEDS.Color(1.,1.,0.));
 print "Criterion: Area >= 20, Nb = ", len(aGroup3.GetListOfID())
 # Please note that also there is UnionGroups() method which works with two groups only
 
@@ -45,6 +46,7 @@ print "Criterion: Area < 20, Nb = ", len(anIds)
 # create a group by adding elements with area < 20
 aGroup4 = mesh.CreateEmptyGroup(SMESH.FACE, "Area < 20")
 aGroup4.Add(anIds)
+aGroup4.SetColor( SALOMEDS.Color(1.,0.,0.));
 
 # create union group : area >= 20 and area < 20
 aGroup5 = mesh.UnionListOfGroups([aGroup3, aGroup4], "Any Area")