6 from salome.geom
import geomBuilder
7 geompy = geomBuilder.New(salome.myStudy)
8 gg = salome.ImportComponentGUI(
"GEOM")
11 p0 = geompy.MakeVertex(0. , 0. , 0. )
12 p200 = geompy.MakeVertex(200., 200., 200.)
15 Box = geompy.MakeBoxTwoPnt(p0, p200)
18 group = geompy.CreateGroup(Box, geompy.ShapeType[
"FACE"])
21 SubFaceList = geompy.SubShapeAllSortedCentres(Box, geompy.ShapeType[
"FACE"])
23 FaceID = geompy.GetSubShapeID(Box, SubFaceList[i])
24 geompy.AddObject(group, FaceID)
28 geompy.UnionList(group, [SubFaceList[0], SubFaceList[2], SubFaceList[5]])
31 geompy.RemoveObject(group, FaceID)
35 geompy.DifferenceList(group, [SubFaceList[2], SubFaceList[3], SubFaceList[4]])
36 id_group1 = geompy.addToStudy(group,
"Group1")
39 gg.createAndDisplayGO(id_group1)
40 salome.sg.updateObjBrowser(
True)
6 from salome.geom
import geomBuilder
7 geompy = geomBuilder.New(salome.myStudy)
8 gg = salome.ImportComponentGUI(
"GEOM")
11 p0 = geompy.MakeVertex(0. , 0. , 0. )
12 p200 = geompy.MakeVertex(200., 200., 200.)
15 Box = geompy.MakeBoxTwoPnt(p0, p200)
18 group = geompy.CreateGroup(Box, geompy.ShapeType[
"FACE"])
21 SubFaceList = geompy.SubShapeAllSortedCentres(Box, geompy.ShapeType[
"FACE"])
23 FaceID = geompy.GetSubShapeID(Box, SubFaceList[i])
24 geompy.AddObject(group, FaceID)
25 id_group1 = geompy.addToStudy(group,
"Group1")
28 gg.createAndDisplayGO(id_group1)
29 salome.sg.updateObjBrowser(
True)
6 from salome.geom
import geomBuilder
7 geompy = geomBuilder.New(salome.myStudy)
8 gg = salome.ImportComponentGUI(
"GEOM")
11 p0 = geompy.MakeVertex(0. , 0. , 0. )
12 p200 = geompy.MakeVertex(200., 200., 200.)
15 Box = geompy.MakeBoxTwoPnt(p0, p200)
18 group = geompy.CreateGroup(Box, geompy.ShapeType[
"FACE"])
21 SubFaceList = geompy.SubShapeAllSortedCentres(Box, geompy.ShapeType[
"FACE"])
23 FaceID = geompy.GetSubShapeID(Box, SubFaceList[i])
24 geompy.AddObject(group, FaceID)
28 geompy.UnionList(group, [SubFaceList[0], SubFaceList[2], SubFaceList[5]])
31 geompy.RemoveObject(group, FaceID)
32 id_group1 = geompy.addToStudy(group,
"Group1")
35 gg.createAndDisplayGO(id_group1)
36 salome.sg.updateObjBrowser(
True)
6 from salome.geom
import geomBuilder
7 geompy = geomBuilder.New(salome.myStudy)
10 Box_1 = geompy.MakeBoxDXDYDZ(200, 200, 200)
11 Group_1 = geompy.CreateGroup(Box_1, geompy.ShapeType[
"FACE"])
12 geompy.UnionIDs(Group_1, [13, 23])
13 Group_2 = geompy.CreateGroup(Box_1, geompy.ShapeType[
"FACE"])
14 geompy.UnionIDs(Group_2, [3, 27])
15 Group_3 = geompy.CreateGroup(Box_1, geompy.ShapeType[
"FACE"])
16 geompy.UnionIDs(Group_3, [33, 23])
17 Group_4 = geompy.CreateGroup(Box_1, geompy.ShapeType[
"FACE"])
18 geompy.UnionIDs(Group_4, [31, 27])
21 Group_U_1_2 = geompy.UnionGroups(Group_1, Group_2)
22 Group_UL_3_4 = geompy.UnionListOfGroups([Group_3, Group_4])
25 geompy.addToStudy(Box_1,
'Box_1')
26 geompy.addToStudyInFather(Box_1, Group_1,
'Group_1')
27 geompy.addToStudyInFather(Box_1, Group_2,
'Group_2')
28 geompy.addToStudyInFather(Box_1, Group_3,
'Group_3')
29 geompy.addToStudyInFather(Box_1, Group_4,
'Group_4')
30 geompy.addToStudyInFather(Box_1, Group_U_1_2,
'Group_U_1_2')
31 geompy.addToStudyInFather(Box_1, Group_UL_3_4,
'Group_UL_3_4')
32 salome.sg.updateObjBrowser(
True)
6 from salome.geom
import geomBuilder
7 geompy = geomBuilder.New(salome.myStudy)
10 Box_1 = geompy.MakeBoxDXDYDZ(200, 200, 200)
11 Group_1 = geompy.CreateGroup(Box_1, geompy.ShapeType[
"FACE"])
12 geompy.UnionIDs(Group_1, [13, 23])
13 Group_2 = geompy.CreateGroup(Box_1, geompy.ShapeType[
"FACE"])
14 geompy.UnionIDs(Group_2, [3, 27])
15 Group_3 = geompy.CreateGroup(Box_1, geompy.ShapeType[
"FACE"])
16 geompy.UnionIDs(Group_3, [33, 23])
17 Group_4 = geompy.CreateGroup(Box_1, geompy.ShapeType[
"FACE"])
18 geompy.UnionIDs(Group_4, [31, 27])
21 Group_I_1_3 = geompy.IntersectGroups(Group_1, Group_3)
22 Group_IL_1_3 = geompy.IntersectListOfGroups([Group_1, Group_3])
25 geompy.addToStudy(Box_1,
'Box_1')
26 geompy.addToStudyInFather(Box_1, Group_1,
'Group_1')
27 geompy.addToStudyInFather(Box_1, Group_2,
'Group_2')
28 geompy.addToStudyInFather(Box_1, Group_3,
'Group_3')
29 geompy.addToStudyInFather(Box_1, Group_4,
'Group_4')
30 geompy.addToStudyInFather(Box_1, Group_I_1_3,
'Group_I_1_3')
31 geompy.addToStudyInFather(Box_1, Group_IL_1_3,
'Group_IL_1_3')
32 salome.sg.updateObjBrowser(
True)
6 from salome.geom
import geomBuilder
7 geompy = geomBuilder.New(salome.myStudy)
10 Box_1 = geompy.MakeBoxDXDYDZ(200, 200, 200)
11 Group_1 = geompy.CreateGroup(Box_1, geompy.ShapeType[
"FACE"])
12 geompy.UnionIDs(Group_1, [13, 23])
13 Group_2 = geompy.CreateGroup(Box_1, geompy.ShapeType[
"FACE"])
14 geompy.UnionIDs(Group_2, [3, 27])
15 Group_3 = geompy.CreateGroup(Box_1, geompy.ShapeType[
"FACE"])
16 geompy.UnionIDs(Group_3, [33, 23])
17 Group_4 = geompy.CreateGroup(Box_1, geompy.ShapeType[
"FACE"])
18 geompy.UnionIDs(Group_4, [31, 27])
21 Group_C_2_4 = geompy.CutGroups(Group_2, Group_4)
22 Group_CL_2_4 = geompy.CutListOfGroups([Group_2], [Group_4])
25 geompy.addToStudy(Box_1,
'Box_1')
26 geompy.addToStudyInFather(Box_1, Group_1,
'Group_1')
27 geompy.addToStudyInFather(Box_1, Group_2,
'Group_2')
28 geompy.addToStudyInFather(Box_1, Group_3,
'Group_3')
29 geompy.addToStudyInFather(Box_1, Group_4,
'Group_4')
30 geompy.addToStudyInFather(Box_1, Group_C_2_4,
'Group_C_2_4')
31 geompy.addToStudyInFather(Box_1, Group_CL_2_4,
'Group_CL_2_4')
32 salome.sg.updateObjBrowser(
True)