Fix for "16925 [CEA 16749] MeshCut Python exception with Windows" issue.

This commit is contained in:
rnv 2019-05-15 11:47:21 +03:00
parent e63b88c7f3
commit 94ab6b047c

View File

@ -20,6 +20,8 @@
# if you already have plugins defined in a salome_plugins.py file, add this file at the end. # if you already have plugins defined in a salome_plugins.py file, add this file at the end.
# if not, copy this file as ${HOME}/Plugins/smesh_plugins.py or ${APPLI}/Plugins/smesh_plugins.py # if not, copy this file as ${HOME}/Plugins/smesh_plugins.py or ${APPLI}/Plugins/smesh_plugins.py
import sys
def MeshCut(context): def MeshCut(context):
# get context study, salomeGui # get context study, salomeGui
study = context.study study = context.study
@ -96,11 +98,18 @@ and T the tolerance.
if result: if result:
# dialog accepted # dialog accepted
args = ['MeshCut'] args = ['MeshCut']
args += [str(window.ui.le_origMeshFile.text()).encode()] if sys.platform == "win32":
args += [str(window.ui.le_cutMeshFile.text()).encode()] args += [str(window.ui.le_origMeshFile.text())]
args += [str(window.ui.le_outMeshName.text()).encode()] args += [str(window.ui.le_cutMeshFile.text())]
args += [str(window.ui.le_groupAbove.text()).encode()] args += [str(window.ui.le_outMeshName.text())]
args += [str(window.ui.le_groupBelow.text()).encode()] args += [str(window.ui.le_groupAbove.text())]
args += [str(window.ui.le_groupBelow.text())]
else:
args += [str(window.ui.le_origMeshFile.text()).encode()]
args += [str(window.ui.le_cutMeshFile.text()).encode()]
args += [str(window.ui.le_outMeshName.text()).encode()]
args += [str(window.ui.le_groupAbove.text()).encode()]
args += [str(window.ui.le_groupBelow.text()).encode()]
args += [str(window.ui.dsb_normX.value())] args += [str(window.ui.dsb_normX.value())]
args += [str(window.ui.dsb_normY.value())] args += [str(window.ui.dsb_normY.value())]
args += [str(window.ui.dsb_normZ.value())] args += [str(window.ui.dsb_normZ.value())]