6 from salome.geom import geomBuilder
7 geompy = geomBuilder.New()
8 gg = salome.ImportComponentGUI("GEOM")
10 # create a vertex and a vector
11 p1 = geompy.MakeVertex(25, 55, 0)
12 p2 = geompy.MakeVertex( 0, 0, 0)
13 v = geompy.MakeVector(p1, p2)
18 cylinder = geompy.MakeCylinder(p1, v, radius1, height)
21 sphere = geompy.MakeSphereR(40)
24 box = geompy.MakeBoxDXDYDZ(80, 80, 80)
27 common1 = geompy.MakeCommon(cylinder, sphere)
28 common2 = geompy.MakeCommonList([cylinder, sphere, box])
30 # add objects in the study
31 id_cylinder = geompy.addToStudy(cylinder, "Cylinder")
32 id_sphere = geompy.addToStudy(sphere, "Sphere")
33 id_box = geompy.addToStudy(box, "Box")
34 id_common1 = geompy.addToStudy(common1, "Common_1")
35 id_common2 = geompy.addToStudy(common2, "Common_2")
38 gg.createAndDisplayGO(id_cylinder)
39 gg.setDisplayMode(id_cylinder,1)
40 gg.createAndDisplayGO(id_sphere)
41 gg.setDisplayMode(id_sphere,1)
42 gg.createAndDisplayGO(id_box)
43 gg.setDisplayMode(id_box,1)
44 gg.createAndDisplayGO(id_common1)
45 gg.setDisplayMode(id_common1,1)
46 gg.createAndDisplayGO(id_common2)
47 gg.setDisplayMode(id_common2,1)