1 # Creation of a Compound
6 from salome.geom import geomBuilder
7 geompy = geomBuilder.New(salome.myStudy)
8 gg = salome.ImportComponentGUI("GEOM")
10 # create a vertex and a vector
11 p1 = geompy.MakeVertex( -30., -30., 50.)
12 p2 = geompy.MakeVertex( -60., -60., 30.)
13 p3 = geompy.MakeVertex( -30., -30., 10.)
15 # create an arc from three points
16 arc = geompy.MakeArc(p1, p2, p3)
17 ShapeListCompound = []
20 S = geompy.MakeTranslation(arc, i * 50., 0., 0.)
21 ShapeListCompound.append(S)
24 # create a compund of the given shapes
25 compound = geompy.MakeCompound(ShapeListCompound)
27 # add object in the study
28 id_compound = geompy.addToStudy(compound,"Compound")
30 # display the compound
31 gg.createAndDisplayGO(id_compound)