# -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2015 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2020 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
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
# ----------
# Define a mesh on a geometry
# ---------------------------
-smesh.SetCurrentStudy(salome.myStudy)
+smesh.UpdateStudy()
m = smesh.Mesh(cylinder)
algo3d.SetNbPart(4)
algo3d.SetBackground(False)
algo3d.SetKeepFiles(False)
-algo3d.SetToMeshHoles(True)
# Launch meshers
# --------------
# ----------
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()