--- /dev/null
+# -*- coding: utf-8 -*-
+#
+# Copyright (C) 2012-2013 EDF
+#
+# This file is part of SALOME HYDRO module.
+#
+# SALOME HYDRO module is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# SALOME HYDRO module 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 General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with SALOME HYDRO module. If not, see <http://www.gnu.org/licenses/>.
+
+import types
+from Accas import *
+
+
+class Tuple:
+ def __init__(self,ntuple):
+ self.ntuple=ntuple
+
+ def __convert__(self,valeur):
+ if type(valeur) == types.StringType:
+ return None
+ if len(valeur) != self.ntuple:
+ return None
+ return valeur
+
+ def info(self):
+ return "Tuple de %s elements" % self.ntuple
+
+ __repr__=info
+ __str__=info
+
+JdC = JDC_CATA(regles = (UN_PARMI('TELEMAC2D',)),
+ )
+
+
+
+Atmos = PROC(
+ nom = "Atmos", op = None,
+ fr = u"Définition d'un cas d'étude Atmosphérique",
+ ang = u"Definition of study case",
+ Wind = FACT( statut='o',
+ Wind_Speed = SIMP(statut = "o", typ = 'I', sug=20),
+ Speed_Unit = SIMP(statut = "o", typ = 'TXM',
+ into = ('knots','mph','m/s'),
+ defaut = 'mph'),
+ Measurement = SIMP(statut = "o", typ = 'TXM',
+ into = ( 'Manual', 'TypeA', 'TypeB'),),
+ b_enter_mesure = BLOC(condition = 'MEASUREMENT == "Manual"',
+ Value = SIMP(statut = "o", typ = 'I'),
+ Unit = SIMP(statut = "o", typ = 'TXM', into = ('feet', 'meters')),
+ ),
+ ),
+ Ground = FACT( statut='o',
+ Ground_Roughness = SIMP(statut='o',typ='TXM',
+ into=('Open Country', 'Urban Or Forest', 'Open Water', 'Manual')
+ ),
+ b_enter_ground = BLOC(condition = 'Ground_Roughness == "Manual"',
+ Input_Roughness = SIMP(statut = "o", typ = 'I'),
+ Unit = SIMP(statut = "o", typ = 'TXM', into = ('in', 'cm'), defaut='cm')
+ ),
+
+ ),
+ Cover = FACT( statut='o',
+ Cover_type = SIMP(statut='o',typ='TXM', into=('Manual', 'Clear','Partly Cloudy','Complete Cover',),),
+ b_enter_cover = BLOC(condition = 'Cover_type == "Manual"',
+ Cover_Value = SIMP(statut = "o", typ = 'I',val_max=10),
+ ),
+ ),
+
+)
--- /dev/null
+# -*- coding: utf-8 -*-\r
+# maConfiguration MANAGEMENT OF EDF VERSION\r
+# ======================================================================\r
+# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG\r
+# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY\r
+# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY\r
+# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR\r
+# (AT YOUR OPTION) ANY LATER VERSION.\r
+#\r
+# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT\r
+# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF\r
+# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU\r
+# GENERAL PUBLIC LICENSE FOR MORE DETAILS.\r
+#\r
+# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE\r
+# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER,\r
+# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE.\r
+#\r
+#\r
+# ======================================================================\r
+"""\r
+ Ce module sert pour charger les paramètres de configuration d'EFICAS\r
+"""\r
+# Modules Python\r
+from InterfaceQT4 import configuration\r
+import os\r
+\r
+\r
+class CONFIG(configuration.configBase):\r
+\r
+ #-----------------------------------\r
+ def __init__(self,appli,repIni):\r
+ #-----------------------------------\r
+\r
+ self.labels_user=['catalogues','lang']\r
+ self.labels_eficas=['lang','rep_cata','catalogues']\r
+ self.afficheOptionnelVide=True\r
+ configuration.configBase.__init__(self,appli,repIni)\r
+\r
+\r
+def make_config(appli,rep):\r
+ return CONFIG(appli,rep)\r
+\r
--- /dev/null
+# Copyright (C) 2007-2012 EDF R&D
+#
+# 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
+# version 2.1 of the License.
+#
+# 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
+#
+code="Atmo"
+import sys, os
+if os.path.dirname(os.path.abspath(__file__)) not in sys.path :
+ sys.path.insert(0,os.path.dirname(os.path.abspath(__file__)))
--- /dev/null
+# -*- coding: utf-8 -*-
+# maConfiguration MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG
+# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY
+# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY
+# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR
+# (AT YOUR OPTION) ANY LATER VERSION.
+#
+# THIS PROGRAM 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
+# GENERAL PUBLIC LICENSE FOR MORE DETAILS.
+#
+# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE
+# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER,
+# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE.
+#
+#
+# ======================================================================
+
+import os,sys
+# repIni sert a localiser le fichier editeur.ini
+# Obligatoire
+repIni=os.path.dirname(os.path.abspath(__file__))
+INSTALLDIR=os.path.join(repIni,'..')
+sys.path[:0]=[INSTALLDIR]
+
+
+# lang indique la langue utilisee pour les chaines d'aide : fr ou ang
+lang='fr'
+
+# Codage des strings qui accepte les accents (en remplacement de 'ascii')
+encoding='iso-8859-1'
+
+#
+catalogues=(
+ ('Atmo','V2017',os.path.join(repIni,'Cata_V0.py'),'python','python'),
+)
+nombreDeBoutonParLigne=4
+simpleClic=True
+closeFrameRechercheCommande=True
+boutonDsMenuBar=False
+closeArbre=True
+afficheListesPliees=False
+afficheCommandesPliees = False
--- /dev/null
+#@ MODIF properties Accas DATE 11/06/2008 AUTEUR aster M.ADMINISTRATEUR
+# RESPONSABLE D6BHHHH J-P.LEFEBVRE
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2001 EDF R&D WWW.CODE-ASTER.ORG
+# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY
+# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY
+# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR
+# (AT YOUR OPTION) ANY LATER VERSION.
+#
+# THIS PROGRAM 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
+# GENERAL PUBLIC LICENSE FOR MORE DETAILS.
+#
+# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE
+# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER,
+# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE.
+# ======================================================================
+# IDENTIFICATION DU GESTIONNAIRE DE COMMANDE ACCAS A PARTIR
+# DE LA VERSION DU CODE_ASTER ASSOCIE
+#----------------------------------------------------------------------
+version = "1.2"
+date = "25/05/2010"
+exploit = False
--- /dev/null
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+# Copyright (C) 2007-2013 EDF R&D
+#
+# 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
+# version 2.1 of the License.
+#
+# 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
+#
+"""
+ Ce module sert a lancer EFICAS configure pour MAP
+"""
+# Modules Python
+# Modules Eficas
+import prefs
+name='prefs_'+prefs.code
+__import__(name)
+
+import sys
+reload(sys)
+sys.setdefaultencoding('latin1')
+import os
+sys.path.append(os.path.join(os.path.abspath(os.path.dirname(__file__)),'..'))
+
+import prefs
+from InterfaceQT4 import eficas_go
+eficas_go.lanceEficas(code=prefs.code)
self.statut = statut
self.langue = appli.langue
- self.TelemacdicoEn = appli.readercata.TelemacdicoEn
+ try : self.TelemacdicoEn = appli.readercata.TelemacdicoEn
+ except :
+ print ('Attention : pas de TelemacdicoEn declare')
+ self.TelemacdicoEn = {}
self.DicoEnumCasEnInverse = {}
#from enum_Telemac2d_auto import self.TelemacdicoEn
for motClef in self.TelemacdicoEn:
else : self.listeTelemac = ()
self.dicoCataToCas={}
- self.dicoCasToCata=appli.readercata.dicoCasToCata
+ try :
+ self.dicoCasToCata=appli.readercata.dicoCasToCata
+ except :
+ print ('Attention pas de dicoCasToCata declare')
+ self.dicoCasToCata={}
+ self.dicoCataToCas={}
for motClef in self.dicoCasToCata:
self.dicoCataToCas[self.dicoCasToCata[motClef]]=motClef