X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FSMESH_SWIG%2Fex24_cylinder.py;h=2946be21f918b4b226aa10e8da70de32d2187dab;hp=0ab9ddaec0bff8431195dcba31d8175e5f785e8e;hb=d9f4b53e489dd5857db264ede6acded7b076c9f1;hpb=54182913fbb9df65a3f4cc96f55db3618835ecd8 diff --git a/src/SMESH_SWIG/ex24_cylinder.py b/src/SMESH_SWIG/ex24_cylinder.py index 0ab9ddaec..2946be21f 100644 --- a/src/SMESH_SWIG/ex24_cylinder.py +++ b/src/SMESH_SWIG/ex24_cylinder.py @@ -1,10 +1,10 @@ # -*- coding: iso-8859-1 -*- -# Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2022 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 # License as published by the Free Software Foundation; either -# version 2.1 of the License. +# 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 @@ -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() geo = geompy @@ -103,7 +103,7 @@ geompy.DifferenceList(group_1, [group_1_box]) # Mesh the blocks with hexahedral # ------------------------------- -smesh.SetCurrentStudy(salome.myStudy) +smesh.UpdateStudy() def discretize(x, y, z, n, s=blocks): p = geompy.MakeVertex(x, y, z) @@ -130,3 +130,8 @@ hexa.Compute() hexa.Group(group_a) hexa.Group(group_b) hexa.Group(group_1) + +# Update object browser +# --------------------- + +salome.sg.updateObjBrowser()