6 from salome.geom import geomBuilder
7 geompy = geomBuilder.New(salome.myStudy)
9 gg = salome.ImportComponentGUI("GEOM")
12 px = geompy.MakeVertex(100., 0., 0.)
13 py = geompy.MakeVertex(0., 100., 0.)
14 pz = geompy.MakeVertex(0., 0., 100.)
16 # create base geometry 2D & 3D
17 vector = geompy.MakeVector(px, py)
18 arc = geompy.MakeArc(py, pz, px)
21 angle = 45. * math.pi / 180
22 WantPlanarFace = 1 #True
23 wire = geompy.MakeWire([vector, arc])
24 face = geompy.MakeFace(wire, WantPlanarFace)
25 face_rot = geompy.MakeRotation(face, vector, angle)
29 sewing = geompy.MakeSewing([face, face_rot], precision)
31 # add objects in the study
32 id_face = geompy.addToStudy(face, "Face")
33 id_face_rot = geompy.addToStudy(face_rot, "Face rotation")
34 id_sewing = geompy.addToStudy(sewing, "Sewing")
37 gg.createAndDisplayGO(id_face)
38 gg.setDisplayMode(id_face,1)
39 gg.createAndDisplayGO(id_face_rot)
40 gg.setDisplayMode(id_face_rot,1)
41 gg.createAndDisplayGO(id_sewing)
42 gg.setDisplayMode(id_sewing,1)