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