1 # Creation of a Rectangle
5 gg = salome.ImportComponentGUI("GEOM")
8 px = geompy.MakeVertex(100., 0. , 0. )
9 py = geompy.MakeVertex(0. , 100., 0. )
11 # create a vector on two points
12 vxy = geompy.MakeVector(px, py)
14 # create a rectangle in OXY plane
15 face1 = geompy.MakeFaceHW(100, 100, 1)
17 # create a rectangle using normal vector
18 face2 = geompy.MakeFaceObjHW(vxy, 50, 150)
20 # create a rectangle from other face
21 face3 = geompy.MakeFaceObjHW(face2, 150, 50)
23 # add objects in the study
24 id_face1 = geompy.addToStudy(face1,"Face1")
25 id_face2 = geompy.addToStudy(face2,"Face2")
26 id_face3 = geompy.addToStudy(face3,"Face3")
29 gg.createAndDisplayGO(id_face1)
30 gg.createAndDisplayGO(id_face2)
31 gg.createAndDisplayGO(id_face3)