1 # -*- coding: utf-8 -*-
7 theStudy = salome.myStudy
10 notebook = salome_notebook.NoteBook(theStudy)
13 from blocFissure import gmu
20 from salome.geom import geomBuilder
25 geompy = geomBuilder.New(theStudy)
27 O = geompy.MakeVertex(0, 0, 0)
28 OX = geompy.MakeVectorDXDYDZ(1, 0, 0)
29 OY = geompy.MakeVectorDXDYDZ(0, 1, 0)
30 OZ = geompy.MakeVectorDXDYDZ(0, 0, 1)
31 Vertex_1 = geompy.MakeVertex(100, 0, 0)
32 Disk_1 = geompy.MakeDiskPntVecR(Vertex_1, OY, 12.5)
33 Scale_1 = geompy.MakeScaleAlongAxes(Disk_1, Vertex_1, 1, 1, 4.1)
34 Vertex_2 = geompy.MakeVertex(98, -2, -2)
35 Vertex_3 = geompy.MakeVertex(120, 2, 60)
36 Box_1 = geompy.MakeBoxTwoPnt(Vertex_3, Vertex_2)
37 Ellipse_disque = geompy.MakeCommon(Box_1, Scale_1)
38 geompy.ExportBREP(Ellipse_disque, os.path.join(gmu.pathBloc, "materielCasTests/ellipse_disque.brep"))
39 geompy.addToStudy( O, 'O' )
40 geompy.addToStudy( OX, 'OX' )
41 geompy.addToStudy( OY, 'OY' )
42 geompy.addToStudy( OZ, 'OZ' )
43 geompy.addToStudy( Vertex_1, 'Vertex_1' )
44 geompy.addToStudy( Disk_1, 'Disk_1' )
45 geompy.addToStudy( Vertex_2, 'Vertex_2' )
46 geompy.addToStudy( Scale_1, 'Scale_1' )
47 geompy.addToStudy( Vertex_3, 'Vertex_3' )
48 geompy.addToStudy( Box_1, 'Box_1' )
49 geompy.addToStudy( Ellipse_disque, 'Ellipse_disque' )
52 if salome.sg.hasDesktop():
53 salome.sg.updateObjBrowser(True)