X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FSMESH_SWIG%2Fex30_tepal.py;h=5866ceb373e48f67f747cf37b32fc6e7e66b25f8;hp=661654efc9d037b926cd7cc54211cb7de8734b87;hb=6d32f944a0a115b6419184c50b57bf7c4eef5786;hpb=6bac08c1a81f34d3f21c550bd92f83654b2546a5 diff --git a/src/SMESH_SWIG/ex30_tepal.py b/src/SMESH_SWIG/ex30_tepal.py index 661654efc..5866ceb37 100644 --- a/src/SMESH_SWIG/ex30_tepal.py +++ b/src/SMESH_SWIG/ex30_tepal.py @@ -1,5 +1,5 @@ # -*- coding: iso-8859-1 -*- -# Copyright (C) 2007-2015 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2019 CEA/DEN, EDF R&D, OPEN CASCADE # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -26,11 +26,11 @@ import salome salome.salome_init() import GEOM from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() # Parameters # ---------- @@ -53,7 +53,7 @@ geompy.addToStudy(cylinder, "Cylinder") # Define a mesh on a geometry # --------------------------- -smesh.SetCurrentStudy(salome.myStudy) +smesh.UpdateStudy() m = smesh.Mesh(cylinder) @@ -76,7 +76,6 @@ algo3d.SetMEDName(results) algo3d.SetNbPart(4) algo3d.SetBackground(False) algo3d.SetKeepFiles(False) -algo3d.SetToMeshHoles(True) # Launch meshers # -------------- @@ -87,6 +86,11 @@ status = m.Compute() # ---------- if os.access(results+".xml", os.F_OK): - print "Ok: tepal" + print("Ok: tepal") else: - print "KO: tepal" + print("KO: tepal") + +# Update object browser +# --------------------- + +salome.sg.updateObjBrowser()