5 gg = salome.ImportComponentGUI("GEOM")
7 # create vertices and vectors
8 p0 = geompy.MakeVertex( 0., 0., 0.)
9 px = geompy.MakeVertex(20., 0., 0.)
10 py = geompy.MakeVertex( 0., 20., 0.)
11 pz = geompy.MakeVertex( 0., 0., 20.)
12 pxy = geompy.MakeVertex( 50., 0., 0.)
13 pxyz = geompy.MakeVertex( 50., 50., 50.)
14 vz = geompy.MakeVector(p0, pz)
15 vxy = geompy.MakeVector(px, py)
16 vtr1d = geompy.MakeVector(p0, pxyz)
17 vtr2d = geompy.MakeVector(p0, pxy)
20 arc = geompy.MakeArc(py, pz, px)
23 wire = geompy.MakeWire([vxy, arc])
25 # create a planar face
26 face = geompy.MakeFace(wire, 1)
29 prism = geompy.MakePrismVecH(face, vz, 20.0)
31 # translate the given object along the given vector a given number of times
32 tr1d = geompy.MakeMultiTranslation1D(prism, vtr1d, 20, 4)
34 # consequently apply two specified translations to the object a given number of times
35 tr2d = geompy.MakeMultiTranslation2D(prism, vtr1d, 20, 4, vtr2d, 80, 3)
37 # add objects in the study
38 id_prism = geompy.addToStudy(prism,"Prism")
39 id_tr1d = geompy.addToStudy(tr1d,"Translation 1D")
40 id_tr2d = geompy.addToStudy(tr2d,"Translation 2D")
42 # display the prism and the results of fillet operation
43 gg.createAndDisplayGO(id_prism)
44 gg.setDisplayMode(id_prism,1)
45 gg.createAndDisplayGO(id_tr1d)
46 gg.setDisplayMode(id_tr1d,1)
47 gg.createAndDisplayGO(id_tr2d)
48 gg.setDisplayMode(id_tr2d,1)