2013-06-17 14:56:45 +00:00
|
|
|
# -*- coding: utf-8 -*-
|
2021-03-23 17:44:27 +03:00
|
|
|
# Copyright (C) 2006-2021 EDF R&D
|
2012-12-13 11:41:29 +00:00
|
|
|
#
|
|
|
|
# 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
|
2014-02-20 16:25:37 +04:00
|
|
|
# version 2.1 of the License, or (at your option) any later version.
|
2012-12-13 11:41:29 +00:00
|
|
|
#
|
|
|
|
# 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
|
|
|
|
#
|
|
|
|
|
|
|
|
# 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
|
|
|
|
|
|
|
|
def YamsLct(context):
|
2017-06-13 13:01:10 +03:00
|
|
|
# get context study, salomeGui
|
2012-12-13 11:41:29 +00:00
|
|
|
study = context.study
|
|
|
|
sg = context.sg
|
|
|
|
|
|
|
|
import os
|
|
|
|
import subprocess
|
|
|
|
import tempfile
|
2016-01-28 17:40:22 +03:00
|
|
|
from qtsalome import QFileDialog, QMessageBox
|
2012-12-13 11:41:29 +00:00
|
|
|
|
2013-06-17 14:56:45 +00:00
|
|
|
#prior test to avoid unnecessary user GUI work with ending crash
|
2012-12-13 11:41:29 +00:00
|
|
|
try :
|
2016-06-14 14:57:25 +03:00
|
|
|
os.environ['DISTENE_LICENSE_FILE']
|
2012-12-13 11:41:29 +00:00
|
|
|
except:
|
2016-06-14 14:57:25 +03:00
|
|
|
QMessageBox.warning(None,"Products","""\
|
2016-07-08 11:44:37 +02:00
|
|
|
Distene's product MeshGem SurfOpt is not installed.
|
2016-06-14 14:57:25 +03:00
|
|
|
required environment variable:
|
|
|
|
DISTENE_LICENSE_FILE='.../dlim8.var.sh'""")
|
2012-12-13 11:41:29 +00:00
|
|
|
return
|
|
|
|
import monYamsPlugDialog
|
2016-06-14 14:57:25 +03:00
|
|
|
window = monYamsPlugDialog.getDialog()
|
2012-12-13 11:41:29 +00:00
|
|
|
window.show()
|