Salome HOME
Copyright update 2022
[plugins/hybridplugin.git] / tests / enforced_mesh.py
index 97d4871dbae0590c9a9873070043f26964c48bcb..dc84a441985bf3d620d67d18cf249c5853e2317c 100644 (file)
@@ -1,10 +1,27 @@
 # -*- coding: utf-8 -*-
+# Copyright (C) 2017-2022  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
 
 ###
 ### GEOM component
@@ -16,7 +33,7 @@ import math
 import SALOMEDS
 
 
-geompy = geomBuilder.New(theStudy)
+geompy = geomBuilder.New()
 
 # first cylinder
 r1 = 0.5
@@ -83,7 +100,7 @@ from salome.smesh import smeshBuilder
 
 from salome.StdMeshers import StdMeshersBuilder
 
-smesh = smeshBuilder.New(theStudy)
+smesh = smeshBuilder.New()
 
 Mesh_faces = smesh.Mesh(face)
 Mesh_faces.Triangle(algo=smeshBuilder.MG_CADSurf)
@@ -182,5 +199,3 @@ assert len(Mesh_3.GetGroups()) == 1
 assert Mesh_3.GetGroups()[0].GetName() == 'LayersGroup'
 assert Mesh_3.GetGroups()[0].Size() > 0
 
-if salome.sg.hasDesktop():
-  salome.sg.updateObjBrowser(1)