6 from salome.geom
import geomBuilder
7 geompy = geomBuilder.New(salome.myStudy)
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.)
16 vector_arc = geompy.MakeVector(p1, p3)
19 arc = geompy.MakeArc(p1, p2, p3)
22 wire = geompy.MakeWire([vector_arc, arc])
26 face = geompy.MakeFace(wire, isPlanarWanted)
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])
33 sketcher2 = geompy.MakeSketcherOnPlane(
"Sketcher:F 10 -30:R 10:C 20 180:R 15:L 50:WW", face)
37 sk = geompy.Sketcher2D()
38 sk.addPoint(-100, -100)
39 sk.addSegmentAbsolute(250, -100)
40 sk.addArcAngleRadiusLength(0, 100, 150)
41 sk.addSegmentAngleLength(0, 300)
43 sketcher3 = sk.face([100, 0, 0, 1, 1, 1, -1, 1, 0])
45 sk = geompy.Sketcher2D()
47 sk.addArcAngleRadiusLength(10, 20, 180)
48 sk.addSegmentAngleLength(15, 50)
50 sketcher4 = sk.wire(face)
53 id_face = geompy.addToStudy(face,
"Face")
54 id_sketcher1 = geompy.addToStudy(sketcher1,
"Sketcher1")
55 id_sketcher2 = geompy.addToStudy(sketcher2,
"Sketcher2")
56 id_sketcher3 = geompy.addToStudy(sketcher3,
'Sketcher3' )
57 id_sketcher4 = geompy.addToStudy(sketcher4,
'Sketcher4' )
60 gg.createAndDisplayGO(id_face)
61 gg.setDisplayMode(id_face,1)
62 gg.setTransparency(id_face,0.5)
63 gg.createAndDisplayGO(id_sketcher1)
64 gg.createAndDisplayGO(id_sketcher2)
65 gg.createAndDisplayGO(id_sketcher3)
66 gg.createAndDisplayGO(id_sketcher4)