Salome HOME
Update copyrights
[modules/smesh.git] / src / Tools / blocFissure / materielCasTests / vis.py
index 8956aaf358d1df9f2132348100d5e5cf255fa383..737026e4c733d4bf32258e5738318fd44ec2e541 100644 (file)
@@ -1,10 +1,27 @@
 # -*- coding: utf-8 -*-
+# Copyright (C) 2014-2019  CEA/DEN, EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
 
 import sys
 import salome
 
 salome.salome_init()
-theStudy = salome.myStudy
 
 import salome_notebook
 notebook = salome_notebook.notebook
@@ -22,7 +39,7 @@ import math
 import SALOMEDS
 
 
-geompy = geomBuilder.New(theStudy)
+geompy = geomBuilder.New()
 O = geompy.MakeVertex(0, 0, 0)
 OX = geompy.MakeVectorDXDYDZ(1, 0, 0)
 OY = geompy.MakeVectorDXDYDZ(0, 1, 0)
@@ -75,7 +92,7 @@ Partition_2 = geompy.MakePartition([Revolution_1], [conge], [], [], geompy.Shape
 Partition_2_vertex_11 = geompy.GetSubShape(Partition_2, [11])
 Plane_1 = geompy.MakePlane(Partition_2_vertex_11, OY, 2000)
 Partition_3 = geompy.MakePartition([Revolution_1], [Plane_1], [], [], geompy.ShapeType["FACE"], 0, [], 0)
-Vertex_9 = geompy.MakeVertex(0, 99.633883, 8.977320000000001)
+Vertex_9 = geompy.MakeVertex(0, 99.633883, 1.977320000000001)
 Vertex_10 = geompy.MakeVertex(0, 99.633883, -8.977320000000001)
 Vertex_11 = geompy.MakeVertexWithRef(Vertex_9, 0, 0, -1)
 Vertex11x = geompy.MakeVertexWithRef(Vertex_11, 1, 0, 0)
@@ -167,7 +184,7 @@ geompy.addToStudyInFather( Fissure, fondFiss, 'fondFiss' )
 import  SMESH, SALOMEDS
 from salome.smesh import smeshBuilder
 
-smesh = smeshBuilder.New(theStudy)
+smesh = smeshBuilder.New()
 coupe_vis_1 = smesh.Mesh(coupe_vis)
 Regular_1D = coupe_vis_1.Segment()
 Nb_Segments_1 = Regular_1D.NumberOfSegments(10)
@@ -193,7 +210,7 @@ visHex80 = smesh.CopyMesh( coupe_vis_1, 'visHex80', 1, 0)
 [ tige_2, section_2, tige_haute_2, rond_2, tete_2, section_tete_2, conge_2, appui_2, p_imp_2, tige_rotated, tige_top, section_rotated, section_top, tige_haute_rotated, tige_haute_top, rond_rotated, rond_top, tete_rotated, tete_top, section_tete_rotated, section_tete_top, conge_rotated, conge_top, appui_rotated, appui_top, p_imp_rotated, p_imp_top ] = visHex80.GetGroups()
 Sub_mesh_1 = Regular_1D_1.GetSubMesh()
 Sub_mesh_2 = Regular_1D_2.GetSubMesh()
-visHex80.ExportMED( os.path.join(gmu.pathBloc, "materielCasTests/visSain.med"), 0, SMESH.MED_V2_2, 1 )
+visHex80.ExportMED(os.path.join(gmu.pathBloc, "materielCasTests/visSain.med"))
  
 
 ## Set names of Mesh objects
@@ -245,4 +262,4 @@ smesh.SetName(tige_haute_2, 'tige_haute')
 
 
 if salome.sg.hasDesktop():
-  salome.sg.updateObjBrowser(1)
+  salome.sg.updateObjBrowser()