# -*- coding: iso-8859-1 -*-

###
### This file is generated automatically by SALOME v6.4.0 with dump python functionality
###

import sys
import salome

salome.salome_init()
theStudy = salome.myStudy

import salome_notebook
notebook = salome_notebook.notebook
sys.path.insert( 0, r'/home/mmeziane/Documents/STUDY33')

import iparameters
ipar = iparameters.IParameters(salome.myStudy.GetCommonParameters("Interface Applicative", 1))

#Set up visual properties:
ipar.setProperty("AP_ACTIVE_VIEW", "OCCViewer_0_0")
ipar.setProperty("AP_WORKSTACK_INFO", "000000010000000000000002010000000100000301000000040000000100000001000000080000001a004f00430043005600690065007700650072005f0030005f00300000000102")
ipar.setProperty("AP_ACTIVE_MODULE", "Geometry")
ipar.setProperty("AP_SAVEPOINT_NAME", "GUI state: 1")
#Set up lists:
# fill list AP_VIEWERS_LIST
ipar.append("AP_VIEWERS_LIST", "OCCViewer_1")
# fill list OCCViewer_1
ipar.append("OCCViewer_1", "OCC scene:4 - viewer:1")
ipar.append("OCCViewer_1", "scale=1.000000000000e+00*centerX=0.000000000000e+00*centerY=0.000000000000e+00*projX=5.773502588272e-01*projY=-5.773502588272e-01*projZ=5.773502588272e-01*twist=0.000000000000e+00*atX=0.000000000000e+00*atY=0.000000000000e+00*atZ=0.000000000000e+00*eyeX=2.886751294136e+02*eyeY=-2.886751294136e+02*eyeZ=2.886751294136e+02*scaleX=1.000000000000e+00*scaleY=1.000000000000e+00*scaleZ=1.000000000000e+00*isVisible=1*size=100.00*gtIsVisible=0*gtDrawNameX=1*gtDrawNameY=1*gtDrawNameZ=1*gtNameX=X*gtNameY=Y*gtNameZ=Z*gtNameColorRX=255*gtNameColorGX=0*gtNameColorBX=0*gtNameColorRY=0*gtNameColorGY=255*gtNameColorBY=0*gtNameColorRZ=0*gtNameColorGZ=0*gtNameColorBZ=255*gtDrawValuesX=1*gtDrawValuesY=1*gtDrawValuesZ=1*gtNbValuesX=3*gtNbValuesY=3*gtNbValuesZ=3*gtOffsetX=2*gtOffsetY=2*gtOffsetZ=2*gtColorRX=255*gtColorGX=0*gtColorBX=0*gtColorRY=0*gtColorGY=255*gtColorBY=0*gtColorRZ=0*gtColorGZ=0*gtColorBZ=255*gtDrawTickmarksX=1*gtDrawTickmarksY=1*gtDrawTickmarksZ=1*gtTickmarkLengthX=5*gtTickmarkLengthY=5*gtTickmarkLengthZ=5")
# fill list AP_MODULES_LIST
ipar.append("AP_MODULES_LIST", "Geometry")


###
### GEOM component
###

import GEOM
import geompy
import math
import SALOMEDS


geompy.init_geom(theStudy)

Vertex_1 = geompy.MakeVertex(1.45, 8.800000000000001, -0.3)
Vertex_2 = geompy.MakeVertex(1.45, 7.2, 0.3)
Vertex_3 = geompy.MakeVertex(2.1, 9.199999999999999, -0.15)
Vertex_4 = geompy.MakeVertex(6.4, 8.300000000000001, -0.1)
Vertex_5 = geompy.MakeVertex(6.4, 6.9, 0.1)
Vertex_6 = geompy.MakeVertex(2.1, 6.8, 0.3)
Line_1 = geompy.MakeLineTwoPnt(Vertex_1, Vertex_3)
Line_2 = geompy.MakeLineTwoPnt(Vertex_3, Vertex_4)
Line_3 = geompy.MakeLineTwoPnt(Vertex_4, Vertex_5)
Line_4 = geompy.MakeLineTwoPnt(Vertex_5, Vertex_6)
Line_5 = geompy.MakeLineTwoPnt(Vertex_6, Vertex_2)
Line_6 = geompy.MakeLineTwoPnt(Vertex_2, Vertex_1)
Face_1 = geompy.MakeFaceWires([Line_1, Line_2, Line_3, Line_4, Line_5, Line_6], 1)
Vector_Y = geompy.MakeVectorDXDYDZ(0, 1, 0)
Vector_z = geompy.MakeVectorDXDYDZ(0, 0, 1)
Extrusion_1 = geompy.MakePrismVecH2Ways(Face_1, Vector_z, 0.1)
Vertex_7 = geompy.MakeVertex(0, 6, 0)
Cylinder_1 = geompy.MakeCylinder(Vertex_7, Vector_Y, 1.5, 14)
Multi_Rotation_1 = geompy.MultiRotate1D(Extrusion_1, Vector_Y, 4)
geompy.addToStudy( Vertex_1, 'Vertex_1' )
geompy.addToStudy( Vertex_2, 'Vertex_2' )
geompy.addToStudy( Vertex_3, 'Vertex_3' )
geompy.addToStudy( Vertex_4, 'Vertex_4' )
geompy.addToStudy( Vertex_5, 'Vertex_5' )
geompy.addToStudy( Vertex_6, 'Vertex_6' )
geompy.addToStudy( Line_1, 'Line_1' )
geompy.addToStudy( Line_2, 'Line_2' )
geompy.addToStudy( Line_3, 'Line_3' )
geompy.addToStudy( Line_4, 'Line_4' )
geompy.addToStudy( Line_5, 'Line_5' )
geompy.addToStudy( Line_6, 'Line_6' )
geompy.addToStudy( Face_1, 'Face_1' )
geompy.addToStudy( Vector_Y, 'Vector_Y' )
geompy.addToStudy( Vector_z, 'Vector_z' )
geompy.addToStudy( Extrusion_1, 'Extrusion_1' )
geompy.addToStudy( Vertex_7, 'Vertex_7' )
geompy.addToStudy( Cylinder_1, 'Cylinder_1' )
geompy.addToStudy( Multi_Rotation_1, 'Multi-Rotation_1' )

### Store presentation parameters of displayed objects
import iparameters
ipar = iparameters.IParameters(theStudy.GetModuleParameters("Interface Applicative", "GEOM", 1))



if salome.sg.hasDesktop():
  salome.sg.updateObjBrowser(1)
  iparameters.getSession().restoreVisualState(1)
