5 gg = salome.ImportComponentGUI("GEOM")
8 p_25_25_50 = geompy.MakeVertex(25., 25., 50.)
9 p_50_25_25 = geompy.MakeVertex(50., 25., 25.)
10 p_25_50_25 = geompy.MakeVertex(25., 50., 25.)
12 box = geompy.MakeBoxDXDYDZ(50, 50, 50)
14 top_face = geompy.GetFaceNearPoint(box, p_25_25_50)
15 yz_face = geompy.GetFaceNearPoint(box, p_50_25_25)
16 xz_face = geompy.GetFaceNearPoint(box, p_25_50_25)
18 top_face_ind = geompy.GetSubShapeID(box, top_face)
19 yz_face_ind = geompy.GetSubShapeID(box, yz_face)
20 xz_face_ind = geompy.GetSubShapeID(box, xz_face)
22 # Multi-transformate block and glue the result
23 box_tr1 = geompy.MakeMultiTransformation1D(box, yz_face_ind, top_face_ind, 3)
24 box_tr2 = geompy.MakeMultiTransformation2D(box, xz_face_ind, yz_face_ind, 3, top_face_ind, 0, 2)
26 # add objects in the study
27 id_box = geompy.addToStudy(box, "Box")
28 id_box_tr1 = geompy.addToStudy(box_tr1, "Multi-transformed Block 1D")
29 id_box_tr2 = geompy.addToStudy(box_tr2, "Multi-transformed Block 2D")
32 gg.createAndDisplayGO(id_box)
33 gg.setDisplayMode(id_box,1)
34 gg.createAndDisplayGO(id_box_tr1)
35 gg.createAndDisplayGO(id_box_tr2)