X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSMESH_PY%2Fsmeshstudytools.py;h=53b58b4c2bea3761e514c94275ef98ff67b5ee28;hb=HEAD;hp=33f0d7b1aa6cf0a67456392e0a0d75cceb06f34f;hpb=264eeb2edd6977ccf2d2bd88cbb210353f63f7c9;p=modules%2Fsmesh.git diff --git a/src/SMESH_PY/smeshstudytools.py b/src/SMESH_PY/smeshstudytools.py index 33f0d7b1a..53b58b4c2 100644 --- a/src/SMESH_PY/smeshstudytools.py +++ b/src/SMESH_PY/smeshstudytools.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # -# Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2007-2024 CEA, EDF, OPEN CASCADE # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -29,7 +29,7 @@ # \} """ -This module provides a new class :class:`SMeshStudyTools` to facilitate the +This module provides a class :class:`SMeshStudyTools` to facilitate the use of mesh objects in Salome study. """ @@ -155,7 +155,7 @@ class SMeshStudyTools: self.smeshGui = salome.ImportComponentGUI("SMESH") if not helper.SalomeGUI.hasDesktop(): - print "displayMeshObject: no desktop available" + print("displayMeshObject: no desktop available") return self.smeshGui.CreateAndDisplayActor(entry) @@ -203,6 +203,8 @@ def TEST_createBoxMesh(): Hexa_3D = smesh.CreateHypothesis('Hexa_3D') status = boxmesh.AddHypothesis(Hexa_3D) isDone = boxmesh.Compute() + if not isDone: + raise Exception("Error when computing Mesh") smesh.SetName(boxmesh.GetMesh(), 'boxmesh') if salome.sg.hasDesktop():