6 from salome.geom
import geomBuilder
7 geompy = geomBuilder.New(salome.myStudy)
8 gg = salome.ImportComponentGUI(
"GEOM")
11 p_25_25_50 = geompy.MakeVertex(25., 25., 50.)
12 p_50_25_25 = geompy.MakeVertex(50., 25., 25.)
13 p_25_50_25 = geompy.MakeVertex(25., 50., 25.)
15 box = geompy.MakeBoxDXDYDZ(50, 50, 50)
17 top_face = geompy.GetFaceNearPoint(box, p_25_25_50)
18 yz_face = geompy.GetFaceNearPoint(box, p_50_25_25)
19 xz_face = geompy.GetFaceNearPoint(box, p_25_50_25)
21 top_face_ind = geompy.GetSubShapeID(box, top_face)
22 yz_face_ind = geompy.GetSubShapeID(box, yz_face)
23 xz_face_ind = geompy.GetSubShapeID(box, xz_face)
26 box_tr1 = geompy.MakeMultiTransformation1D(box, yz_face_ind, top_face_ind, 3)
27 box_tr2 = geompy.MakeMultiTransformation2D(box, xz_face_ind, yz_face_ind, 3, top_face_ind, 0, 2)
30 id_box = geompy.addToStudy(box,
"Box")
31 id_box_tr1 = geompy.addToStudy(box_tr1,
"Multi-transformed Block 1D")
32 id_box_tr2 = geompy.addToStudy(box_tr2,
"Multi-transformed Block 2D")
35 gg.createAndDisplayGO(id_box)
36 gg.setDisplayMode(id_box,1)
37 gg.createAndDisplayGO(id_box_tr1)
38 gg.createAndDisplayGO(id_box_tr2)
6 from salome.geom
import geomBuilder
7 geompy = geomBuilder.New(salome.myStudy)
8 gg = salome.ImportComponentGUI(
"GEOM")
11 box = geompy.MakeBoxDXDYDZ(200, 200, 200)
12 sphere = geompy.MakeSphereR(100)
15 compound = geompy.MakeCompound([box, sphere])
20 make_block_explode = geompy.MakeBlockExplode(compound, min_nb_faces, max_nb_faces)
23 id_compound = geompy.addToStudy(compound,
"Compound")
24 id_make_block_explode = geompy.addToStudyInFather(compound, make_block_explode[0],
"MakeBlockExplode")
27 gg.createAndDisplayGO(id_compound)
28 gg.createAndDisplayGO(id_make_block_explode)
29 gg.setDisplayMode(id_make_block_explode,1)
6 from salome.geom
import geomBuilder
7 geompy = geomBuilder.New(salome.myStudy)
10 check_box = geompy.MakeBoxDXDYDZ(200, 200, 200)
13 listChains = geompy.Propagate(check_box)
16 geompy.addToStudy(check_box,
"Box")
18 for chain
in listChains:
19 geompy.addToStudyInFather(check_box, chain,
"propagation chain " + `ii`)
23 salome.sg.updateObjBrowser(
True)