Salome HOME
Copyright update 2022
[modules/paravis.git] / examples / command_line / dataset.py
index 300af014df870176bd6384ffc1403739c74b5f6c..08aa09d2d3ab2b53570fa45db2dbf1a0b7d848e1 100644 (file)
@@ -1,3 +1,21 @@
+# Copyright (C) 2014-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
+#
 def create_geometry(out_filename=None):
   import GEOM
   import salome
@@ -49,10 +67,10 @@ def create_meshes(geometry, out_filename=None):
   isDone = Mesh_quad.Compute()
   smesh.SetName(Mesh_tri, 'Mesh_tri')
   if out_filename:
-    Mesh_tri.ExportMED(out_filename, 0, SMESH.MED_V2_2, 1, None ,1)
+    Mesh_tri.ExportMED(out_filename, overwrite=True)
   smesh.SetName(Mesh_quad, 'Mesh_quad')
   if out_filename:
-    Mesh_quad.ExportMED(out_filename, 0, SMESH.MED_V2_2, 0, None ,1)
+    Mesh_quad.ExportMED(out_filename, overwrite=False)
 
   # Set names of Mesh objects
   smesh.SetName(Regular_1D.GetAlgorithm(), 'Regular_1D')