From b37ba5d8046be7ad70904c2cfd21f12b441dba4e Mon Sep 17 00:00:00 2001 From: Paul RASCLE Date: Wed, 26 Aug 2020 11:37:59 +0200 Subject: [PATCH] allow SMESH publishing in GUI --- src/HYDROTools/shapesGroups.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/HYDROTools/shapesGroups.py b/src/HYDROTools/shapesGroups.py index 1ed9e63b..298b29a0 100644 --- a/src/HYDROTools/shapesGroups.py +++ b/src/HYDROTools/shapesGroups.py @@ -23,7 +23,8 @@ def freeBordersGroup(meshFileIn, meshFileOut=""): return full path of the output mesh file """ smesh = smeshBuilder.New() - smesh.SetEnablePublish( False ) # Set to False to avoid publish in study if not needed + if not salome.sg.hasDesktop(): + smesh.SetEnablePublish( False ) # Set to False to avoid publish in study if not needed ([MESH], status) = smesh.CreateMeshesFromMED(meshFileIn) nbAdded, MESH, addedBnd = MESH.MakeBoundaryElements( SMESH.BND_1DFROM2D, '', '', 0, []) -- 2.39.2