3 \page tui_sketcher_page Sketcher
8 gg = salome.ImportComponentGUI("GEOM")
11 p1 = geompy.MakeVertex(70., 0., 0.)
12 p2 = geompy.MakeVertex(70., 70., 80.)
13 p3 = geompy.MakeVertex( 0., 70., 0.)
15 #create a vector from two points
16 vector_arc = geompy.MakeVector(p1, p3)
18 # create an arc from three points
19 arc = geompy.MakeArc(p1, p2, p3)
22 wire = geompy.MakeWire([vector_arc, arc])
24 # create a planar face
26 face = geompy.MakeFace(wire, isPlanarWanted)
28 # create a sketcher (face), following the textual description
29 sketcher1 = geompy.MakeSketcher("Sketcher:F -100 -100:TT 250 -100:R 0:C 100 150:R 0:L 300:WF",
30 [100,0,0, 1,1,1, -1,1,0])
32 # create a sketcher (wire) on the given face
33 sketcher2 = geompy.MakeSketcherOnPlane("Sketcher:F 10 -30:R 10:C 20 180:R 15:L 50:WW", face)
35 # add objects in the study
36 id_face = geompy.addToStudy(face,"Face")
37 id_sketcher1 = geompy.addToStudy(sketcher1,"Sketcher1")
38 id_sketcher2 = geompy.addToStudy(sketcher2,"Sketcher2")
40 # display the first sketcher and the second sketcher with its planar face
41 gg.createAndDisplayGO(id_face)
42 gg.setDisplayMode(id_face,1)
43 gg.setTransparency(id_face,0.5)
44 gg.createAndDisplayGO(id_sketcher1)
45 gg.createAndDisplayGO(id_sketcher2)