X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FTools%2FblocFissure%2FmaterielCasTests%2Fvis.py;h=737026e4c733d4bf32258e5738318fd44ec2e541;hp=59653c93e9760e732cfdc997f7e548137d1c9fcc;hb=6d32f944a0a115b6419184c50b57bf7c4eef5786;hpb=f6e2eed4240c426f1e65b40d1bd7e8d109a4d4b5 diff --git a/src/Tools/blocFissure/materielCasTests/vis.py b/src/Tools/blocFissure/materielCasTests/vis.py index 59653c93e..737026e4c 100644 --- a/src/Tools/blocFissure/materielCasTests/vis.py +++ b/src/Tools/blocFissure/materielCasTests/vis.py @@ -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) @@ -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()