10 salome.salome_init()
\r
11 aStudyId = salome.myStudy._get_StudyId()
\r
13 geompy.init_geom(salome.myStudy)
\r
15 Face_1 = geompy.MakeFaceHW(100, 100, 1)
\r
16 geompy.addToStudy( Face_1, "Face_1" )
\r
18 #smesh.smesh.SetCurrentStudy(aStudyId)
\r
20 pattern = smesh.GetPattern()
\r
21 Mesh_1 = smesh.Mesh(Face_1)
\r
22 Regular_1D = Mesh_1.Segment()
\r
23 Nb_Segments_1 = Regular_1D.NumberOfSegments(10)
\r
24 Nb_Segments_1.SetDistrType( 0 )
\r
25 Quadrangle_2D = Mesh_1.Quadrangle()
\r
26 isDone = Mesh_1.Compute()
\r
30 aListOfElems = [ 52, 53, 54, 55, 56, 57,
\r
31 62, 63, 64, 65, 66, 67,
\r
32 72, 73, 74, 75, 76, 77,
\r
33 82, 83, 84, 85, 86, 87 ]
\r
35 aRedGroup = Mesh_1.GetMesh().CreateGroup( smesh.FACE, "Red" )
\r
36 aRedGroup.Add( aListOfElems );
\r
37 aRedGroup.SetColor( SALOMEDS.Color( 1, 0, 0 ) )
\r
39 aListOfElems = [ 55, 56, 57, 58, 59,
\r
44 105, 106, 107, 108, 109,
\r
45 115, 116, 117, 118, 119,
\r
46 125, 126, 127, 128, 129 ]
\r
48 aGreenGroup = Mesh_1.GetMesh().CreateGroup( smesh.FACE, "Green" )
\r
49 aGreenGroup.Add( aListOfElems );
\r
50 aGreenGroup.SetColor( SALOMEDS.Color( 0, 1, 0 ) )
\r
52 aListOfElems = [ 63, 64, 65, 66, 67, 68,
\r
53 73, 74, 75, 76, 77, 78,
\r
54 83, 84, 85, 86, 87, 88,
\r
55 93, 94, 95, 96, 97, 98,
\r
56 103, 104, 105, 106, 107, 108,
\r
57 113, 114, 115, 116, 117, 118 ]
\r
59 aBlueGroup = Mesh_1.GetMesh().CreateGroup( smesh.FACE, "Blue" )
\r
60 aBlueGroup.Add( aListOfElems );
\r
61 aBlueGroup.SetColor( SALOMEDS.Color( 0, 0, 1 ) )
\r
63 # UnionListOfGroups()
\r
64 aUnGrp = Mesh_1.UnionListOfGroups([aRedGroup, aGreenGroup, aBlueGroup], "UnionGrp" )
\r
66 # IntersectListOfGroups()
\r
67 aIntGrp=Mesh_1.IntersectListOfGroups([aRedGroup, aGreenGroup, aBlueGroup], "IntGrp" )
\r
70 aCutGrp=Mesh_1.CutListOfGroups([aRedGroup],[aGreenGroup,aBlueGroup],"CutGrp")
\r
72 salome.sg.updateObjBrowser( 1 )
\r