--- /dev/null
+./qtEficasReacteurNumerique.py -c cata_RN.py essaiPN.comm
if os.path.dirname(repEficas) not in sys.path : sys.path.insert(0,repEficas)
import types
-from Noyau.N_VALIDATOR import Valid
from cata_RN import *
# sert a activer les options d incertitude dans eficas
+#!/usr/bin/env python
# Copyright (C) 2007-2012 EDF R&D
#
# This library is free software; you can redistribute it and/or
name='prefs_' + code
prefFile = Path(name + ".py")
-if (prefFile .is_file():
+if prefFile.is_file():
try :
__import__(name)
except :
print ('Unable to import {}').format(prefFile)
exit(1)
-from InterfaceQT4 import eficas_go
-eficas_go.lanceEficas(code=prefs.code,GUI='QT5')
+from Editeur import eficas_go
+eficas_go.lanceEficas(code=code,GUIPath='QT5')
--- /dev/null
+import os
+repIni='/home/A96028/QT5Dev/eficasMerge/Codes/ReacteurNumerique'
+lang='fr'
+catalogues=(
+ ('ReacteurNumerique','Version Beta',os.path.join(repIni,'cata_RN_UQ.py'),'python','python'),
+ #('ReacteurNumerique','Version UQ',os.path.join(repIni,'cata_RN_EDG_Fake.py'),'python','python'),
+)
+closeFrameRechercheCommande=False
#
# ======================================================================
-import traceback
-traceback.print_stack()
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,'..')
+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'
-
-#
#typeDeCata='XML'
catalogues=(
('ReacteurNumerique','Version Beta',os.path.join(repIni,'cata_RN_UQ.py'),'python','python'),
# Modules Eficas
import prefs
name='prefs_'+prefs.code
-__import__(name)
+#__import__(name)
import os, sys
-
sys.path.append(os.path.join(os.path.abspath(os.path.dirname(__file__)),'..','..'))
-import prefs
-from InterfaceQT4 import eficas_go
+from Editeur import eficas_go
print (prefs.code)
-eficas_go.lanceEficas(code=prefs.code)
+eficas_go.lanceEficas(code=prefs.code, GUIPath='QT5')
Ce module sert pour charger les paramètres de configuration d'EFICAS\r
"""\r
# Modules Python\r
-from InterfaceQT4 import configuration\r
+from InterfaceGUI import configuration\r
import os\r
\r
\r
+++ /dev/null
-# Copyright (C) 2001-2020 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
-
-find_package(Sphinx REQUIRED)
-
-# configured documentation tools and intermediate build results
-set(BINARY_BUILD_DIR "${CMAKE_CURRENT_BINARY_DIR}/_build")
-
-# Sphinx cache with pickled ReST documents
-set(SPHINX_CACHE_DIR "${CMAKE_CURRENT_BINARY_DIR}/_doctrees")
-
-# HTML output directory
-set(SPHINX_HTML_DIR "${CMAKE_CURRENT_BINARY_DIR}/html")
-
-add_custom_target(EFICAS_NOUVEAUdoc ALL
- ${SPHINX_EXECUTABLE}
- -q -b html
- -d "${SPHINX_CACHE_DIR}"
- "${CMAKE_CURRENT_SOURCE_DIR}"
- "${SPHINX_HTML_DIR}"
- COMMENT "Building HTML documentation with Sphinx")
-
-INSTALL(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html/ DESTINATION ${CMAKE_INSTALL_PREFIX}/Doc/)
+++ /dev/null
-# Makefile for Sphinx documentation
-#
-
-# You can set these variables from the command line.
-SPHINXOPTS =
-SPHINXBUILD = sphinx-build
-PAPER =
-BUILDDIR = _build
-
-# Internal variables.
-PAPEROPT_a4 = -D latex_paper_size=a4
-PAPEROPT_letter = -D latex_paper_size=letter
-ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
-# the i18n builder cannot share the environment and doctrees with the others
-I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
-
-.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext
-
-help:
- @echo "Please use \`make <target>' where <target> is one of"
- @echo " html to make standalone HTML files"
- @echo " dirhtml to make HTML files named index.html in directories"
- @echo " singlehtml to make a single large HTML file"
- @echo " pickle to make pickle files"
- @echo " json to make JSON files"
- @echo " htmlhelp to make HTML files and a HTML help project"
- @echo " qthelp to make HTML files and a qthelp project"
- @echo " devhelp to make HTML files and a Devhelp project"
- @echo " epub to make an epub"
- @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
- @echo " latexpdf to make LaTeX files and run them through pdflatex"
- @echo " text to make text files"
- @echo " man to make manual pages"
- @echo " texinfo to make Texinfo files"
- @echo " info to make Texinfo files and run them through makeinfo"
- @echo " gettext to make PO message catalogs"
- @echo " changes to make an overview of all changed/added/deprecated items"
- @echo " linkcheck to check all external links for integrity"
- @echo " doctest to run all doctests embedded in the documentation (if enabled)"
-
-clean:
- -rm -rf $(BUILDDIR)/*
-
-html:
- $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
- @echo
- @echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
-
-dirhtml:
- $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
- @echo
- @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
-
-singlehtml:
- $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
- @echo
- @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
-
-pickle:
- $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
- @echo
- @echo "Build finished; now you can process the pickle files."
-
-json:
- $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
- @echo
- @echo "Build finished; now you can process the JSON files."
-
-htmlhelp:
- $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
- @echo
- @echo "Build finished; now you can run HTML Help Workshop with the" \
- ".hhp project file in $(BUILDDIR)/htmlhelp."
-
-qthelp:
- $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
- @echo
- @echo "Build finished; now you can run "qcollectiongenerator" with the" \
- ".qhcp project file in $(BUILDDIR)/qthelp, like this:"
- @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/EFICASdoc.qhcp"
- @echo "To view the help file:"
- @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/EFICASdoc.qhc"
-
-devhelp:
- $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
- @echo
- @echo "Build finished."
- @echo "To view the help file:"
- @echo "# mkdir -p $$HOME/.local/share/devhelp/EFICASdoc"
- @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/EFICASdoc"
- @echo "# devhelp"
-
-epub:
- $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
- @echo
- @echo "Build finished. The epub file is in $(BUILDDIR)/epub."
-
-latex:
- $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
- @echo
- @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
- @echo "Run \`make' in that directory to run these through (pdf)latex" \
- "(use \`make latexpdf' here to do that automatically)."
-
-latexpdf:
- $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
- @echo "Running LaTeX files through pdflatex..."
- $(MAKE) -C $(BUILDDIR)/latex all-pdf
- @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
-
-text:
- $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
- @echo
- @echo "Build finished. The text files are in $(BUILDDIR)/text."
-
-man:
- $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
- @echo
- @echo "Build finished. The manual pages are in $(BUILDDIR)/man."
-
-texinfo:
- $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
- @echo
- @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
- @echo "Run \`make' in that directory to run these through makeinfo" \
- "(use \`make info' here to do that automatically)."
-
-info:
- $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
- @echo "Running Texinfo files through makeinfo..."
- make -C $(BUILDDIR)/texinfo info
- @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
-
-gettext:
- $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
- @echo
- @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
-
-changes:
- $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
- @echo
- @echo "The overview file is in $(BUILDDIR)/changes."
-
-linkcheck:
- $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
- @echo
- @echo "Link check complete; look for any errors in the above output " \
- "or in $(BUILDDIR)/linkcheck/output.txt."
-
-doctest:
- $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
- @echo "Testing of doctests in the sources finished, look at the " \
- "results in $(BUILDDIR)/doctest/output.txt."
--- /dev/null
+# Copyright (C) 2001-2020 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
+
+find_package(Sphinx REQUIRED)
+
+# configured documentation tools and intermediate build results
+set(BINARY_BUILD_DIR "${CMAKE_CURRENT_BINARY_DIR}/_build")
+
+# Sphinx cache with pickled ReST documents
+set(SPHINX_CACHE_DIR "${CMAKE_CURRENT_BINARY_DIR}/_doctrees")
+
+# HTML output directory
+set(SPHINX_HTML_DIR "${CMAKE_CURRENT_BINARY_DIR}/html")
+
+add_custom_target(EFICAS_NOUVEAUdoc ALL
+ ${SPHINX_EXECUTABLE}
+ -q -b html
+ -d "${SPHINX_CACHE_DIR}"
+ "${CMAKE_CURRENT_SOURCE_DIR}"
+ "${SPHINX_HTML_DIR}"
+ COMMENT "Building HTML documentation with Sphinx")
+
+INSTALL(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html/ DESTINATION ${CMAKE_INSTALL_PREFIX}/Doc/)
--- /dev/null
+# Makefile for Sphinx documentation
+#
+
+# You can set these variables from the command line.
+SPHINXOPTS =
+SPHINXBUILD = sphinx-build
+PAPER =
+BUILDDIR = _build
+
+# Internal variables.
+PAPEROPT_a4 = -D latex_paper_size=a4
+PAPEROPT_letter = -D latex_paper_size=letter
+ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
+# the i18n builder cannot share the environment and doctrees with the others
+I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
+
+.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext
+
+help:
+ @echo "Please use \`make <target>' where <target> is one of"
+ @echo " html to make standalone HTML files"
+ @echo " dirhtml to make HTML files named index.html in directories"
+ @echo " singlehtml to make a single large HTML file"
+ @echo " pickle to make pickle files"
+ @echo " json to make JSON files"
+ @echo " htmlhelp to make HTML files and a HTML help project"
+ @echo " qthelp to make HTML files and a qthelp project"
+ @echo " devhelp to make HTML files and a Devhelp project"
+ @echo " epub to make an epub"
+ @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
+ @echo " latexpdf to make LaTeX files and run them through pdflatex"
+ @echo " text to make text files"
+ @echo " man to make manual pages"
+ @echo " texinfo to make Texinfo files"
+ @echo " info to make Texinfo files and run them through makeinfo"
+ @echo " gettext to make PO message catalogs"
+ @echo " changes to make an overview of all changed/added/deprecated items"
+ @echo " linkcheck to check all external links for integrity"
+ @echo " doctest to run all doctests embedded in the documentation (if enabled)"
+
+clean:
+ -rm -rf $(BUILDDIR)/*
+
+html:
+ $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
+ @echo
+ @echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
+
+dirhtml:
+ $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
+ @echo
+ @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
+
+singlehtml:
+ $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
+ @echo
+ @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
+
+pickle:
+ $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
+ @echo
+ @echo "Build finished; now you can process the pickle files."
+
+json:
+ $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
+ @echo
+ @echo "Build finished; now you can process the JSON files."
+
+htmlhelp:
+ $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
+ @echo
+ @echo "Build finished; now you can run HTML Help Workshop with the" \
+ ".hhp project file in $(BUILDDIR)/htmlhelp."
+
+qthelp:
+ $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
+ @echo
+ @echo "Build finished; now you can run "qcollectiongenerator" with the" \
+ ".qhcp project file in $(BUILDDIR)/qthelp, like this:"
+ @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/EFICASdoc.qhcp"
+ @echo "To view the help file:"
+ @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/EFICASdoc.qhc"
+
+devhelp:
+ $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
+ @echo
+ @echo "Build finished."
+ @echo "To view the help file:"
+ @echo "# mkdir -p $$HOME/.local/share/devhelp/EFICASdoc"
+ @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/EFICASdoc"
+ @echo "# devhelp"
+
+epub:
+ $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
+ @echo
+ @echo "Build finished. The epub file is in $(BUILDDIR)/epub."
+
+latex:
+ $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
+ @echo
+ @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
+ @echo "Run \`make' in that directory to run these through (pdf)latex" \
+ "(use \`make latexpdf' here to do that automatically)."
+
+latexpdf:
+ $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
+ @echo "Running LaTeX files through pdflatex..."
+ $(MAKE) -C $(BUILDDIR)/latex all-pdf
+ @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
+
+text:
+ $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
+ @echo
+ @echo "Build finished. The text files are in $(BUILDDIR)/text."
+
+man:
+ $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
+ @echo
+ @echo "Build finished. The manual pages are in $(BUILDDIR)/man."
+
+texinfo:
+ $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
+ @echo
+ @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
+ @echo "Run \`make' in that directory to run these through makeinfo" \
+ "(use \`make info' here to do that automatically)."
+
+info:
+ $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
+ @echo "Running Texinfo files through makeinfo..."
+ make -C $(BUILDDIR)/texinfo info
+ @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
+
+gettext:
+ $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
+ @echo
+ @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
+
+changes:
+ $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
+ @echo
+ @echo "The overview file is in $(BUILDDIR)/changes."
+
+linkcheck:
+ $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
+ @echo
+ @echo "Link check complete; look for any errors in the above output " \
+ "or in $(BUILDDIR)/linkcheck/output.txt."
+
+doctest:
+ $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
+ @echo "Testing of doctests in the sources finished, look at the " \
+ "results in $(BUILDDIR)/doctest/output.txt."
--- /dev/null
+Add a command
+=============
+
+Eficas allows you to create or edit a dataset. Remember it is always possible to save (or read) invalid datasets.
+Building dataset consists of adding new commands, entering parameter values and if necessary naming concepts.
+see : :ref:`concept-label`.
+|
+Eficas provides two different widgets : first one allows you to manage commands, second one to enter values for each command.
+You can navigate between widgets using arrows or pushbutton.
+
+.. image:: images/CommandeBouton.png
+ :align: right
+
+Command widget shows up at file creation (if the new file is created empty ) or when clicking on :
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Enter commands
+---------------
+
+Eficas main widget provided two distinct areas: The left side always contains the dataset explorer as a tree view. The right widget contains all commands the user is allowed to select.
+If a dataset consists of a single command, tree view area is not displayed.
+
+.. image:: images/ChoixCommande.png
+ :align: center
+
+|
+
+To have command's **documentation** (if available), **simple-click** on the command.
+
+.. image:: images/Documentation1.png
+ :align: center
+
+|
+
+
+To **add** the command **click twice.** The new command is added after the current command (highlighted in the tree view). In case of impossibility, a message is displayed.
+
+.. image:: images/Ordre.png
+ :align: center
+
+|
+
+
+
+If the dataset must comply with building :ref:`rules-label`, a specific icon appears in the command widget.
+
+.. image:: images/Regles.png
+ :align: center
+
+|
+
+
+The user also can choose the way the commands are sorted, either by alphabetical order, either by fonctionnalities.
+Last type of sorting commands is called 'by modelisation' that is to say logical order to prepare data for the code.
+
+.. image:: images/Groupes.png
+ :align: center
+
+|
+
+
+The content filtering system is very simple : only commands containing the expression are shown.
+
+.. image:: images/FiltreCommande.png
+ :align: center
+
+|
+
+
+
+The user can use "Find", which is a filter widget to find a concept or command position in the dataset. The pushbutton "next/suivant" shows the next matching concept/command.
+
+.. image:: images/FindConcept.png
+ :align: center
+
+
--- /dev/null
+Color chart
+===========
+
+a very simple colors chart helps the user to know if a item is valid or not :
+
+* In the Dataset tree view
+
+ - green square : valid objects (Dataset, Command, Concept ...)
+ - red square : unvalid objects
+ - **yellow square** : valid **Concept** the user must name
+ - green diamond : valid group keywords
+ - red diamond : unvalid group keywords
+ - green circle : valid keywords
+ - red circle : unvalid keywords
+
+* In the input data form widget
+ - green circle : valid keywords or unvalid objects
+ - red circle : unvalid keywords or unvalid objects
+
+* In the rules part
+
+ - red is for unobserved rules
+ - black is for observed rules
+
--- /dev/null
+Parameters and comments
+========================
+
+Parameters
+-----------
+The users can define parameters. As parameters, Eficas accepts :
+
+- Real
+- String
+- Integer
+- List
+
+A parameter's definition can use existing parameters such as :
+eps=sqrt((((W / NX) ** 2) + ((H / NY) ** 2)))
+
+right-click menus on tree items allows you to add a parameter.
+
+.. image:: images/Parametres.png
+ :align: center
+
+
+Pushing on "Parametres" Pushbutton opens a dialog containing all already existing parameters. You can define as many parameters as needed
+at once.
+
+.. image:: images/Parametres1.png
+ :align: center
+
+
+to use a parameter, just type its name.
+
+.. image:: images/Parametres2.png
+ :align: center
+
+
+Comments
+---------
+
+Comments may refer to :
+
+- user annotation. In this case, background label is white.
+- generated comment. In this case, background label is light grey.
+
+
+.. image:: images/Commentaire.png
+ :align: center
+
--- /dev/null
+# -*- coding: utf-8 -*-
+#
+# Copyright (C) 2001-2020 EDF R&D
+#
+# This file is part of SALOME EFICAS module
+#
+# 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
+#
+# Author: Jean-Philippe Argaud, jean-philippe.argaud@edf.fr, EDF R&D
+
+import sys, os, time, sphinx, logging
+
+# -- Module version information --------------------------------------------------
+
+if "module_version" not in locals():
+ module_version = lambda : None
+ module_version.name = "EFICAS_NOUVEAU"
+ module_version.year = "%s"%(time.localtime()[0],)
+ module_version.version = ""
+ logging.warning('Using fallback "module_version" because none was found')
+
+# -- Project information -------------------------------------------------------
+
+project = u'%s'%module_version.name
+author = u'Pascale NOYRET'
+copyright = u'2001-%s, EDF R&D, %s'%(module_version.year,author)
+version = '%s'%module_version.version
+release = '%s'%module_version.version
+doctitle = u"%s documentation"%module_version.name
+docfull = u"Editeur de FIchier de Commandes et Analyseur Sémantique"
+
+# -- General configuration -----------------------------------------------------
+
+from distutils.version import LooseVersion #, StrictVersion
+__lv = LooseVersion(sphinx.__version__)
+if __lv < LooseVersion("1.4.0"):
+ extensions = ['sphinx.ext.pngmath']
+else:
+ extensions = ['sphinx.ext.imgmath']
+try:
+ import sphinx_rtd_theme
+ extensions += ['sphinx_rtd_theme']
+ use_rtd_theme = True
+ logging.debug('Using "sphinx_rtd_theme" that was found')
+except:
+ use_rtd_theme = False
+ logging.debug('Not using "sphinx_rtd_theme" because none was found')
+#
+source_suffix = '.rst'
+source_encoding = 'utf-8'
+master_doc = 'index'
+language = 'en'
+exclude_patterns = [
+ '_build',
+ 'Thumbs.db',
+ '.DS_Store',
+ ]
+pygments_style = None
+templates_path = ['_templates']
+
+# -- Options for HTML output ---------------------------------------------------
+
+if use_rtd_theme:
+ html_theme = "sphinx_rtd_theme"
+else:
+ html_theme = 'default' if __lv < LooseVersion("1.3.0") else 'classic'
+#
+html_title = doctitle
+html_static_path = ['_static']
+html_show_sourcelink = False
+html_search_language = language
+
+# -- Options for HTMLHelp output -----------------------------------------------
+
+htmlhelp_basename = module_version.name+'doc'
+
+# -- Options for LaTeX output --------------------------------------------------
+
+latex_elements = {
+ 'papersize': 'a4paper',
+ 'pointsize': '10pt',
+ 'figure_align': 'htbp',
+}
+latex_documents = [
+ ('index', '%s.tex'%module_version.name, doctitle,
+ author, 'manual'),
+]
+
+# -- Options for manual page output --------------------------------------------
+
+man_pages = [
+ (master_doc, '%s'%module_version.name, doctitle,
+ [author], 1)
+]
+
+# -- Options for Texinfo output ------------------------------------------------
+
+texinfo_documents = [
+ (master_doc, '%s'%module_version.name, doctitle,
+ author, '%s'%module_version.name, docfull,
+ 'Miscellaneous'),
+]
+
+# -- Options for Epub output ---------------------------------------------------
+
+epub_title = doctitle
+epub_author = author
+epub_publisher = author
+epub_copyright = copyright
+epub_exclude_files = ['search.html']
+
+# -- Options for PDF output ----------------------------------------------------
+
+pdf_documents = [(
+ 'contents',
+ u'%s'%module_version.name,
+ u'%s'%module_version.name,
+ author,
+ dict(pdf_compressed = True),
+),]
+pdf_stylesheets = ['sphinx','kerning','a4']
+pdf_compressed = True
+pdf_inline_footnotes = True
+
+# -- Extension configuration ---------------------------------------------------
--- /dev/null
+.. _icons-label:
+
+=======================
+Using icons in Eficas
+=======================
+
+Icons
+-----
+
+Icons are used because they are presumed to save time, but all actions can be accessed from menus.
+Eficas use a small set of icons. Hopefully, users are familiar with. However, all icons are labelled.
+
+
+.. image:: images/Icons.png
+ :align: center
+
+
+
+
+Shortcuts
+---------
+
+Eficas keybord shortcuts require the user to press a sequence of keys.
+These sequences contain 'Ctrl' for common shortcuts as "Ctrl+C", Alt for accessing action of menu, and 'Shift' for specific actions. Note that 'Shift D' allows expanding/collapsing items
+
+
+
+
--- /dev/null
+.. _salome-label:
+
+Eficas in Salome (For Aster)
+============================
+
+Launching Eficas in Salome
+---------------------------
+First activate Eficas module
+
+.. image:: images/LctDsSalome.png
+ :align: center
+
+
+Use Eficas. When a file is saved, Eficas will create an associated entry in the object browser.
+It is possible to use the file in other modules (see appropriate module's documentation).
+
+.. image:: images/ArbreSalome.png
+ :align: center
+
+Structural Element
+-------------------
+
+Eficas is able to create "structural element" in GEOM or in SMESH in order to
+validate data.
+
+- Create your geometry
+
+.. image:: images/SalomePylone.png
+ :align: center
+
+- Create your Eficas dataseat, and define for example a beam , with AFFE-CARA-ELEM.
+
+- Click on "View3D". Eficas shows you the result in GEOM and creates "beams" .
+ Be aware : these "structural elements" are not "geometry elements". You can't use it.
+ It's also possible to verify normals orientation.
+
+.. image:: images/SalomePyloneSE.png
+ :align: center
+
+
--- /dev/null
+.. _concept-label:
+
+Eficas Concepts
+================
+
+Commands in the Data Set (or JDC Jeu De Commandes )
+---------------------------------------------------
+
+A dataset is made of a collection of commands. Each command have parameters (keywords). They can return concept or not:
+
+* Command not returning concept : they are described as "PROC" in catalogs.
+
+ - example:
+ - DEBUT() is a proc.
+ - for ASTER, it initializes memory and files.
+
+* Command returning a concept :
+ The concept has a specific type (defined in the catalog) and a name (given by the user). These commandes are described as "OPER" in catalogs.
+
+ - example :
+ - MONMAIL=LIRE_MAILLAGE(UNITE=20);
+ - This line creates a new concept MONMAIL of type "maillage", which can be re-used as entry for another keyword.
+
+ When an object is valid, the user has to named it. In tree view, a yellow square shows valid objects that have to be nammed.
+
+Commands are composed of keywords, or groups of keywords. These items are associated according to rules or conditions.
+They are described in the catalog.
+
+
+Keywords
+---------
+
+* Group of keywords (mot-clef facteur )
+
+ This is a list of keywords which jointly have a meaning for the code.
+ It is composed of group of keywords and simple keywords.
+ Some are mandatory, repeatable.
+ This list can depend on conditionnal rules.
+
+
+* Simple keyword (mot-clef simple) .
+
+ This is a parameter. It also can be mandatory or not.
+ It has attributes.
+
+
+Attributes of a keyword
+---------------------------
+
+a parameter (simple keyword or "mot-clef simple") has :
+
+- a type : real, string, complex, integer, matrix, file (existing or allready existing), directory or a concept class which is defined in the catalog.
+- a cardinality.
+
+a parameter (simple keyword or "mot-clef simple") should have :
+
+- a default value
+- a short documentation
+- a long documentation
+- an interval of values
+- a set of discrete values
+
+
+Input data panel depends on both these attributes. Eficas ensures that data are valid. It forces the user to enter a list if needed, it verifies the input type. It displays only possible values.
+
+
+
--- /dev/null
+What's Eficas
+==============
+
+Name's origin
+-------------
+Eficas is the acronym of ' **E**\ diteur de **FI**\ chier de **C**\ ommandes et **A**\ nalyseur **S**\ émantique'.
+That means that Eficas allows users to write a parameter file for a code.
+It handles with syntax and semantic.
+It avoids misuse of commands which are not allowed in a given context.
+It insures integrity of the file.
+
+General Behaviour
+------------------
+* Catalogs
+
+Eficas can be used by multiple codes and handles with multiple versions of each code. It is customized with files named "Catalogs (or Catalogues)" : It contains all commands for a code. Each command has a name and parameters which are defined by developpers.
+
+
+* Outputs
+
+Eficas's output is a commands file (dataset file or Jeux De Données) ".comm". It may be able to produce various file formats such as .xml, .py or specific format. However, you always must have a '.comm" output: this is the only format Eficas is able to reread.
+
+Both commands Files and Catalogs are python file. So you have to remind some
+:ref:`python-label`
+
+
--- /dev/null
+.. _rules-label:
+
+===============================
+Eficas rules
+===============================
+
+All the rules can be combinated, creating more complicated rules.
+
+AU_MOINS_UN
+-----------
+
+ AU_MOINS_UN rule obliges the user to create at least one concept of the list. More than one can be created.
+
+- Example
+
+ Keyword POUTRE in OPER AFFE_CARA_ELEM contains the rule :
+
+ regles=(AU_MOINS_UN(
+ 'POUTRE','COQUE','DISCRET','CABLE','BARRE','MASSIF','ASSE_GRIL','GRILLE'),)
+
+- That means if AFFE_CARA_ELEM is used in the JDC, the user must select one at least of the Keyword between POUTRE, COQUE, DISCRET, CABLE, BARRE, MASSIF, ASSE_GRIL, GRILLE :
+
+ * If the user doesn't select any of these keywords, AFFE_CARA_ELEM is unvalid.
+ * If he selects POUTRE, AFFE_CARA_ELEM is valid.
+ * If he selects both POUTRE and DISCRET, AFFE_CARA_ELEM is valid.
+
+
+UN_PARMI
+--------
+
+ AU_MOINS_UN rule obliges the user to create one and only one concept of the list.
+
+- Example
+
+ Oper AFFE_CHAR_MECA contains the rules :
+
+ regles=(UN_PARMI('VECT_Y','ANGL_VRIL'),
+
+- That means if AFFE_CHAR_MECA is used in the JDC, the user must select VECT_Y or ANGL_VRIL.
+
+ * If the user doesn't select any of these keywords, DEFI_GROUP is unvalid.
+ * If he selects only VECT_Y, DEFI_GROUP is valid.
+ * Eficas will not proposed the keyword ANGL_VRIL if VECT_Y already exists.
+
+
+EXCLUS
+--------
+
+ EXCLUS means that, if one of the keyword is created, the other won't be allowed.
+
+ - Example :
+ DEFI_SQUELETTE contains the rules :
+
+ EXCLUS('SOUS_STRUC','SECTEUR')
+
+- That means if DEFI_SQUELETTE is used in the JDC
+
+ * If the user doesn't select any of these keywords, DEFI_SQUELETTE is valid.
+ * If he selects only SOUS_STRUC, DEFI_SQUELETTE is valid.
+ * If he selects only SECTEUR, DEFI_SQUELETTE is valid.
+ * Eficas will not proposed the keyword SECTEUR if SOUS_STRUC already exists.
+
+ENSEMBLE
+--------
+
+ the rule means that if one keyword is selected, the others have to be also.
+ the keywords order is not meaningful.
+
+- Example
+
+ GRILLE in AFFE_CARA_ELEM, contains :
+
+ ENSEMBLE('ORIG_AXE','AXE')
+
+- That means if GRILLE is used in the JDC
+
+ * If the user doesn't select any of these keywords, GRILLE is valid.
+ * If he selects only ORIG_AXE, GRILLE is invalid.
+ * If he selects both ORIG_AXE and AXE, GRILLE is valid.
+
+PRESENT_PRESENT
+---------------
+
+ the rule means that if the FIRST keyword is selected, the others have to be also.
+
+- Example
+
+ MACRO_MISS_3D contains the rule
+
+ PRESENT_PRESENT('FREQ_MIN','FREQ_MAX','FREQ_PAS')
+
+- That means if MACRO_MISS_3D is used in the JDC
+
+ * If the user doesn't select any of these keywords, GRILLE is valid.
+ * If he selects only FREQ_MAX, GRILLE is valid.
+ * If he selects only FREQ_PAS, GRILLE is valid.
+ * If he selects only FREQ_MIN, GRILLE is invalid.
+ * If he selects both FREQ_MIN, FREQ_MAX and FREQ_PAS, GRILLE is valid.
+
+
+PRESENT_ABSENT
+---------------
+
+ the rule means that if the FIRST keyword is selected, the others aren't allowed.
+
+- Example
+ FORCE_COQUE in AFFE_CHAR_MECA contains
+
+ regles=( PRESENT_ABSENT('FX','PRES','F1','F2','F3','MF1','MF2'),
+
+- That means if FORCE_COQUE is used in the JDC
+
+ * If the user doesn't select any of these keywords, FORCE_COQUE is valid.
+ * If he selects only FX, FORCE_COQUE is valid.
+ * If he selects both PRES and F1, FORCE_COQUE is valid.
+
+
+
+
--- /dev/null
+.. EFICAS documentation master file, created by sphinx-quickstart on Wed Sep 14 11:40:32 2011.
+ You can adapt this file completely to your liking, but it should at least
+ contain the root `toctree` directive.
+
+Welcome to EFICAS's documentation!
+==================================
+
+This documentation covers the usage of Eficas as data setting tool.
+This is intended for end users who want to use Eficas and not for developpers who want to write a catalog.
+
+The usage of Eficas for a particular code is not described in this guide. Refer to
+code documentation to know how to use Eficas more specifically.
+
+Contents:
+
+.. toctree::
+ :maxdepth: 1
+
+ eficas_presentation
+ lancer_eficas
+ nouveau_JDC
+ ajouter_une_commande
+ parametrer_une_commande
+ color_chart
+ commentaires_parametres
+ eficas_icons
+ widgetInDetails
+ eficas_notions
+ eficas_rules
+ python_rules
+ eficas_in_salome
+
+
+
+
--- /dev/null
+Running Eficas
+==============
+
+In Eficas, many common commands can be invoked via menus, toolbar buttons as well as keyboard shortcuts.
+As in many GUI, a menu widget can be either a pull-down menu or a standalone context menu. Pull-down menus are shown by the menu bar when the user clicks on the respective item or presses the specified shortcut key. Context menus are usually invoked by some special keyboard key or by right-clicking.
+Eficas allows you to write (and reread) an unvalid file. At any time, you can save your works.
+
+
+- Eficas is mainly available in Salome, and often from code's modules (for example for Aster or Adao). Otherwise, see how to launch : :ref:`salome-label`.
+- To run Eficas standalone, use command line : python Code/qtEficas_Code.
+- On Windows, use .bat to run Eficas.
+
+*If Eficas is installed on your machine only for one specific code and one specific version of this code, skeep the two next steps.*
+
+
+
+Choose a Code ...
+------------------
+
+Unless you have started Eficas for a specific code, Eficas will ask you to choose the code you want to work with,
+each time you click on "Nouveau/New" or "Ouvrir/Open" in the "Fichier/File" menu.
+
+.. image:: images/ChoixCode.png
+ :align: center
+
+and a version of the Code
+----------------------------
+
+if many catalogs (ie many versions ) are available, Eficas will ask you to select one.
+
+.. image:: images/ChoixCata.png
+ :align: center
+
--- /dev/null
+First step
+===========
+
+Build a new dataset.
+---------------------
+Launch Eficas and choose "Nouveau/New" in "File" menu.
+
+.. image:: images/Nouveau.png
+ :align: center
+
+For some codes (Telemac or PSEN), simulation dataset are pre-filled with mandatory keywords. Users complete the dataset with values
+and add new commands if needed. In this case, the window that allows to :ref:`form-label` appears.
+
+
+Open an existing dataset.
+---------------------------
+Launch Eficas and choose "Open/Ouvrir" in "File" menu. It shows up a file Open/Save dialog window.
+
+.. image:: images/Ouvrir.png
+ :align: center
+
+Open a "Recently Used" dataset.
+--------------------------------
+To open a document that you recently used, click "File" , point to "Recently Opened", and then click the item that you want to open.
+
+.. image:: images/Recents.png
+ :align: center
+
+To clear the contents of the list, click 'Delete' item.
+
+
+Data/Jdc Menu.
+----------------
+
+.. image:: images/DataMenu.png
+ :align: center
+
+- Why is dataset unvalid?
+ Click on Validation Report item.
+
+- "Rules for dataset" displays the rules you have to respect when building a dataset
+
+
+- "Source File" item allows to check the source file.
+
+- "Result File" item allows to check the .comm result.
+ It allows you to save the dataset in a file (for Adao Study for example)
+
+- "Comment" item add a comment at the beginning of the dataset.
+
+- "Parameters" allows you to manage parameters for the dataset.
+
+Open Multiple dataset.
+----------------------
+
+You can open multiple datasets. Each file is associated with a different page and is shown by clicking on its tab.
+
+.. image:: images/Multi.png
+ :align: center
+
+
+Open twice the same dataset.
+----------------------------
+You can open twice the same dataset (in order to create a copy and rename it). Eficas warns you :
+
+.. image:: images/Duplication.png
+ :align: center
+
+In case of duplication, Eficas does not assure coherency between the two copies.
+
+
+The dataset is valid.
+---------------------
+Once the dataset is valid, you can lauch your code (in particulary PSEN, Carmel). Use 'run' icon
+or choose "Run" in the menubar.
+
+.. image:: images/Run.png
+ :align: center
+
--- /dev/null
+.. _form-label:
+
+===============
+Edit a command
+===============
+
+Each command has to be setted up. Eficas generates a data entry form.
+This form varies dynamicaly, depending on the context : rules and already existing values.
+
+This widget appears by selecting (clicking) on a command (first level in the tree view).
+
+.. image:: images/DoubleFleche.png
+ :align: right
+
+You can navigate from command to command using the arrows buttons:
+
+
+The command widget
+--------------------
+
+this widget is divided vertically into three separate areas :
+ - the tree view,
+ - the form widget
+ - the optional keywords.
+
+When needed, views provide scrollbar so that the entire information can be viewed.
+
+A bottom widget provides a horizontal bar for presenting documentation as the status bar is used to display error or warning messages.
+
+.. image:: images/Main.png
+ :align: center
+
+|
+|
+
+Edit values
+-------------
+
+Eficas uses many different widgets in order to help you to choose values :
+
+- Line editors for simple values
+- Entry lists widgets
+- Popup lists
+- Group boxes of button
+
+see :ref:`features-label` to know more about each widget.
+
+
+.. image:: images/Erreur.png
+ :align: center
+Eficas does not let you enter invalid values. It checks the type and the cardinality of the value.
+It ensures that the value is in the value domain or proposes a set of discrete values.
+Data entered is checked against a set of rules. Errors are displayed in red to draw attention.
+
+
+Form construction is dynamic
+----------------------------
+
+The form is updated according to values. It asks for the field depending on what's selected.
+
+In the example below:
+
+- if value of 'Initial_Conditions' is 'Zero Elevation', no additional data is needed
+
+.. image:: images/Zero.png
+ :align: center
+
+- if value of 'Initial_Conditions' is 'TPXO satellite altimetry', you have to fill 'Ascii_Database_For_Tide'
+
+.. image:: images/TPXO.png
+ :align: center
+
+Displaying optional keyword
+------------------------------
+
+When you create a new command, the widget opens with the optional keywords of this command.
+
+.. image:: images/OptionnelCommande.png
+ :align: center
+
+When entering in a "group keyword", the optional keywords list is updated to show optional keyword for this specific "group keyword".
+
+.. image:: images/OptionnelCommande1.png
+ :align: center
+
+
+By clicking on command label ("INITIALIZATION") or on keyword label ("Input_files"), the corresponding optional keywords list is displayed.
+
+Sometimes, when a user enters a value for a keyword, optional keywords are dependents on this value. Optional keywords list is updated.
+This is the case for conditionnal keywords
+
+.. image:: images/OptionnelParametersAdao.png
+ :align: center
+
+
+.. image:: images/OptionnelParametersAdao1.png
+ :align: center
+
+Adding/Deleting an optional keyword
+------------------------------------
+
+Optional keywords (if any) are in the right part of the "command window". Just double-click on the checkbox to add the keyword.
+The input data form is redisplayed and the list of possible optional keywords will be updated (for example, if two keywords cannot be simultaneously present).
+
+.. image:: images/DblClickOnOptional.png
+ :align: center
+
+.. image:: images/Poubelle.png
+ :align: right
+To delete a keyword (or a command), just click the garbage icon :
+
+|
+Naming Concepts
+---------------
+
+The icon for a command may be one of three colors: green, yellow or red. These colors represent the status of the command and the color meanings is :
+ - red for unvalid command,
+ - green for valid command,
+ - yellow for commands which have to be named.
+
+.. image:: images/NommerObjet.png
+ :align: center
+
+Tooltips
+--------
+
+**Use tooltips to have information.**
+
+- Tooltips on **labels** display **information about the keyword**. Double-click on the label to display this information in the comment area, at the bottom of the window. This is useful for long text. *(You also can double-click on the keyword in the tree dataset.)*
+
+.. image:: images/ToolTipOnLabel.png
+ :align: center
+
+- Tooltips on **lineEdit** (one-line text editor) display **suggestion** for the input value. Suggestion are not very frequent. They are not default values, because you have to enter it explicitely.
+
+.. image:: images/ToolTipOnLineEdit.png
+ :align: center
+
+- Tooltips on **Red point** display **information about the validity** for the keyword or for the group of keywords.
+By double-clicking on the "red point" a window displaying the same information appears. It should be usefull if text
+is too long to be read at one sitting.
+
+.. image:: images/ToolTipOnRed.png
+ :align: center
+
+- Tooltips on **Commands Button** explain what the icon/button represents, and which action is activated by clicking.
+
+.. image:: images/ToolTipOnButton.png
+ :align: center
+
+
+Context Menus
+--------------
+In the dataset tree, context menus (invoked by right-clicking) allow user to :
+
+- create comments in the tree
+- create parameter
+- comment the command itself
+- delete the node
+
+.. image:: images/Menus.png
+ :align: center
+
+Some commands have associated scripts. They are easy to identify because the "run" icon is present :
+
+.. image:: images/Roue.png
+ :align: right
+
+
+.. image:: images/Scripts.png
+ :align: center
--- /dev/null
+.. _python-label:
+
+===============================
+rules for python syntax
+===============================
+
+Variable names and identifiers are similar to those in many other languages :
+----------------------------------------------------------------------------
+
+* They start with a letter (A_Z or a-z) or underscore "_"".
+* They are followed by letters, numbers or underscores.
+* They are case-sensitive.
+* A string is a sequence of caracters enclosed by a matching pair of single or double quotes.
+
+Eficas does not allow you to use uncorrect names :
+
+.. image:: images/NomPython.png
+
+Some identifiers are reserved words :
+-------------------------------------
+
+* You can't use words of the python language as identifiers.
+* Eficas itself uses identifiers which become reserved words. For example, you can't use the following words, even if it would make some interesting names:
+ - BLOC, EXCLUS, OPER, ASSD,
+ - EVAL, FACT, FORM, JDC,
+ - REGLE, VALIDATOR,
+ - ETAPE, ENTITE
+
+Python's way for assigning values to variables:
+-------------------------------------------------
+
+* Keep in mind that ".comm" are python files. The simplest form of assignement is : variable = value
+* The hash character (#) starts a comment
+* Tuples are enclosed in parentheses.
+* Lists are enclosed in bracked.
+* In tuples or lists, a ',' follows each item especially the last one.
+
+.. image:: images/ListeEtTuple.png
+
--- /dev/null
+.. _features-label:
+
+========================
+Some Widgets Features
+========================
+
+File or Directory
+-----------------
+
++-------------------------------------+--------------------------------------------------+
+| a File parameter has to be : | if catalog's description is : |
++=====================================+==================================================+
+|an existing file | type='Fichier' |
++-------------------------------------+--------------------------------------------------+
+|a directory | type='Repertoire' |
++-------------------------------------+--------------------------------------------------+
+|an existing file with specific suffix| type='Fichier','JDC Files (*.comm);;All Files (*)|
++-------------------------------------+--------------------------------------------------+
+|a non-allready existing file | type=('Fichier',"",'Sauvegarde'), |
++-------------------------------------+--------------------------------------------------+
+|a simple string | type='FichierNoAbs' |
++-------------------------------------+--------------------------------------------------+
+
+The following widget allows users to enter a directory (first) or a file. Magnifier icon is not avalaible when a directory is required.
+
+.. image:: images/FichiersEtRepertoires.png
+
+- to open a file explorer, click on the corresponding icon. If a file suffix is required, content of the directory is filtered before being shown in the dialog, using a semicolon-separated list of filters specified.
+
+- to view file content, click on magnifier icon. It uses xdg-open, which is a desktop-independent tool for opening files (according to suffix convention).
+
+
+List
+-----
+List widgets have a toolbar down, under values area.
+
+.. image:: images/ShowAllValues.png
+
+- Use the Up or Down arrows to move the selection in the list
+- Use the Plus (or Minus) icon to add (delete) a new line
+- Use the magnifier icon to see all the values in a modal widget
+
+|
+
+If lists are not ordered, it is possible to select all values by clicking the button on the right.
+
+.. image:: images/SelectAllInList.png
+
+
+
+Import data from file
+-----------------------
+
+Data import icon provide access to data from ASCII text files.
+Select the character that separates values in your text file and values you want to import.
+
+.. image:: images/Import.png
+ :align: center
+
+
+Matrix
+-------
+Sometimes, matrix dimensions depend on the number of others parameters (for example, correlation matrix).
+If a new variable is entered or if the name changes, matrix becomes invalid.
+Users have to redisplay the header by pushing the refresh icon.
+
+.. image:: images/Matrice.png
+
+
+
+++ /dev/null
-Add a command
-=============
-
-Eficas allows you to create or edit a dataset. Remember it is always possible to save (or read) invalid datasets.
-Building dataset consists of adding new commands, entering parameter values and if necessary naming concepts.
-see : :ref:`concept-label`.
-|
-Eficas provides two different widgets : first one allows you to manage commands, second one to enter values for each command.
-You can navigate between widgets using arrows or pushbutton.
-
-.. image:: images/CommandeBouton.png
- :align: right
-
-Command widget shows up at file creation (if the new file is created empty ) or when clicking on :
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Enter commands
----------------
-
-Eficas main widget provided two distinct areas: The left side always contains the dataset explorer as a tree view. The right widget contains all commands the user is allowed to select.
-If a dataset consists of a single command, tree view area is not displayed.
-
-.. image:: images/ChoixCommande.png
- :align: center
-
-|
-
-To have command's **documentation** (if available), **simple-click** on the command.
-
-.. image:: images/Documentation1.png
- :align: center
-
-|
-
-
-To **add** the command **click twice.** The new command is added after the current command (highlighted in the tree view). In case of impossibility, a message is displayed.
-
-.. image:: images/Ordre.png
- :align: center
-
-|
-
-
-
-If the dataset must comply with building :ref:`rules-label`, a specific icon appears in the command widget.
-
-.. image:: images/Regles.png
- :align: center
-
-|
-
-
-The user also can choose the way the commands are sorted, either by alphabetical order, either by fonctionnalities.
-Last type of sorting commands is called 'by modelisation' that is to say logical order to prepare data for the code.
-
-.. image:: images/Groupes.png
- :align: center
-
-|
-
-
-The content filtering system is very simple : only commands containing the expression are shown.
-
-.. image:: images/FiltreCommande.png
- :align: center
-
-|
-
-
-
-The user can use "Find", which is a filter widget to find a concept or command position in the dataset. The pushbutton "next/suivant" shows the next matching concept/command.
-
-.. image:: images/FindConcept.png
- :align: center
-
-
+++ /dev/null
-Color chart
-===========
-
-a very simple colors chart helps the user to know if a item is valid or not :
-
-* In the Dataset tree view
-
- - green square : valid objects (Dataset, Command, Concept ...)
- - red square : unvalid objects
- - **yellow square** : valid **Concept** the user must name
- - green diamond : valid group keywords
- - red diamond : unvalid group keywords
- - green circle : valid keywords
- - red circle : unvalid keywords
-
-* In the input data form widget
- - green circle : valid keywords or unvalid objects
- - red circle : unvalid keywords or unvalid objects
-
-* In the rules part
-
- - red is for unobserved rules
- - black is for observed rules
-
+++ /dev/null
-Parameters and comments
-========================
-
-Parameters
------------
-The users can define parameters. As parameters, Eficas accepts :
-
-- Real
-- String
-- Integer
-- List
-
-A parameter's definition can use existing parameters such as :
-eps=sqrt((((W / NX) ** 2) + ((H / NY) ** 2)))
-
-right-click menus on tree items allows you to add a parameter.
-
-.. image:: images/Parametres.png
- :align: center
-
-
-Pushing on "Parametres" Pushbutton opens a dialog containing all already existing parameters. You can define as many parameters as needed
-at once.
-
-.. image:: images/Parametres1.png
- :align: center
-
-
-to use a parameter, just type its name.
-
-.. image:: images/Parametres2.png
- :align: center
-
-
-Comments
----------
-
-Comments may refer to :
-
-- user annotation. In this case, background label is white.
-- generated comment. In this case, background label is light grey.
-
-
-.. image:: images/Commentaire.png
- :align: center
-
+++ /dev/null
-# -*- coding: utf-8 -*-
-#
-# Copyright (C) 2001-2020 EDF R&D
-#
-# This file is part of SALOME EFICAS module
-#
-# 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
-#
-# Author: Jean-Philippe Argaud, jean-philippe.argaud@edf.fr, EDF R&D
-
-import sys, os, time, sphinx, logging
-
-# -- Module version information --------------------------------------------------
-
-if "module_version" not in locals():
- module_version = lambda : None
- module_version.name = "EFICAS_NOUVEAU"
- module_version.year = "%s"%(time.localtime()[0],)
- module_version.version = ""
- logging.warning('Using fallback "module_version" because none was found')
-
-# -- Project information -------------------------------------------------------
-
-project = u'%s'%module_version.name
-author = u'Pascale NOYRET'
-copyright = u'2001-%s, EDF R&D, %s'%(module_version.year,author)
-version = '%s'%module_version.version
-release = '%s'%module_version.version
-doctitle = u"%s documentation"%module_version.name
-docfull = u"Editeur de FIchier de Commandes et Analyseur Sémantique"
-
-# -- General configuration -----------------------------------------------------
-
-from distutils.version import LooseVersion #, StrictVersion
-__lv = LooseVersion(sphinx.__version__)
-if __lv < LooseVersion("1.4.0"):
- extensions = ['sphinx.ext.pngmath']
-else:
- extensions = ['sphinx.ext.imgmath']
-try:
- import sphinx_rtd_theme
- extensions += ['sphinx_rtd_theme']
- use_rtd_theme = True
- logging.debug('Using "sphinx_rtd_theme" that was found')
-except:
- use_rtd_theme = False
- logging.debug('Not using "sphinx_rtd_theme" because none was found')
-#
-source_suffix = '.rst'
-source_encoding = 'utf-8'
-master_doc = 'index'
-language = 'en'
-exclude_patterns = [
- '_build',
- 'Thumbs.db',
- '.DS_Store',
- ]
-pygments_style = None
-templates_path = ['_templates']
-
-# -- Options for HTML output ---------------------------------------------------
-
-if use_rtd_theme:
- html_theme = "sphinx_rtd_theme"
-else:
- html_theme = 'default' if __lv < LooseVersion("1.3.0") else 'classic'
-#
-html_title = doctitle
-html_static_path = ['_static']
-html_show_sourcelink = False
-html_search_language = language
-
-# -- Options for HTMLHelp output -----------------------------------------------
-
-htmlhelp_basename = module_version.name+'doc'
-
-# -- Options for LaTeX output --------------------------------------------------
-
-latex_elements = {
- 'papersize': 'a4paper',
- 'pointsize': '10pt',
- 'figure_align': 'htbp',
-}
-latex_documents = [
- ('index', '%s.tex'%module_version.name, doctitle,
- author, 'manual'),
-]
-
-# -- Options for manual page output --------------------------------------------
-
-man_pages = [
- (master_doc, '%s'%module_version.name, doctitle,
- [author], 1)
-]
-
-# -- Options for Texinfo output ------------------------------------------------
-
-texinfo_documents = [
- (master_doc, '%s'%module_version.name, doctitle,
- author, '%s'%module_version.name, docfull,
- 'Miscellaneous'),
-]
-
-# -- Options for Epub output ---------------------------------------------------
-
-epub_title = doctitle
-epub_author = author
-epub_publisher = author
-epub_copyright = copyright
-epub_exclude_files = ['search.html']
-
-# -- Options for PDF output ----------------------------------------------------
-
-pdf_documents = [(
- 'contents',
- u'%s'%module_version.name,
- u'%s'%module_version.name,
- author,
- dict(pdf_compressed = True),
-),]
-pdf_stylesheets = ['sphinx','kerning','a4']
-pdf_compressed = True
-pdf_inline_footnotes = True
-
-# -- Extension configuration ---------------------------------------------------
+++ /dev/null
-.. _icons-label:
-
-=======================
-Using icons in Eficas
-=======================
-
-Icons
------
-
-Icons are used because they are presumed to save time, but all actions can be accessed from menus.
-Eficas use a small set of icons. Hopefully, users are familiar with. However, all icons are labelled.
-
-
-.. image:: images/Icons.png
- :align: center
-
-
-
-
-Shortcuts
----------
-
-Eficas keybord shortcuts require the user to press a sequence of keys.
-These sequences contain 'Ctrl' for common shortcuts as "Ctrl+C", Alt for accessing action of menu, and 'Shift' for specific actions. Note that 'Shift D' allows expanding/collapsing items
-
-
-
-
+++ /dev/null
-.. _salome-label:
-
-Eficas in Salome (For Aster)
-============================
-
-Launching Eficas in Salome
----------------------------
-First activate Eficas module
-
-.. image:: images/LctDsSalome.png
- :align: center
-
-
-Use Eficas. When a file is saved, Eficas will create an associated entry in the object browser.
-It is possible to use the file in other modules (see appropriate module's documentation).
-
-.. image:: images/ArbreSalome.png
- :align: center
-
-Structural Element
--------------------
-
-Eficas is able to create "structural element" in GEOM or in SMESH in order to
-validate data.
-
-- Create your geometry
-
-.. image:: images/SalomePylone.png
- :align: center
-
-- Create your Eficas dataseat, and define for example a beam , with AFFE-CARA-ELEM.
-
-- Click on "View3D". Eficas shows you the result in GEOM and creates "beams" .
- Be aware : these "structural elements" are not "geometry elements". You can't use it.
- It's also possible to verify normals orientation.
-
-.. image:: images/SalomePyloneSE.png
- :align: center
-
-
+++ /dev/null
-.. _concept-label:
-
-Eficas Concepts
-================
-
-Commands in the Data Set (or JDC Jeu De Commandes )
----------------------------------------------------
-
-A dataset is made of a collection of commands. Each command have parameters (keywords). They can return concept or not:
-
-* Command not returning concept : they are described as "PROC" in catalogs.
-
- - example:
- - DEBUT() is a proc.
- - for ASTER, it initializes memory and files.
-
-* Command returning a concept :
- The concept has a specific type (defined in the catalog) and a name (given by the user). These commandes are described as "OPER" in catalogs.
-
- - example :
- - MONMAIL=LIRE_MAILLAGE(UNITE=20);
- - This line creates a new concept MONMAIL of type "maillage", which can be re-used as entry for another keyword.
-
- When an object is valid, the user has to named it. In tree view, a yellow square shows valid objects that have to be nammed.
-
-Commands are composed of keywords, or groups of keywords. These items are associated according to rules or conditions.
-They are described in the catalog.
-
-
-Keywords
----------
-
-* Group of keywords (mot-clef facteur )
-
- This is a list of keywords which jointly have a meaning for the code.
- It is composed of group of keywords and simple keywords.
- Some are mandatory, repeatable.
- This list can depend on conditionnal rules.
-
-
-* Simple keyword (mot-clef simple) .
-
- This is a parameter. It also can be mandatory or not.
- It has attributes.
-
-
-Attributes of a keyword
----------------------------
-
-a parameter (simple keyword or "mot-clef simple") has :
-
-- a type : real, string, complex, integer, matrix, file (existing or allready existing), directory or a concept class which is defined in the catalog.
-- a cardinality.
-
-a parameter (simple keyword or "mot-clef simple") should have :
-
-- a default value
-- a short documentation
-- a long documentation
-- an interval of values
-- a set of discrete values
-
-
-Input data panel depends on both these attributes. Eficas ensures that data are valid. It forces the user to enter a list if needed, it verifies the input type. It displays only possible values.
-
-
-
+++ /dev/null
-What's Eficas
-==============
-
-Name's origin
--------------
-Eficas is the acronym of ' **E**\ diteur de **FI**\ chier de **C**\ ommandes et **A**\ nalyseur **S**\ émantique'.
-That means that Eficas allows users to write a parameter file for a code.
-It handles with syntax and semantic.
-It avoids misuse of commands which are not allowed in a given context.
-It insures integrity of the file.
-
-General Behaviour
-------------------
-* Catalogs
-
-Eficas can be used by multiple codes and handles with multiple versions of each code. It is customized with files named "Catalogs (or Catalogues)" : It contains all commands for a code. Each command has a name and parameters which are defined by developpers.
-
-
-* Outputs
-
-Eficas's output is a commands file (dataset file or Jeux De Données) ".comm". It may be able to produce various file formats such as .xml, .py or specific format. However, you always must have a '.comm" output: this is the only format Eficas is able to reread.
-
-Both commands Files and Catalogs are python file. So you have to remind some
-:ref:`python-label`
-
-
+++ /dev/null
-.. _rules-label:
-
-===============================
-Eficas rules
-===============================
-
-All the rules can be combinated, creating more complicated rules.
-
-AU_MOINS_UN
------------
-
- AU_MOINS_UN rule obliges the user to create at least one concept of the list. More than one can be created.
-
-- Example
-
- Keyword POUTRE in OPER AFFE_CARA_ELEM contains the rule :
-
- regles=(AU_MOINS_UN(
- 'POUTRE','COQUE','DISCRET','CABLE','BARRE','MASSIF','ASSE_GRIL','GRILLE'),)
-
-- That means if AFFE_CARA_ELEM is used in the JDC, the user must select one at least of the Keyword between POUTRE, COQUE, DISCRET, CABLE, BARRE, MASSIF, ASSE_GRIL, GRILLE :
-
- * If the user doesn't select any of these keywords, AFFE_CARA_ELEM is unvalid.
- * If he selects POUTRE, AFFE_CARA_ELEM is valid.
- * If he selects both POUTRE and DISCRET, AFFE_CARA_ELEM is valid.
-
-
-UN_PARMI
---------
-
- AU_MOINS_UN rule obliges the user to create one and only one concept of the list.
-
-- Example
-
- Oper AFFE_CHAR_MECA contains the rules :
-
- regles=(UN_PARMI('VECT_Y','ANGL_VRIL'),
-
-- That means if AFFE_CHAR_MECA is used in the JDC, the user must select VECT_Y or ANGL_VRIL.
-
- * If the user doesn't select any of these keywords, DEFI_GROUP is unvalid.
- * If he selects only VECT_Y, DEFI_GROUP is valid.
- * Eficas will not proposed the keyword ANGL_VRIL if VECT_Y already exists.
-
-
-EXCLUS
---------
-
- EXCLUS means that, if one of the keyword is created, the other won't be allowed.
-
- - Example :
- DEFI_SQUELETTE contains the rules :
-
- EXCLUS('SOUS_STRUC','SECTEUR')
-
-- That means if DEFI_SQUELETTE is used in the JDC
-
- * If the user doesn't select any of these keywords, DEFI_SQUELETTE is valid.
- * If he selects only SOUS_STRUC, DEFI_SQUELETTE is valid.
- * If he selects only SECTEUR, DEFI_SQUELETTE is valid.
- * Eficas will not proposed the keyword SECTEUR if SOUS_STRUC already exists.
-
-ENSEMBLE
---------
-
- the rule means that if one keyword is selected, the others have to be also.
- the keywords order is not meaningful.
-
-- Example
-
- GRILLE in AFFE_CARA_ELEM, contains :
-
- ENSEMBLE('ORIG_AXE','AXE')
-
-- That means if GRILLE is used in the JDC
-
- * If the user doesn't select any of these keywords, GRILLE is valid.
- * If he selects only ORIG_AXE, GRILLE is invalid.
- * If he selects both ORIG_AXE and AXE, GRILLE is valid.
-
-PRESENT_PRESENT
----------------
-
- the rule means that if the FIRST keyword is selected, the others have to be also.
-
-- Example
-
- MACRO_MISS_3D contains the rule
-
- PRESENT_PRESENT('FREQ_MIN','FREQ_MAX','FREQ_PAS')
-
-- That means if MACRO_MISS_3D is used in the JDC
-
- * If the user doesn't select any of these keywords, GRILLE is valid.
- * If he selects only FREQ_MAX, GRILLE is valid.
- * If he selects only FREQ_PAS, GRILLE is valid.
- * If he selects only FREQ_MIN, GRILLE is invalid.
- * If he selects both FREQ_MIN, FREQ_MAX and FREQ_PAS, GRILLE is valid.
-
-
-PRESENT_ABSENT
----------------
-
- the rule means that if the FIRST keyword is selected, the others aren't allowed.
-
-- Example
- FORCE_COQUE in AFFE_CHAR_MECA contains
-
- regles=( PRESENT_ABSENT('FX','PRES','F1','F2','F3','MF1','MF2'),
-
-- That means if FORCE_COQUE is used in the JDC
-
- * If the user doesn't select any of these keywords, FORCE_COQUE is valid.
- * If he selects only FX, FORCE_COQUE is valid.
- * If he selects both PRES and F1, FORCE_COQUE is valid.
-
-
-
-
+++ /dev/null
-.. EFICAS documentation master file, created by sphinx-quickstart on Wed Sep 14 11:40:32 2011.
- You can adapt this file completely to your liking, but it should at least
- contain the root `toctree` directive.
-
-Welcome to EFICAS's documentation!
-==================================
-
-This documentation covers the usage of Eficas as data setting tool.
-This is intended for end users who want to use Eficas and not for developpers who want to write a catalog.
-
-The usage of Eficas for a particular code is not described in this guide. Refer to
-code documentation to know how to use Eficas more specifically.
-
-Contents:
-
-.. toctree::
- :maxdepth: 1
-
- eficas_presentation
- lancer_eficas
- nouveau_JDC
- ajouter_une_commande
- parametrer_une_commande
- color_chart
- commentaires_parametres
- eficas_icons
- widgetInDetails
- eficas_notions
- eficas_rules
- python_rules
- eficas_in_salome
-
-
-
-
+++ /dev/null
-Running Eficas
-==============
-
-In Eficas, many common commands can be invoked via menus, toolbar buttons as well as keyboard shortcuts.
-As in many GUI, a menu widget can be either a pull-down menu or a standalone context menu. Pull-down menus are shown by the menu bar when the user clicks on the respective item or presses the specified shortcut key. Context menus are usually invoked by some special keyboard key or by right-clicking.
-Eficas allows you to write (and reread) an unvalid file. At any time, you can save your works.
-
-
-- Eficas is mainly available in Salome, and often from code's modules (for example for Aster or Adao). Otherwise, see how to launch : :ref:`salome-label`.
-- To run Eficas standalone, use command line : python Code/qtEficas_Code.
-- On Windows, use .bat to run Eficas.
-
-*If Eficas is installed on your machine only for one specific code and one specific version of this code, skeep the two next steps.*
-
-
-
-Choose a Code ...
-------------------
-
-Unless you have started Eficas for a specific code, Eficas will ask you to choose the code you want to work with,
-each time you click on "Nouveau/New" or "Ouvrir/Open" in the "Fichier/File" menu.
-
-.. image:: images/ChoixCode.png
- :align: center
-
-and a version of the Code
-----------------------------
-
-if many catalogs (ie many versions ) are available, Eficas will ask you to select one.
-
-.. image:: images/ChoixCata.png
- :align: center
-
+++ /dev/null
-First step
-===========
-
-Build a new dataset.
----------------------
-Launch Eficas and choose "Nouveau/New" in "File" menu.
-
-.. image:: images/Nouveau.png
- :align: center
-
-For some codes (Telemac or PSEN), simulation dataset are pre-filled with mandatory keywords. Users complete the dataset with values
-and add new commands if needed. In this case, the window that allows to :ref:`form-label` appears.
-
-
-Open an existing dataset.
----------------------------
-Launch Eficas and choose "Open/Ouvrir" in "File" menu. It shows up a file Open/Save dialog window.
-
-.. image:: images/Ouvrir.png
- :align: center
-
-Open a "Recently Used" dataset.
---------------------------------
-To open a document that you recently used, click "File" , point to "Recently Opened", and then click the item that you want to open.
-
-.. image:: images/Recents.png
- :align: center
-
-To clear the contents of the list, click 'Delete' item.
-
-
-Data/Jdc Menu.
-----------------
-
-.. image:: images/DataMenu.png
- :align: center
-
-- Why is dataset unvalid?
- Click on Validation Report item.
-
-- "Rules for dataset" displays the rules you have to respect when building a dataset
-
-
-- "Source File" item allows to check the source file.
-
-- "Result File" item allows to check the .comm result.
- It allows you to save the dataset in a file (for Adao Study for example)
-
-- "Comment" item add a comment at the beginning of the dataset.
-
-- "Parameters" allows you to manage parameters for the dataset.
-
-Open Multiple dataset.
-----------------------
-
-You can open multiple datasets. Each file is associated with a different page and is shown by clicking on its tab.
-
-.. image:: images/Multi.png
- :align: center
-
-
-Open twice the same dataset.
-----------------------------
-You can open twice the same dataset (in order to create a copy and rename it). Eficas warns you :
-
-.. image:: images/Duplication.png
- :align: center
-
-In case of duplication, Eficas does not assure coherency between the two copies.
-
-
-The dataset is valid.
----------------------
-Once the dataset is valid, you can lauch your code (in particulary PSEN, Carmel). Use 'run' icon
-or choose "Run" in the menubar.
-
-.. image:: images/Run.png
- :align: center
-
+++ /dev/null
-.. _form-label:
-
-===============
-Edit a command
-===============
-
-Each command has to be setted up. Eficas generates a data entry form.
-This form varies dynamicaly, depending on the context : rules and already existing values.
-
-This widget appears by selecting (clicking) on a command (first level in the tree view).
-
-.. image:: images/DoubleFleche.png
- :align: right
-
-You can navigate from command to command using the arrows buttons:
-
-
-The command widget
---------------------
-
-this widget is divided vertically into three separate areas :
- - the tree view,
- - the form widget
- - the optional keywords.
-
-When needed, views provide scrollbar so that the entire information can be viewed.
-
-A bottom widget provides a horizontal bar for presenting documentation as the status bar is used to display error or warning messages.
-
-.. image:: images/Main.png
- :align: center
-
-|
-|
-
-Edit values
--------------
-
-Eficas uses many different widgets in order to help you to choose values :
-
-- Line editors for simple values
-- Entry lists widgets
-- Popup lists
-- Group boxes of button
-
-see :ref:`features-label` to know more about each widget.
-
-
-.. image:: images/Erreur.png
- :align: center
-Eficas does not let you enter invalid values. It checks the type and the cardinality of the value.
-It ensures that the value is in the value domain or proposes a set of discrete values.
-Data entered is checked against a set of rules. Errors are displayed in red to draw attention.
-
-
-Form construction is dynamic
-----------------------------
-
-The form is updated according to values. It asks for the field depending on what's selected.
-
-In the example below:
-
-- if value of 'Initial_Conditions' is 'Zero Elevation', no additional data is needed
-
-.. image:: images/Zero.png
- :align: center
-
-- if value of 'Initial_Conditions' is 'TPXO satellite altimetry', you have to fill 'Ascii_Database_For_Tide'
-
-.. image:: images/TPXO.png
- :align: center
-
-Displaying optional keyword
-------------------------------
-
-When you create a new command, the widget opens with the optional keywords of this command.
-
-.. image:: images/OptionnelCommande.png
- :align: center
-
-When entering in a "group keyword", the optional keywords list is updated to show optional keyword for this specific "group keyword".
-
-.. image:: images/OptionnelCommande1.png
- :align: center
-
-
-By clicking on command label ("INITIALIZATION") or on keyword label ("Input_files"), the corresponding optional keywords list is displayed.
-
-Sometimes, when a user enters a value for a keyword, optional keywords are dependents on this value. Optional keywords list is updated.
-This is the case for conditionnal keywords
-
-.. image:: images/OptionnelParametersAdao.png
- :align: center
-
-
-.. image:: images/OptionnelParametersAdao1.png
- :align: center
-
-Adding/Deleting an optional keyword
-------------------------------------
-
-Optional keywords (if any) are in the right part of the "command window". Just double-click on the checkbox to add the keyword.
-The input data form is redisplayed and the list of possible optional keywords will be updated (for example, if two keywords cannot be simultaneously present).
-
-.. image:: images/DblClickOnOptional.png
- :align: center
-
-.. image:: images/Poubelle.png
- :align: right
-To delete a keyword (or a command), just click the garbage icon :
-
-|
-Naming Concepts
----------------
-
-The icon for a command may be one of three colors: green, yellow or red. These colors represent the status of the command and the color meanings is :
- - red for unvalid command,
- - green for valid command,
- - yellow for commands which have to be named.
-
-.. image:: images/NommerObjet.png
- :align: center
-
-Tooltips
---------
-
-**Use tooltips to have information.**
-
-- Tooltips on **labels** display **information about the keyword**. Double-click on the label to display this information in the comment area, at the bottom of the window. This is useful for long text. *(You also can double-click on the keyword in the tree dataset.)*
-
-.. image:: images/ToolTipOnLabel.png
- :align: center
-
-- Tooltips on **lineEdit** (one-line text editor) display **suggestion** for the input value. Suggestion are not very frequent. They are not default values, because you have to enter it explicitely.
-
-.. image:: images/ToolTipOnLineEdit.png
- :align: center
-
-- Tooltips on **Red point** display **information about the validity** for the keyword or for the group of keywords.
-By double-clicking on the "red point" a window displaying the same information appears. It should be usefull if text
-is too long to be read at one sitting.
-
-.. image:: images/ToolTipOnRed.png
- :align: center
-
-- Tooltips on **Commands Button** explain what the icon/button represents, and which action is activated by clicking.
-
-.. image:: images/ToolTipOnButton.png
- :align: center
-
-
-Context Menus
---------------
-In the dataset tree, context menus (invoked by right-clicking) allow user to :
-
-- create comments in the tree
-- create parameter
-- comment the command itself
-- delete the node
-
-.. image:: images/Menus.png
- :align: center
-
-Some commands have associated scripts. They are easy to identify because the "run" icon is present :
-
-.. image:: images/Roue.png
- :align: right
-
-
-.. image:: images/Scripts.png
- :align: center
+++ /dev/null
-.. _python-label:
-
-===============================
-rules for python syntax
-===============================
-
-Variable names and identifiers are similar to those in many other languages :
-----------------------------------------------------------------------------
-
-* They start with a letter (A_Z or a-z) or underscore "_"".
-* They are followed by letters, numbers or underscores.
-* They are case-sensitive.
-* A string is a sequence of caracters enclosed by a matching pair of single or double quotes.
-
-Eficas does not allow you to use uncorrect names :
-
-.. image:: images/NomPython.png
-
-Some identifiers are reserved words :
--------------------------------------
-
-* You can't use words of the python language as identifiers.
-* Eficas itself uses identifiers which become reserved words. For example, you can't use the following words, even if it would make some interesting names:
- - BLOC, EXCLUS, OPER, ASSD,
- - EVAL, FACT, FORM, JDC,
- - REGLE, VALIDATOR,
- - ETAPE, ENTITE
-
-Python's way for assigning values to variables:
--------------------------------------------------
-
-* Keep in mind that ".comm" are python files. The simplest form of assignement is : variable = value
-* The hash character (#) starts a comment
-* Tuples are enclosed in parentheses.
-* Lists are enclosed in bracked.
-* In tuples or lists, a ',' follows each item especially the last one.
-
-.. image:: images/ListeEtTuple.png
-
+++ /dev/null
-.. _features-label:
-
-========================
-Some Widgets Features
-========================
-
-File or Directory
------------------
-
-+-------------------------------------+--------------------------------------------------+
-| a File parameter has to be : | if catalog's description is : |
-+=====================================+==================================================+
-|an existing file | type='Fichier' |
-+-------------------------------------+--------------------------------------------------+
-|a directory | type='Repertoire' |
-+-------------------------------------+--------------------------------------------------+
-|an existing file with specific suffix| type='Fichier','JDC Files (*.comm);;All Files (*)|
-+-------------------------------------+--------------------------------------------------+
-|a non-allready existing file | type=('Fichier',"",'Sauvegarde'), |
-+-------------------------------------+--------------------------------------------------+
-|a simple string | type='FichierNoAbs' |
-+-------------------------------------+--------------------------------------------------+
-
-The following widget allows users to enter a directory (first) or a file. Magnifier icon is not avalaible when a directory is required.
-
-.. image:: images/FichiersEtRepertoires.png
-
-- to open a file explorer, click on the corresponding icon. If a file suffix is required, content of the directory is filtered before being shown in the dialog, using a semicolon-separated list of filters specified.
-
-- to view file content, click on magnifier icon. It uses xdg-open, which is a desktop-independent tool for opening files (according to suffix convention).
-
-
-List
------
-List widgets have a toolbar down, under values area.
-
-.. image:: images/ShowAllValues.png
-
-- Use the Up or Down arrows to move the selection in the list
-- Use the Plus (or Minus) icon to add (delete) a new line
-- Use the magnifier icon to see all the values in a modal widget
-
-|
-
-If lists are not ordered, it is possible to select all values by clicking the button on the right.
-
-.. image:: images/SelectAllInList.png
-
-
-
-Import data from file
------------------------
-
-Data import icon provide access to data from ASCII text files.
-Select the character that separates values in your text file and values you want to import.
-
-.. image:: images/Import.png
- :align: center
-
-
-Matrix
--------
-Sometimes, matrix dimensions depend on the number of others parameters (for example, correlation matrix).
-If a new variable is entered or if the name changes, matrix becomes invalid.
-Users have to redisplay the header by pushing the refresh icon.
-
-.. image:: images/Matrice.png
-
-
-
+++ /dev/null
-# -*- coding: utf-8 -*-
-# Copyright (C) 2007-2024 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 pour charger les parametres de configuration d'EFICAS
-"""
-import os, sys, types, re
-import traceback
-from Extensions.i18n import tr
-
-
-class configBase(object):
- # -------------------------------
- def __init__(self, appliEficas, repIni):
- # -------------------------------
-
- # Classe de base permettant de lire, afficher
- # et sauvegarder les fichiers utilisateurs
- # On a deux directories : la directory generale (Repertoire d install + Nom du code
- # Par exemple : ~/Install_Eficas/EficasV1_14/Openturns_Wrapper
- # et la directorie de l utilisateur
- # HOME/.Eficas_Openturns
- # Le fichier prefs.py va etre lu dans la directory generale
- # puis surcharge eventuellement par celui contenu dans ${PREFS_CATA_$CODE}
- # par celui de l utilisateur
- # le fichier de catalogue va etre lu dans la directory de l utilisateur s il exite
- # dans le fichier general sinon
-
- self.appliEficas = appliEficas
- self.code = appliEficas.code
- self.salome = appliEficas.salome
- if self.salome:
- self.name = "editeur_salome.ini"
- else:
- self.name = "editeur.ini"
- self.rep_mat = None
- self.repIni = repIni
-
- if self.code == None:
- self.code = ""
- self.rep_user = os.path.join(
- os.path.expanduser("~"), ".config/Eficas", self.code
- )
- # else :
- # self.rep_user = os.path.join('C:/','.config/Eficas',self.code)
-
- self.setValeursParDefaut()
-
- if self.code != "":
- self.lectureFichierIniStandard()
- self.lectureFichierIniIntegrateur()
- self.lectureFichierIniUtilisateur()
-
- if self.boutonDsMenuBar:
- self.closeAutreCommande = True
- self.closeFrameRechercheCommande = True
-
- # Particularite des schemas MAP
- if hasattr(self, "make_ssCode"):
- self.make_ssCode(self.ssCode)
-
- if not os.path.isdir(self.savedir):
- self.savedir = os.path.join(
- os.path.expanduser("~"), ".config/Eficas", self.code
- )
-
- def setValeursParDefaut(self):
- # -----------------------------
-
- # Valeurs par defaut
- if not os.path.isdir(self.rep_user):
- os.makedirs(self.rep_user)
- self.path_doc = os.path.abspath(os.path.join(self.repIni, "..", "Doc"))
- self.exec_acrobat = "acroread"
- nomDir = "Eficas_" + self.code
- self.savedir = os.path.abspath(os.path.join(os.path.expanduser("~"), nomDir))
- # if sys.platform[0:5]=="linux" :
- # self.savedir = os.path.abspath(os.path.join(os.environ['HOME'],nomDir))
- # else:
- # self.savedir = os.path.abspath('C:/')
- self.modeNouvCommande = "initial"
- self.affiche = "alpha"
- self.closeAutreCommande = False
- self.closeFrameRechercheCommande = False
- self.closeFrameRechercheCommandeSurPageDesCommandes = False
- self.closeEntete = False
- self.closeArbre = False
- self.demandeLangue = False
- self.suiteTelemac = False
- self.nombreDeBoutonParLigne = 0
- self.translatorFichier = None
- self.dicoImages = {}
- self.dicoIcones = {}
- self.afficheCommandesPliees = True
- self.afficheFirstPlies = False
- self.simpleClic = False
- self.afficheOptionnelVide = False
- self.afficheListesPliees = True
- self.boutonDsMenuBar = False
- self.ficIcones = None
- self.repIcones = None
- self.differencieSiDefaut = False
- self.typeDeCata = "Python"
- self.closeParenthese = False
- self.closeOptionnel = False
- self.afficheFactOptionnel = False
- self.enleverActionStructures = False
- self.enleverPoubellePourCommande = False
- self.enleverParametres = False
- self.enleverSupprimer = False
- self.ajoutExecution = False
- self.utilParExtensions = []
- self.rendVisiblesLesCaches = False
- self.pasDeMCOptionnels = False
-
- self.dumpXSD = False
- self.withXSD = False
- self.afficheIhm = True
-
- # self.afficheUQ=False
- self.afficheUQ = True
-
- # --------------------------------------
- def lectureFichierIniStandard(self):
- # --------------------------------------
-
- name = "prefs_" + self.appliEficas.code
- try:
- prefsCode = __import__(name)
- except:
- self.catalogues = []
- print("pas de fichier de prefs")
- return
- for k in dir(prefsCode):
- if k[0:1] != "__" and k[-1:-2] != "__":
- valeur = getattr(prefsCode, k)
- setattr(self, k, valeur)
-
- # --------------------------------------
- def lectureFichierIniIntegrateur(self):
- # --------------------------------------
- # Verifie l'existence du fichier "standard"
- # appelle la lecture de ce fichier
- clef = "PREFS_CATA_" + self.code
- try:
- repIntegrateur = os.path.abspath(os.environ[clef])
- except:
- return
-
- fic_ini_integrateur = os.path.join(repIntegrateur, self.name)
- if not os.path.isfile(fic_ini_integrateur):
- return
- with open(fic_ini_integrateur) as fd:
- txt = fd.read()
- d = locals()
- try:
- exec(txt, d)
- except:
- try:
- from PyQt5.QtWidgets import QMessageBox
-
- QMessageBox.critical(
- None,
- tr("Import du fichier de Configuration"),
- tr(
- "Erreur a la lecture du fichier de configuration %s ",
- str(fic_ini_integrateur),
- ),
- )
- except:
- print(
- "Erreur a la lecture du fichier de configuration %s ",
- str(fic_ini_integrateur),
- )
- return
- self.labels_eficas.append("rep_aide")
- for k in self.labels_eficas:
- try:
- setattr(self, k, d[k])
- except:
- pass
- # Glut pour les repertoires materiaux
- # et pour la doc
- for k in d:
- if (k[0:8] == "rep_mat_") or (k[0:8] == "rep_doc_"):
- setattr(self, k, d[k])
-
- # --------------------------------------
- def lectureFichierIniUtilisateur(self):
- # --------------------------------------
- # Surcharge les parametres standards par les parametres utilisateur s'ils existent
- self.fic_ini_utilisateur = os.path.join(self.rep_user, self.name)
- if not os.path.isfile(self.fic_ini_utilisateur):
- return
- with open(fic_ini_utilisateur) as fd:
- txt = fd.read()
- d = locals()
- try:
- exec(txt, d)
- except:
- l = traceback.format_exception(
- sys.exc_info()[0], sys.exc_info()[1], sys.exc_info()[2]
- )
- try:
- from PyQt5.QtWidgets import QMessageBox
-
- QMessageBox.critical(
- None,
- tr("Import du fichier de Configuration"),
- tr(
- "Erreur a la lecture du fichier de configuration %s ",
- str(fic_ini_integrateur),
- ),
- )
- except:
- print(
- "Erreur a la lecture du fichier de configuration %s ",
- str(fic_ini_integrateur),
- )
- for k in self.labels_user:
- try:
- setattr(self, k, d[k])
- except:
- pass
- for k in d:
- if (k[0:8] == "rep_mat_") or (k[0:8] == "rep_doc_"):
- setattr(self, k, d[k])
-
- # --------------------------------------
- def saveParams(self):
- # --------------------------------------
- # sauvegarde
- # les nouveaux parametres dans le fichier de configuration utilisateur
- #
- texte = ""
- for clef in self.labels_user:
- if hasattr(self, clef):
- valeur = getattr(self, clef)
- texte = texte + clef + " = " + repr(valeur) + "\n"
- # Glut pour les repertoires materiaux
- # et pour la doc
- for k in dir(self):
- if (k[0:8] == "rep_mat_") or (k[0:8] == "rep_doc_"):
- valeur = getattr(self, k)
- texte = texte + k + " = " + repr(valeur) + "\n"
-
- f = open(self.fic_ini_utilisateur, "w+")
- f.write(texte)
- f.close()
-
-
-#
-
-
-def makeConfig(appliEficas, rep):
- return configBase(appliEficas, rep)
# ---------------------------------------------
# -----------------------------------------------------------------------#
- def _viewText(self, txt, caption="FILE_VIEWER", largeur=1200, hauteur=600):
+ def _viewText(self, txt, caption="File_viewer", largeur=1200, hauteur=600):
# --------------------------------------------------------------------#
w = ViewText(self.QWParent, self, caption, txt, largeur, hauteur)
w.show()
fichier = QFileDialog.getOpenFileName(
self.appliEficas,
tr("Ouvrir Fichier"),
- self.appliEficas.maConfiguration.savedir,
+ self.appliEficas.maConfiguration.saveDir,
tr("Wrapper Files (*.xml);;" "All Files (*)"),
)
return fichier
extensions = extensions + ";; Run (*.input);;"
fn = QFileDialog.getSaveFileName(
- self,
- tr("sauvegarde"),
- path,
- extensions,
- None,
+ self, tr("sauvegarde"),
+ path, extensions, None,
QFileDialog.DontConfirmOverwrite,
)
if fn == None:
tr("Choix du composant obligatoire"),
)
return
- if hasattr(self.maConfiguration, "savedir"):
- path = self.maConfiguration.savedir
- else:
- path = "C:/"
+ path = self.maConfiguration.saveDir
monNomFichier = ""
if self.fichier is not None and self.fichier != "":
]()
if self.fichierComplet is None or saveas:
if path is None:
- path = self.maConfiguration.savedir
+ path = self.maConfiguration.saveDir
bOK, fn = self.determineNomFichier(path, extension)
if bOK == 0:
return (0, None)
return (0, None)
ulfile = os.path.abspath(fn)
- self.appliEficas.maConfiguration.savedir = os.path.split(ulfile)[0]
+ self.appliEficas.maConfiguration.saveDir = os.path.split(ulfile)[0]
fn = QDir.toNativeSeparators(fn)
self.fichierComplet = os.path.splitext(fn)[0] + extension
fn = self.fichier
if self.fichier is None or saveas:
if path is None:
- path = self.maConfiguration.savedir
+ path = self.maConfiguration.saveDir
bOK, fn = self.determineNomFichier(path, extension)
if bOK == 0:
return (0, None)
return (0, None)
ulfile = os.path.abspath(fn)
- self.appliEficas.maConfiguration.savedir = os.path.split(ulfile)[0]
+ self.appliEficas.maConfiguration.saveDir = os.path.split(ulfile)[0]
fn = QDir.toNativeSeparators(fn)
newName = fn
return
if self.fichier is None:
if path is None:
- path = self.maConfiguration.savedir
+ path = self.maConfiguration.saveDir
bOK, fn = self.determineNomFichier(path, "comm")
if bOK == 0:
return (0, None)
if fn == "":
return (0, None)
ulfile = os.path.abspath(fn)
- self.appliEficas.maConfiguration.savedir = os.path.split(ulfile)[0]
+ self.appliEficas.maConfiguration.saveDir = os.path.split(ulfile)[0]
fn = QDir.toNativeSeparators(fn)
self.fichier = fn
else:
# ------------------------------------------------#
if self.fichier is None:
if path is None:
- path = self.maConfiguration.savedir
+ path = self.maConfiguration.saveDir
bOK, fn = self.determineNomFichier(path, "comm")
if bOK == 0:
return (0, None)
if fn == "":
return (0, None)
ulfile = os.path.abspath(fn)
- self.appliEficas.maConfiguration.savedir = os.path.split(ulfile)[0]
+ self.appliEficas.maConfiguration.saveDir = os.path.split(ulfile)[0]
print(fn)
fn = QDir.toNativeSeparators(fn)
self.fichier = fn
QMessageBox.information(self, titre, texte)
fn = QFileDialog.getOpenFileName(
- self.appliEficas, titre, self.appliEficas.maConfiguration.savedir
+ self.appliEficas, titre, self.appliEficas.maConfiguration.saveDir
)
# ce retour est impose par le getFile d'I_JDC
fn = fn[0]
ulfile = os.path.abspath(fn)
- self.appliEficas.maConfiguration.savedir = os.path.split(ulfile)[0]
+ self.appliEficas.maConfiguration.saveDir = os.path.split(ulfile)[0]
# On utilise le convertisseur defini par formatFichierIn
source = self.getSource(ulfile)
pass
return indexNoeud
- # -------------------# Pour execution avec output et error dans le bash
- def runPSEN(self):
- # -------------------#
-
- # if self.modified or self.fichier==None : self.saveFile()
- self.saveFile()
-
- # lancement avec le .bat
- path1 = os.path.abspath(
- os.path.join(os.path.abspath(__file__), "../", "../", "PSEN_Eficas", "PSEN")
- )
- WrapperFilePath = os.path.join(path1, "PSSEWrapper.py")
- import subprocess
-
- p = subprocess.Popen(["python", WrapperFilePath])
- (out, err) = p.communicate()
- print(out)
- print(err)
-
- # -------------------# Pour execution avec output et error dans le bash
- def runPSEN_N1(self):
- # -------------------#
-
- self.saveFile()
- path1 = os.path.abspath(
- os.path.join(
- os.path.abspath(__file__),
- "../",
- "../",
- "ProcessOutputs_Eficas",
- "TreatOutputs",
- )
- )
- sys.path.append(path1)
-
- if not (self.jdc.isValid()):
- QMessageBox.information(
- self, tr("Unvalid JDC"), tr("incorrect keywords will be ignored")
- )
- if "dicoImbrique" in generator.plugins:
- self.generator = generator.plugins["dicoImbrique"]()
- jdc_formate = self.generator.gener(self.jdc)
- dico = self.generator.Dico
-
- ###to delete
- # fileDico = r'C:\Logiciels DER\PSEN_V16\Code\ProcessOutputs_Eficas\TreatOutputs\dicoN1.py'
- fileDico = os.path.join(
- path1, "dicoN1.py"
- ) # r'C:\Logiciels DER\PSEN_V16\Code\ProcessOutputs_Eficas\TreatOutputs\dicoN1.py'
- f = open(str(fileDico), "w")
- f.write("Dico =" + str(dico))
- f.close()
- ###
-
- print("in runPSEN_N1", dico)
- print(dico)
- from InterfaceGUI.QT5.un import run
-
- run(dico)
- # res,txt_exception=run(dico)
- # if res : QMessageBox.information( self, tr("fin de script run"), txt_exception)
- # else : QMessageBox.critical( self, tr("Erreur fatale script run"), txt_exception)
-
- # -------------------# Pour execution avec output et error dans le bash
- def process_N1(self):
- # -------------------#
-
- path1 = os.path.abspath(
- os.path.join(
- os.path.abspath(__file__),
- "../",
- "../",
- "ProcessOutputs_Eficas",
- "TreatOutputs",
- )
- )
- sys.path.append(path1)
-
- if "dicoImbrique" in generator.plugins:
- self.generator = generator.plugins["dicoImbrique"]()
- jdc_formate = self.generator.gener(self.jdc)
- dico = self.getDico() # generator.Dico
-
- for k in dico["CONTINGENCY_PROCESSING"]:
- # print (k)
- if (
- k[0:19] == "Component_List_For_"
- or k[0:21] == "Contingency_List_For_"
- ):
- newK = k.replace("__", " ")
- l = "'" + str(newK) + "'"
- dico["CONTINGENCY_PROCESSING"][l] = dico["CONTINGENCY_PROCESSING"][
- k
- ]
- del dico["CONTINGENCY_PROCESSING"][k]
-
- ###to delete
- fileDico = os.path.join(path1, "dicoN1_process.py")
- f = open(str(fileDico), "w")
- f.write("Dico =" + str(dico))
- f.close()
- ###
- return dico
-
- # return self.getDico()
-
- # -------------------# Pour execution avec output et error dans le bash
- def process_VP(self):
- # -------------------#
- if "dicoImbrique" in generator.plugins:
- self.generator = generator.plugins["dicoImbrique"]()
- jdc_formate = self.generator.gener(self.jdc)
- dico = self.getDico() # generator.Dico
- return dico
-
if __name__ == "__main__":
print("in main")
fichier = QFileDialog.getSaveFileName(
self.appliEficas,
tr("Use File"),
- self.appliEficas.maConfiguration.savedir,
+ self.appliEficas.maConfiguration.saveDir,
filters,
)
else:
fichier = QFileDialog.getOpenFileName(
self.appliEficas,
tr("Ouvrir Fichier"),
- self.appliEficas.maConfiguration.savedir,
+ self.appliEficas.maConfiguration.saveDir,
filters,
)
fichier = fichier[0]
if not (fichier == ""):
ulfile = os.path.abspath(fichier)
- self.appliEficas.maConfiguration.savedir = os.path.split(ulfile)[0]
+ self.appliEficas.maConfiguration.saveDir = os.path.split(ulfile)[0]
self.lineEditVal.setText(fichier)
self.editor.afficheCommentaire(tr("Fichier selectionne"))
self.LEvaleurPressed()
def BRepertoirePressed(self):
directory = QFileDialog.getExistingDirectory(
self.appliEficas,
- directory=self.appliEficas.maConfiguration.savedir,
+ directory=self.appliEficas.maConfiguration.saveDir,
options=QFileDialog.ShowDirsOnly,
)
if not (directory == ""):
absdir = os.path.abspath(directory)
- self.appliEficas.maConfiguration.savedir = os.path.dirname(absdir)
+ self.appliEficas.maConfiguration.saveDir = os.path.dirname(absdir)
self.lineEditVal.setText(directory)
self.LEvaleurPressed()
f.show()
def selectInFile(self):
- init = str(self.editor.maConfiguration.savedir)
+ init = str(self.editor.maConfiguration.saveDir)
fn = QFileDialog.getOpenFileName(
self.node.appliEficas,
tr("Fichier de donnees"),
if fn == "":
return
ulfile = os.path.abspath(fn)
- self.editor.maConfiguration.savedir = os.path.split(ulfile)[0]
+ self.editor.maConfiguration.saveDir = os.path.split(ulfile)[0]
from InterfaceGUI.QT5.monSelectVal import MonSelectVal
+++ /dev/null
-# -*- coding: utf-8 -*-
-# Copyright (C) 2007-2024 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
-#
-# Modules Python
-
-import types, os
-import traceback
-
-from PyQt5.QtWidgets import QLineEdit, QLabel, QFileDialog, QWidget
-from PyQt5.QtCore import QEvent, Qt, QTimer
-from PyQt5.QtGui import QIcon, QPalette
-
-from Extensions.i18n import tr
-from InterfaceGUI.QT5.monViewTexte import ViewText
-
-
-# ---------------------- #
-class LECustom(QLineEdit):
- # ---------------------- #
- def __init__(self, parent, parentQt, i):
- """
- Constructor
- """
- QLineEdit.__init__(self, parent)
-
- self.valeur = None
- self.aEuLeFocus = False
- self.parentQt = parentQt
- self.parent = parent
- self.num = i
- self.dansUnTuple = False
- self.numDsLaListe = -1
- self.returnPressed.connect(self.litValeur)
-
- def focusInEvent(self, event):
- # print ("dans focusInEvent de LECustom",self.parentQt)
- print("dans focusInEvent de LECustom", self.num, self.numDsLaListe)
- self.parentQt.aEuLeFocus = True
- self.aEuLeFocus = True
- self.parentQt.LineEditEnCours = self
- self.parentQt.numLineEditEnCours = self.num
- self.parentQt.textSelected = self.text()
- self.setStyleSheet("border: 2px solid gray")
- QLineEdit.focusInEvent(self, event)
-
- def focusOutEvent(self, event):
- # print ("dans focusOutEvent de LECustom",self.num,self.numDsLaListe, self.aEuLeFocus)
- self.setStyleSheet("border: 0px")
- if self.dansUnTuple:
- self.setStyleSheet("background:rgb(235,235,235); border: 0px;")
- elif self.num % 2 == 1:
- self.setStyleSheet("background:rgb(210,210,210)")
- else:
- self.setStyleSheet("background:rgb(235,235,235)")
-
- if self.aEuLeFocus:
- self.aEuLeFocus = False
- self.litValeur()
- QLineEdit.focusOutEvent(self, event)
-
- def litValeur(self):
- self.aEuLeFocus = False
- val = str(self.text())
- if str(val) == "" or val == None:
- self.valeur = None
- return
- try:
- valeur = eval(val, {})
- except:
- try:
- d = self.parentQt.parentQt.objSimp.jdc.getContexteAvant(
- self.parentQt.objSimp.etape
- )
- valeur = eval(val, d)
- except:
- valeur = val
-
- self.valeur = valeur
-
- def clean(self):
- self.setText("")
-
- def getValeur(self):
- return self.text()
-
- def setValeur(self, valeur):
- self.setText(valeur)
- self.valeur = valeur
-
- # def leaveEvent(self,event):
- # ne sert a rien. quand on modifie la valeur on prend le focus
-
-
-# --------------------------- #
-class LECustomTuple(LECustom):
- # --------------------------- #
- def __init__(self, parent):
- # index sera mis a jour par TupleCustom
- parentQt = parent.parent().parent().parent()
- LECustom.__init__(self, parent, parentQt, 0)
- # print (dir(self))
-
-
-# ---------------------------- #
-class MonLabelListeClic(QLabel):
- # ---------------------------- #
- def __init__(self, parent):
- QLabel.__init__(self, parent)
- self.parent = parent
-
- def event(self, event):
- if event.type() == QEvent.MouseButtonRelease:
- self.texte = self.text()
- self.parent.traiteClicSurLabelListe(self.texte)
- return QLabel.event(self, event)
-
-
-# ------------- #
-class GereListe(object):
- # ------------- #
-
- def __init__(self):
- self.aEuLeFocus = False
- self.connecterSignaux()
-
- def leaveEvent(self, event):
- if self.aEuLeFocus:
- print("appel de changeValeur")
- self.changeValeur()
- self.aEuLeFocus = False
- QWidget.leaveEvent(self, event)
-
- def connecterSignaux(self):
- if hasattr(self, "RBHaut"):
- self.RBHaut.clicked.connect(self.hautPushed)
- self.RBBas.clicked.connect(self.basPushed)
- self.RBMoins.clicked.connect(self.moinsPushed)
- self.RBPlus.clicked.connect(self.plusPushed)
- self.RBVoisListe.clicked.connect(self.voisListePushed)
- if hasattr(self, "PBAlpha"):
- self.PBCata.clicked.connect(self.cataPushed)
- self.PBAlpha.clicked.connect(self.alphaPushed)
- self.PBFind.clicked.connect(self.findPushed)
- self.LEFiltre.returnPressed.connect(self.LEFiltreReturnPressed)
-
- def filtreListe(self):
- l = []
- if self.filtre != "":
- for i in self.listeAAfficher:
- if i.find(self.filtre) == 0:
- l.append(i)
- self.listeAAfficher = l
- if self.alpha:
- self.listeAAfficher.sort()
-
- def LEFiltreReturnPressed(self):
- self.filtre = self.LEFiltre.text()
- self.prepareListeResultatFiltre()
-
- def findPushed(self):
- self.filtre = self.LEFiltre.text()
- self.prepareListeResultatFiltre()
-
- def alphaPushed(self):
- # print "alphaPushed" ,self.alpha
- if self.alpha == 1:
- return
- self.alpha = 1
- self.prepareListeResultat()
-
- def cataPushed(self):
- if self.alpha == 0:
- return
- self.alpha = 0
- self.prepareListeResultat()
-
- def hautPushed(self):
- if self.numLineEditEnCours == 1:
- return
- else:
- numEchange = self.numLineEditEnCours - 1
- self.echange(self.numLineEditEnCours, numEchange)
- self.LineEditEnCours.setFocus(True)
- self.scrollArea.ensureWidgetVisible(self.LineEditEnCours)
-
- def basPushed(self):
- if self.numLineEditEnCours == self.indexDernierLabel:
- return
- else:
- numEchange = self.numLineEditEnCours + 1
- self.echange(self.numLineEditEnCours, numEchange)
- self.LineEditEnCours.setFocus(True)
- self.scrollArea.ensureWidgetVisible(self.LineEditEnCours)
-
- def echange(self, num1, num2):
- # on donne le focus au a celui ou on a bouge
- # par convention le 2
- nomLineEdit = self.nomLine + str(num1)
- # print nomLineEdit
- courant = getattr(self, nomLineEdit)
- valeurAGarder = courant.text()
- nomLineEdit2 = self.nomLine + str(num2)
- # print nomLineEdit2
- courant2 = getattr(self, nomLineEdit2)
- courant.setText(courant2.text())
- courant2.setText(valeurAGarder)
- self.changeValeur(changeDePlace=False)
- self.numLineEditEnCours = num2
- self.LineEditEnCours = courant2
- self.LineEditEnCours.setFocus(True)
-
- def moinsPushed(self):
- # on supprime le dernier
- if self.numLineEditEnCours == 0:
- return
- if self.indexDernierLabel == 0:
- return
- if self.numLineEditEnCours == self.indexDernierLabel:
- nomLineEdit = self.nomLine + str(self.indexDernierLabel)
- courant = getattr(self, nomLineEdit)
- courant.clean()
- else:
- for i in range(self.numLineEditEnCours, self.indexDernierLabel):
- aRemonter = i + 1
- nomLineEdit = self.nomLine + str(aRemonter)
- courant = getattr(self, nomLineEdit)
- valeurARemonter = courant.getValeur()
- nomLineEdit = self.nomLine + str(i)
- courant = getattr(self, nomLineEdit)
- if valeurARemonter != None:
- courant.setValeur(valeurARemonter)
- else:
- courant.clean()
- nomLineEdit = self.nomLine + str(self.indexDernierLabel)
- courant = getattr(self, nomLineEdit)
- courant.clean()
- self.changeValeur(changeDePlace=False, oblige=True)
- self.setValide()
-
- def plusPushed(self):
- if self.indexDernierLabel == self.monSimpDef.max:
- if len(self.listeValeursCourantes) < self.monSimpDef.max:
- self.chercheLigneVide()
- else:
- self.editor.afficheInfos(
- "nb max de valeurs : " + str(self.monSimpDef.max) + " atteint",
- Qt.red,
- )
- return
- self.ajoutLineEdit()
- self.descendLesLignes()
- self.chercheLigneVide()
- QTimer.singleShot(1, self.rendVisibleLigne)
-
- def chercheLigneVide(self):
- for i in range(self.indexDernierLabel):
- nomLineEdit = self.nomLine + str(i + 1)
- courant = getattr(self, nomLineEdit)
- valeur = courant.getValeur()
- if valeur == "":
- courant.setFocus(True)
- self.estVisible = courant
- return
-
- def descendLesLignes(self):
- if self.numLineEditEnCours == self.indexDernierLabel:
- return
- nomLineEdit = self.nomLine + str(self.numLineEditEnCours + 1)
- courant = getattr(self, nomLineEdit)
- valeurADescendre = courant.getValeur()
- courant.clean()
- for i in range(self.numLineEditEnCours + 1, self.indexDernierLabel):
- aDescendre = i + 1
- nomLineEdit = self.nomLine + str(aDescendre)
- courant = getattr(self, nomLineEdit)
- valeurAGarder = courant.getValeur()
- courant.setValeur(valeurADescendre)
- valeurADescendre = valeurAGarder
- self.changeValeur(changeDePlace=False)
- if hasattr(self, "LineEditEnCours"):
- self.scrollArea.ensureWidgetVisible(self.LineEditEnCours)
-
- def voisListePushed(self):
- texteValeurs = ""
- for v in self.node.item.getListeValeurs():
- texteValeurs += str(v) + ", "
- entete = "Valeurs pour " + self.nom
- f = ViewText(self, self.editor, entete, texteValeurs[0:-2])
- f.show()
-
- def selectInFile(self):
- init = str(self.editor.maConfiguration.savedir)
- fn = QFileDialog.getOpenFileName(
- self.node.appliEficas,
- tr("Fichier de donnees"),
- init,
- tr(
- "Tous les Fichiers (*)",
- ),
- )
- fn = fn[0]
- if fn == None:
- return
- if fn == "":
- return
- import six
- ulfile = os.path.abspath(six.text_type(fn))
- self.editor.maConfiguration.savedir = os.path.split(ulfile)[0]
-
- from InterfaceGUI.QT5.monSelectVal import MonSelectVal
-
- MonSelectVal(file=fn, parent=self).show()
-
- def noircirResultatFiltre(self):
- filtre = str(self.LEFiltre.text())
- for cb in self.listeCbRouge:
- palette = QPalette(Qt.red)
- palette.setColor(QPalette.WindowText, Qt.black)
- cb.setPalette(palette)
- t = cb.text()
- cb.setText(t)
- self.LEFiltre.setText("")
- self.listeCbRouge = []
-
-
-# ----------- #
-class GerePlie(object):
- # ----------- #
-
- def gereIconePlier(self):
- if not (hasattr(self, "BFermeListe")):
- return
- self.editor.listeDesListesOuvertes.add(self.node.item)
- repIcon = self.node.editor.appliEficas.repIcon
- if not (self.editor.afficheListesPliees):
- fichier = os.path.join(repIcon, "empty.png")
- icon = QIcon(fichier)
- self.BFermeListe.setIcon(icon)
- return
- fichier = os.path.join(repIcon, "minusnode.png")
- icon = QIcon(fichier)
- self.BFermeListe.setIcon(icon)
- self.BFermeListe.clicked.connect(self.selectWidgetPlie)
-
- def selectWidgetPlie(self):
- self.editor.listeDesListesOuvertes.remove(self.node.item)
- self.reaffichePourDeplier()
from Extensions.i18n import tr
-def traduction(directPath, editor, version):
+def traduction( editor, version):
if version == "V9V10":
from Traducteur import traduitV9V10
-
suffixe = "v10.comm"
+
if version == "V10V11":
from Traducteur import traduitV10V11
-
suffixe = "v11.comm"
+
if version == "V11V12":
from Traducteur import traduitV11V12
-
suffixe = "v12.comm"
fn = QFileDialog.getOpenFileName(
editor.appliEficas,
tr("Traduire Fichier"),
- directPath,
+ editor.maConfiguration.repUser,
tr("Fichiers JDC (*.comm);;" "Tous les Fichiers (*)"),
)
# Modules Python
# Modules Eficas
-from InterfaceGUI.QT5.desChoixCata import Ui_DChoixCata
+from UiQT5.desChoixCata import Ui_DChoixCata
from PyQt5.QtWidgets import QDialog
from Extensions.i18n import tr
import os, sys, re
-from InterfaceGUI.QT5.desChoixCode import Ui_ChoixCode
+from UiQT5.desChoixCode import Ui_ChoixCode
from PyQt5.QtWidgets import QDialog, QRadioButton, QGroupBox, QButtonGroup
from PyQt5.QtGui import QPalette
from PyQt5.QtCore import QProcess, QFileInfo, Qt, QSize
import os, sys, re
-from InterfaceGUI.QT5.desChoixLangue import Ui_ChoixLangue
+from UiQT5.desChoixLangue import Ui_ChoixLangue
from PyQt5.QtWidgets import QDialog, QRadioButton, QGroupBox, QButtonGroup
from PyQt5.QtGui import QPalette
from PyQt5.QtGui import QPalette
from Extensions.i18n import tr
-from InterfaceGUI.QT5.desGroupeOptionnel import Ui_groupeOptionnel
-from InterfaceGUI.QT5.desPBOptionnelMT import Ui_customPB
+from UiQT5.desGroupeOptionnel import Ui_groupeOptionnel
+from UiQT5.desPBOptionnelMT import Ui_customPB
# Import des panels
# Modules Python
# Modules Eficas
-from InterfaceGUI.QT5.desRecherche import Ui_desRecherche
+from UiQT5.desRecherche import Ui_desRecherche
from PyQt5.QtWidgets import QDialog
from PyQt5.QtCore import Qt
# Modules Python
# Modules Eficas
-from InterfaceGUI.QT5.desRechercheCatalogue import Ui_desRechercheCatalogue
+from UiQT5.desRechercheCatalogue import Ui_desRechercheCatalogue
from PyQt5.QtWidgets import QDialog, QCompleter
from PyQt5.QtCore import Qt
# Modules Python
# Modules Eficas
-from InterfaceGUI.QT5.desSelectVal import Ui_DSelVal
+from UiQT5.desSelectVal import Ui_DSelVal
from Extensions.i18n import tr
from PyQt5.QtWidgets import QDialog, QFileDialog, QMessageBox
def saveFile(self):
# recuperation du nom du fichier
if self.editor != None:
- dir = self.editor.appliEficas.maConfiguration.savedir
+ dir = self.editor.appliEficas.maConfiguration.saveDir
else:
dir = "/tmp"
fn = QFileDialog.getSaveFileName(None, tr("Sauvegarder le fichier"), dir)
ulfile = os.path.abspath(fn)
if self.editor != None:
- self.editor.appliEficas.maConfiguration.savedir = os.path.split(ulfile)[0]
+ self.editor.appliEficas.maConfiguration.saveDir = os.path.split(ulfile)[0]
try:
f = open(fn, "w")
f.write(str(self.view.toPlainText()))
# Modules Eficas
-from InterfaceGUI.QT5.desVisu import Ui_DVisu
+from UiQT5.desVisu import Ui_DVisu
from PyQt5.QtWidgets import QDialog
# Modules Eficas
-from InterfaceGUI.QT5.desWidgetBloc import Ui_WidgetBloc
+from UiQT5.desWidgetBloc import Ui_WidgetBloc
from InterfaceGUI.QT5.groupe import Groupe
from Extensions.i18n import tr
# Modules Eficas
from Extensions.i18n import tr
-from InterfaceGUI.QT5..feuille import Feuille
+from InterfaceGUI.QT5.feuille import Feuille
from Extensions.eficas_exception import EficasException
from Extensions.i18n import tr
from UiQT5.desWidgetOptionnel import Ui_WidgetOptionnel
-from InterfaceQT5.QT5.monGroupeOptionnel import MonGroupeOptionnel
+from InterfaceGUI.QT5.monGroupeOptionnel import MonGroupeOptionnel
# Import des panels
# Modules Eficas
from Extensions.i18n import tr
-from InterfaceGUI.QT5..monWidgetPlusieursIntoOrdonne import MonWidgetPlusieursIntoOrdonne
+from InterfaceGUI.QT5.monWidgetPlusieursIntoOrdonne import MonWidgetPlusieursIntoOrdonne
from InterfaceGUI.QT5.politiquesValidation import PolitiquePlusieurs
from PyQt5.QtWidgets import QScrollBar
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+import os
from PyQt5.QtWidgets import QFrame, QApplication, QFrame, QWidget
from PyQt5.QtGui import QIcon
from PyQt5.QtCore import QSize, Qt, QTimer
chaine = ""
if valeurTexte != None:
- from InterfaceGUI.QT5.ecimal import Decimal
+ from decimal import Decimal
if isinstance(valeurTexte, Decimal):
chaine = str(valeurTexte)
from Extensions.i18n import tr
from InterfaceGUI.QT5.feuille import Feuille
-fromUiQT5.desWidgetSimpBool import Ui_WidgetSimpBool
+from UiQT5.desWidgetSimpBool import Ui_WidgetSimpBool
from InterfaceGUI.QT5.politiquesValidation import PolitiqueUnique
from InterfaceGUI.QT5.qtSaisie import SaisieValeur
print("mauvaise utilisation de la classe Appli. Utiliser AppliSsIm SVP")
exit()
- AppliSsIhm.__init__(
- self,
- code,
- salome,
- parent,
- multi=multi,
- langue=langue,
- ssIhm=True,
- labelCode=labelCode,
- )
QMainWindow.__init__(self, parent)
Ui_Eficas.__init__(self)
+ AppliSsIhm.__init__( self, code, salome, parent, multi=multi, langue=langue, ssIhm=True, labelCode=labelCode,)
self.ssIhm = False
self.multi = multi
self.demande = multi # voir PSEN
self.GUIPath = GUIPath
- if self.multi == False:
- self.definitCode(code, None)
- if self.code == None:
- return
- else:
+
+ if self.multi :
self.definitCode(code, None)
if self.code == None:
return
if self.code != None:
self.construitMenu()
- self.setWindowTitle(self.VERSION_EFICAS)
+ self.setWindowTitle(self.versionEficas)
try:
# if 1 :
# print ('attention try devient if 1')
if self.code == None:
self.cleanPath()
from InterfaceGUI.QT5.monChoixCode import MonChoixCode
-
widgetChoix = MonChoixCode(self)
ret = widgetChoix.exec_()
# widgetChoix.show()
return # pour le cancel de la fenetre choix code
AppliSsIhm.definitCode(self, self.code, ssCode)
- # PN --> pb d exception qui font planter salome
- # plus supporte en python 3
- # app=QApplication
- # if hasattr(prefsCode,'encoding'):
- # import sys
- # reload(sys)
- # sys.setdefaultencoding(prefsCode.encoding)
def construitMenu(self):
self.initPatrons()
self.actionCode.setEnabled(True)
self.menuAide.addAction(self.actionCode)
- def newN1(self):
- ssCode = None
- code = "PSEN_N1"
- self.cleanPath()
- dirCode = os.path.abspath(
- os.path.join(os.path.abspath(__file__), "../..", "ProcessOutputs_Eficas")
- )
- sys.path.insert(0, dirCode)
- self.code = code
- self.definitCode(code, ssCode)
- self.initRecents()
- self.multi = True
- self.demande = False
- self.fileNew()
-
- def newPSEN(self):
- ssCode = None
- code = "PSEN"
- self.cleanPath()
- dirCode = os.path.abspath(
- os.path.join(os.path.abspath(__file__), "../..", code)
- )
- sys.path.insert(0, dirCode)
- self.code = code
- self.definitCode(code, ssCode)
- self.multi = True
- self.demande = False
- self.fileNew()
def ajoutUQ(self):
AppliSsIhm.ajoutUQ(self)
# self.actionEnregistrer.setDisabled(True)
# self.actionEnregistrer_sous.setDisabled(True)
- def ajoutN1(self):
- return
- self.menuN1 = self.menubar.addMenu(tr("Process Output"))
- self.actionN1 = QAction(self)
- self.actionN1.setText(tr("Process Output"))
- self.menuN1.addAction(self.actionN1)
- self.actionN1.triggered.connect(self.newN1)
-
- if hasattr(self, "actionOpenProcess"):
- return
-
- self.actionOpenProcess = QAction(self)
- self.actionOpenProcess.setText(tr("Open Process_Output File"))
- self.menuN1.addAction(self.actionOpenProcess)
- self.actionOpenProcess.triggered.connect(self.openProcess)
def ajoutExecution(self):
self.menuExecution = self.menubar.addMenu(tr("&Run"))
)
self.actionSortieComplete.triggered.connect(self.handleSortieComplete)
- def MT(self):
- self.enlevernewInclude()
- self.toolBar.addSeparator()
-
- def ZCRACKS(self):
- self.enlevernewInclude()
- self.toolBar.addSeparator()
- self.ajoutExecution()
-
- self.menuOptions = self.menubar.addMenu("menuOptions")
- self.menuOptions.addAction(self.actionParametres_Eficas)
- self.menuOptions.setTitle(tr("Options"))
def ADAO(self):
self.enleverActionsStructures()
self.enlevernewInclude()
- def ASTER(self):
- self.menuTraduction = self.menubar.addMenu("menuTraduction")
- self.menuTraduction.addAction(self.actionTraduitV11V12)
- self.menuTraduction.addAction(self.actionTraduitV10V11)
- self.menuTraduction.addAction(self.actionTraduitV9V10)
- self.menuTraduction.setTitle(tr("Traduction"))
-
- self.menuFichier.addAction(self.actionSauveLigne)
-
- self.menuOptions = self.menubar.addMenu("menuOptions")
- self.menuOptions.addAction(self.actionParametres_Eficas)
- self.menuOptions.addAction(self.actionLecteur_Pdf)
- self.menuOptions.setTitle(tr("Options"))
-
- def CARMEL3D(self):
- # if self.salome == 0 : return
- self.enlevernewInclude()
- self.menuMesh = self.menubar.addMenu(tr("Gestion Maillage"))
- self.menuMesh.setObjectName("Mesh")
- self.menuMesh.addAction(self.actionChercheGrpMaille)
- # self.griserActionsStructures()
-
- def CARMELCND(self):
- self.enlevernewInclude()
- self.enleverRechercherDsCatalogue()
- self.ajoutExecution()
- self.ajoutSauveExecution()
- self.griserActionsStructures()
-
- def MAP(self):
- self.enlevernewInclude()
- self.toolBar.addSeparator()
- self.ajoutExecution()
- self.ajoutSauveExecution()
- self.menuOptions = self.menubar.addMenu("menuOptions")
- self.menuOptions.addAction(self.actionParametres_Eficas)
- self.menuOptions.setTitle(tr("Options"))
-
- def MAPIDENTIFICATION(self):
- self.enlevernewInclude()
- self.enleverSupprimer()
- # self.ajoutExecution()
- self.enleverRechercherDsCatalogue()
- self.enleverActionsStructures()
- self.enleverParametres()
-
- def PSEN(self):
- try:
- self.action_Nouveau.triggered.disconnect(self.fileNew)
- except:
- pass
- try:
- self.action_Nouveau.triggered.disconnect(self.newPSEN)
- except:
- pass
-
- self.action_Nouveau.triggered.connect(self.newPSEN)
- self.enleverActionsStructures()
- self.enleverParametres()
- self.enleverRechercherDsCatalogue()
- self.enlevernewInclude()
- self.ajoutExecution()
- self.ajoutN1()
- self.ajoutHelpPSEN()
- self.ajoutIcones()
-
- def PSEN_N1(self):
- self.enleverActionsStructures()
- self.enleverParametres()
- self.enleverRechercherDsCatalogue()
- self.enlevernewInclude()
- self.ajoutExecution()
- self.ajoutIcones()
def TELEMAC(self):
self.enleverActionsStructures()
self.enleverSupprimer()
self.enleverRechercherDsCatalogue()
- def ajoutHelpPSEN(self):
- self.actionParametres_Eficas.setText("Help PSEN")
- self.actionParametres_Eficas.triggered.connect(self.aidePSEN)
-
def ChercheGrpMesh(self):
Msg, listeGroup = self.ChercheGrpMeshInSalome()
if Msg == None:
else:
print("il faut gerer les erreurs")
- def ChercheGrp(self):
- # Msg,listeGroup=self.ChercheGrpMailleInSalome()
- # if Msg == None :
- # self.viewmanager.handleAjoutGroup(listeGroup)
- # else :
- # print "il faut gerer "
- pass
def ajoutIcones(self):
# Pour pallier les soucis de repertoire d icone
icon7 = QIcon(self.repIcon + "/roue.png")
self.actionExecution.setIcon(icon7)
- def connecterSignauxQT4(self):
- self.connect(
- self.recentMenu, SIGNAL("aboutToShow()"), self.handleShowRecentMenu
- )
-
- self.connect(self.action_Nouveau, SIGNAL("triggered()"), self.fileNew)
- self.connect(self.actionNouvel_Include, SIGNAL("triggered()"), self.newInclude)
- self.connect(self.actionOuvrir, SIGNAL("triggered()"), self.fileOpen)
- self.connect(self.actionEnregistrer, SIGNAL("triggered()"), self.fileSave)
- self.connect(
- self.actionEnregistrer_sous, SIGNAL("triggered()"), self.fileSaveAs
- )
- self.connect(self.actionFermer, SIGNAL("triggered()"), self.fileClose)
- self.connect(self.actionFermer_tout, SIGNAL("triggered()"), self.fileCloseAll)
- self.connect(self.actionQuitter, SIGNAL("triggered()"), self.fileExit)
-
- self.connect(self.actionEficas, SIGNAL("triggered()"), self.aidePPal)
- self.connect(self.actionVersion, SIGNAL("triggered()"), self.version)
- self.connect(self.actionParametres, SIGNAL("triggered()"), self.gestionParam)
-
- self.connect(self.actionCouper, SIGNAL("triggered()"), self.editCut)
- self.connect(self.actionCopier, SIGNAL("triggered()"), self.editCopy)
- self.connect(self.actionColler, SIGNAL("triggered()"), self.editPaste)
- self.connect(self.actionSupprimer, SIGNAL("triggered()"), self.supprimer)
- self.connect(self.actionRechercher, SIGNAL("triggered()"), self.rechercher)
- self.connect(
- self.actionDeplier_replier, SIGNAL("triggered()"), self.handleDeplier
- )
-
- self.connect(
- self.actionRapport_de_Validation, SIGNAL("triggered()"), self.jdcRapport
- )
- self.connect(self.actionRegles_du_JdC, SIGNAL("triggered()"), self.jdcRegles)
- self.connect(
- self.actionFichier_Source, SIGNAL("triggered()"), self.jdcFichierSource
- )
- self.connect(self.actionFichier_Resultat, SIGNAL("triggered()"), self.visuJdcPy)
-
- # Pour Aster
- self.actionTraduitV9V10 = QAction(self)
- self.actionTraduitV9V10.setObjectName("actionTraduitV9V10")
- self.actionTraduitV9V10.setText(tr("TraduitV9V10"))
- self.actionTraduitV10V11 = QAction(self)
- self.actionTraduitV10V11.setObjectName("actionTraduitV10V11")
- self.actionTraduitV10V11.setText(tr("TraduitV10V11"))
- self.actionTraduitV11V12 = QAction(self)
- self.actionTraduitV11V12.setObjectName("actionTraduitV11V12")
- self.actionTraduitV11V12.setText(tr("TraduitV11V12"))
- self.actionSauveLigne = QAction(self)
- self.actionSauveLigne.setText(tr("Sauve Format Ligne"))
-
- # self.connect(self.actionParametres_Eficas,SIGNAL("triggered()"),self.optionEditeur)
- self.connect(self.actionLecteur_Pdf, SIGNAL("triggered()"), self.optionPdf)
- self.connect(
- self.actionTraduitV9V10, SIGNAL("triggered()"), self.traductionV9V10
- )
- self.connect(
- self.actionTraduitV10V11, SIGNAL("triggered()"), self.traductionV10V11
- )
- self.connect(
- self.actionTraduitV11V12, SIGNAL("triggered()"), self.traductionV11V12
- )
- self.connect(self.actionSauveLigne, SIGNAL("triggered()"), self.sauveLigne)
-
- # Pour Carmel
- self.actionChercheGrpMaille = QAction(self)
- self.actionChercheGrpMaille.setText(tr("Acquiert groupe mailles"))
- self.connect(
- self.actionChercheGrpMaille, SIGNAL("triggered()"), self.ChercheGrpMaille
- )
-
- # Pour CarmelCND
- self.actionChercheGrp = QAction(self)
- self.actionChercheGrp.setText(tr("Acquisition Groupe Maille"))
- self.connect(self.actionChercheGrp, SIGNAL("triggered()"), self.ChercheGrp)
-
- # Pour Aide
- self.actionCode = QAction(self)
- self.actionCode.setText(tr("Specificites Maille"))
- self.connect(self.actionCode, SIGNAL("triggered()"), self.aideCode)
def connecterSignaux(self):
self.recentMenu.aboutToShow.connect(self.handleShowRecentMenu)
self.actionChercheGrpMaille = QAction(self)
self.actionChercheGrpMaille.setText(tr("Acquiert Groupe Maille"))
- # Pour CarmelCND
- self.actionChercheGrp = QAction(self)
- self.actionChercheGrp.setText(tr("Accquisition Groupe Maille"))
- self.actionChercheGrp.triggered.connect(self.ChercheGrp)
# Pour Aide
self.actionCode = QAction(self)
def sauveRecents(self):
try:
- rep = self.maConfiguration.rep_user
+ rep = self.maConfiguration.repUser
monFichier = rep + "/listefichiers_" + self.code
except:
return
def traductionV11V12(self):
from InterfaceGUI.QT5.gereTraduction import traduction
-
traduction(self.maConfiguration.repIni, self.viewmanager, "V11V12")
def traductionV10V11(self):
from InterfaceGUI.QT5.gereTraduction import traduction
-
traduction(self.maConfiguration.repIni, self.viewmanager, "V10V11")
def traductionV9V10(self):
from InterfaceGUI.QT5.gereTraduction import traduction
-
traduction(self.maConfiguration.repIni, self.viewmanager, "V9V10")
+ def afficheMessage(self, titre, texte,critical=True):
+ if critical :
+ QMessageBox.critical( None, tr(titre), tr(texte))
+ else :
+ QMessageBox.warning( None, tr(titre), tr(texte))
+
+
def version(self):
from InterfaceGUI.QT5.monVisu import DVisu
monVisuDialg = DVisu(parent=self, fl=0)
monVisuDialg.setWindowTitle(titre)
if self.code != None:
- monVisuDialg.TB.setText(self.VERSION_EFICAS + tr(" pour ") + self.code)
+ monVisuDialg.TB.setText(self.versionEficas + tr(" pour ") + self.code)
else:
- monVisuDialg.TB.setText(self.VERSION_EFICAS)
+ monVisuDialg.TB.setText(self.versionEficas)
monVisuDialg.adjustSize()
monVisuDialg.show()
if msg != "":
QMessageBox.warning(self, tr("Erreur"), msg)
- def openProcess(self):
- ssCode = None
- code = "PSEN_N1"
- self.cleanPath()
- dirCode = os.path.abspath(
- os.path.join(os.path.abspath(__file__), "../..", "ProcessOutputs_Eficas")
- )
- sys.path.insert(0, dirCode)
- self.code = code
- self.definitCode(code, ssCode)
- self.multi = True
- self.demande = False
- self.initRecents()
- self.fileOpen()
def fileOpen(self):
try:
self.viewmanager.newIncludeEditor()
def cleanPath(self):
- for pathCode in self.ListePathCode:
- try:
- aEnlever = os.path.abspath(
- os.path.join(os.path.dirname(__file__), "..", pathCode)
- )
- sys.path.remove(aEnlever)
- except:
- pass
- for pathCode in self.listeAEnlever:
+ for pathCode in self.listeAPathEnlever:
try:
sys.path.remove(aEnlever)
except:
+++ /dev/null
-# -*- coding: utf-8 -*-
-# Copyright (C) 2007-2024 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
-#
-# permet de lancer EFICAS en n affichant rien
-
-
-
-class appliEficasSSIhm(object):
- def __init__(self, code):
- self.VERSION_EFICAS = "Sans Ihm"
- self.code = code
- self.ssCode = None
- self.salome = None
- self.top = None
- self.indice = 0
- self.dict_reels = {}
- self.listeAEnlever = []
-
- name = "prefs_" + self.code
- try:
- prefsCode = __import__(name)
- except:
- name = "prefs_" + self.code.upper()
- self.code = self.code.upper()
- prefsCode = __import__(name)
-
- self.repIni = prefsCode.repIni
- self.format_fichier = "python" # par defaut
-
- nameConf = "configuration_" + self.code
- configuration = __import__(nameConf)
- self.CONFIGURATION = configuration.make_config(self, prefsCode.repIni)
-
-
-class QWParentSSIhm(object):
- def __init__(self, code, version_code):
- self.ihm = "QT"
- self.code = code
- self.version_code = version_code
- self.format_fichier = "python" # par defaut
tr("Aucune documentation n'est associee a ce noeud"),
)
return
- commande = self.editor.appliEficas.maConfiguration.exec_acrobat
+ commande = self.editor.appliEficas.maConfiguration.PedfReader
try:
f = open(commande, "rb")
except:
fichier = cle_doc
else:
fichier = os.path.abspath(
- os.path.join(self.editor.maConfiguration.path_doc, cle_doc)
+ os.path.join(self.editor.maConfiguration.pathDoc, cle_doc)
)
try:
f = open(fichier, "rb")
fichier = QFileDialog.getOpenFileName(
self.appliEficas,
tr("Ouvrir Fichier"),
- self.appliEficas.maConfiguration.savedir,
+ self.appliEficas.maConfiguration.saveDir,
extensions,
)
fichier = fichier[0]
return None
fichier = os.path.abspath(fichier)
ulfile = os.path.abspath(fichier)
- self.appliEficas.maConfiguration.savedir = os.path.split(ulfile)[0]
+ self.appliEficas.maConfiguration.saveDir = os.path.split(ulfile)[0]
self.appliEficas.addToRecentList(fichier)
maPage = self.getEditor(fichier, units=units)
if maPage:
)
else:
from InterfaceGUI.QT5.editor import JDCEditor
- editor = JDCEditor(
- self.appliEficas,
- fichier,
- jdc,
- self.myQtab,
- units=units,
- include=include,
- )
+ editor = JDCEditor(
+ self.appliEficas,
+ fichier,
+ jdc,
+ self.myQtab,
+ units=units,
+ include=include,
+ )
if double != None:
self.doubles[editor] = double
if editor.jdc: # le fichier est bien un jdc
--- /dev/null
+# -*- coding: utf-8 -*-
+# Copyright (C) 2007-2024 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 pour charger les parametres de configuration d'EFICAS
+"""
+import os, sys, types, re
+import traceback
+from Extensions.i18n import tr
+
+
+class configBase(object):
+ # -----------------------------
+ def __init__(self, appliEficas):
+ # -----------------------------
+ """
+ Classe de base permettant de lire les fichiers de preference
+ 1) de l installation eficas : prefs.py (ou prefs_salome.py) dans
+ la directory du catalogue
+ 2) contenu dans la variable d environnement : ${PREFS_CATA_$CODE}
+ Cela permet d avoir une installation partagée d Eficas avec une possibilité de
+ moduler les préférences selon les machines
+ 3)le(s) fichier(s) de preference utilisateurs :
+ prefs_code.ini ou pref_salome_code.ini
+ contenu dans la directory $HOME/.config/Eficas/code
+
+ Cette classe peut etre surchargee dans le fichier configuration_code.py
+ dans la directory qui contient le catalogue
+ """
+
+ self.appliEficas = appliEficas
+ self.code = appliEficas.code
+ if self.code == None: return
+ self.salome = appliEficas.salome
+
+ if self.salome: name = "prefs_eficas_salome.ini"
+ else: name = "prefs_eficas.ini"
+ if sys.platform == 'linux' : repUser = os.path.join( os.path.expanduser("~"))
+ else : repUser = os.path.join('C:/','.config/Eficas',self.code)
+ self.fichierPrefsUtilisateur = os.path.join(repUser, name)
+
+ self.labelsEficas = ('PdfReader', 'saveDir', 'modeNouvCommande', 'afficheUQ', 'closeAutreCommande', 'closeFrameRechercheCommande',
+ 'closeFrameRechercheCommandeSurPageDesCommandes', 'closeEntete', 'closeArbre', 'demandeLangue', 'suiteTelemac',
+ 'nombreDeBoutonParLigne', 'translatorFichier', 'dicoImages', 'dicoIcones', 'afficheCommandesPliees', 'afficheFirstPlies',
+ 'simpleClic', 'afficheOptionnelVide', 'afficheListesPliees', 'boutonDsMenuBar', 'ficIcones',
+ 'repIcones', 'differencieSiDefaut', 'typeDeCata', 'closeParenthese', 'closeOptionnel',
+ 'afficheFactOptionnel', 'enleverActionStructures', 'enleverPoubellePourCommande', 'enleverParametres',
+ 'enleverSupprimer', 'ajoutExecution', 'utilParExtensions', 'rendVisiblesLesCaches',
+ 'pasDeMCOptionnels', 'dumpXSD', 'withXSD', 'afficheIhm', 'catalogues' )
+
+ self.labelsUser = ('PdfReader', 'saveDir', ' closeArbre', 'demandeLangue',
+ 'nombreDeBoutonParLigne', 'translatorFichier', 'afficheCommandesPliees', 'afficheFirstPlies',
+ 'simpleClic', 'afficheOptionnelVide', 'afficheListesPliees', 'differencieSiDefaut')
+
+
+ self.setValeursParDefaut()
+
+ if self.code != "":
+ self.lectureFichierIniStandard()
+ self.lectureFichierIniIntegrateur()
+ self.lectureFichierIniUtilisateur()
+
+ # coherence des parametres -)
+ if self.boutonDsMenuBar:
+ self.closeAutreCommande = True
+ self.closeFrameRechercheCommande = True
+
+ if not os.path.isdir(self.saveDir):
+ if sys.platform == 'linux' :
+ self.saveDir = os.path.join( os.path.expanduser("~"), 'Eficas', self.code)
+ else :
+ self.saveDir = os.path.join('C:/','Eficas',self.code)
+
+ def setValeursParDefaut(self):
+ # ----------------------------
+
+ # Valeurs par defaut
+ self.pathDoc = os.path.abspath(os.path.join(os.path.dirname(os.path.abspath(__file__)), "..","Doc"))
+ self.PedfReader = "acroread"
+ nomDir = "Eficas_" + self.code
+ self.saveDir = os.path.abspath(os.path.join(os.path.expanduser("~"), nomDir))
+ self.modeNouvCommande = "ini"
+ self.affiche = "alpha"
+ self.closeAutreCommande = False
+ self.closeFrameRechercheCommande = False
+ self.closeFrameRechercheCommandeSurPageDesCommandes = False
+ self.closeEntete = False
+ self.closeArbre = False
+ self.demandeLangue = False
+ self.suiteTelemac = False
+ self.nombreDeBoutonParLigne = 0
+ self.translatorFichier = None
+ self.dicoImages = {}
+ self.dicoIcones = {}
+ self.afficheCommandesPliees = True
+ self.afficheFirstPlies = False
+ self.simpleClic = False
+ self.afficheOptionnelVide = False
+ self.afficheListesPliees = True
+ self.boutonDsMenuBar = False
+ self.ficIcones = None
+ self.repIcones = None
+ self.differencieSiDefaut = False
+ self.typeDeCata = "Python"
+ self.closeParenthese = False
+ self.closeOptionnel = False
+ self.afficheFactOptionnel = False
+ self.enleverActionStructures = False
+ self.enleverPoubellePourCommande = False
+ self.enleverParametres = False
+ self.enleverSupprimer = False
+ self.ajoutExecution = False
+ self.utilParExtensions = []
+ self.rendVisiblesLesCaches = False
+ self.pasDeMCOptionnels = False
+
+ self.dumpXSD = False
+ self.withXSD = False
+ self.afficheIhm = True
+ self.afficheUQ = True
+
+ # pour garder ce qui existait pour Aster
+ self.repMat = None
+
+ # --------------------------------------
+ def lectureFichierIniStandard(self):
+ # --------------------------------------
+
+ if self.salome : name = "prefs_salome_" + self.appliEficas.code
+ else : name = "prefs_" + self.appliEficas.code
+ if self.appliEficas.fichierCata != None :
+ dirCata=os.path.dirname(self.appliEficas.fichierCata)
+ sys.path.append(os.path.abspath(dirCata))
+ self.appliEficas.listePathAEnlever.append(dirCata)
+ try:
+ prefsCode = __import__(name)
+ except:
+ self.catalogues = []
+ print("pas de fichier de prefs")
+ return
+ for k in dir(prefsCode):
+ if k in self.labelsEficas:
+ valeur=getattr(prefsCode,k)
+ setattr(self,k,valeur)
+
+ # --------------------------------------
+ def lectureFichierIniIntegrateur(self):
+ # --------------------------------------
+ # Verifie l'existence du fichier "standard"
+ # appelle la lecture de ce fichier
+ clef = "PREFS_CATA_" + self.code
+ if clef in os.environ.keys(): fic = os.environ[clef]
+ else : return
+ fichierPrefsIntegrateur = os.path.abspath(fic)
+ if not os.path.isfile(fichierPrefsIntegrateur): return
+ try :
+ with open(fichierPrefsIntegrateur) as fd: txt = fd.read()
+ except:
+ titre = tr("Import du fichier de Configuration")
+ texte = "Erreur a la lecture du fichier de configuration {} ".format(str(fichierPrefsIntegrateur))
+ self.appliEficas.afficheMessage(titre, texte)
+ return
+ d = {}
+ try:
+ exec(txt, d)
+ except:
+ titre = tr("Import du fichier de Configuration")
+ texte = "Erreur a la l execution du fichier de configuration {} ".format(str(fichierPrefsIntegrateur))
+ self.appliEficas.afficheMessage(titre, texte)
+ return
+
+ for k in d:
+ if k in self.labelsEficas:
+ try:
+ setattr(self, k, d[k])
+ except:
+ pass
+
+ # --------------------------------------
+ def lectureFichierIniUtilisateur(self):
+ # --------------------------------------
+ # Surcharge les parametres standards par les parametres utilisateur s'ils existent
+ if not os.path.isfile(self.fichierPrefsUtilisateur): return
+ try :
+ with open(self.fichierPrefsUtilisateur) as fd: txt = fd.read()
+ except:
+ titre = tr("Import du fichier de Configuration"),
+ texte = "Erreur a la lecture du fichier de configuration {} ".format(str(fichierPrefsUtilisateur))
+ self.appliEficas.afficheMessage(titre, texte)
+ return
+ d = {}
+ try:
+ exec(txt, d)
+ except:
+ titre = tr("Import du fichier de Configuration"),
+ texte = "Erreur a la l execution du fichier de configuration {} ".format(str(fichierPrefsUtilisateur))
+ self.appliEficas.afficheMessage(titre, texte)
+ return
+ for k in d:
+ if k in self.labelsUser:
+ try:
+ setattr(self, k, d[k])
+ except:
+ pass
+
+ # --------------------------------------
+ def saveParams(self):
+ # --------------------------------------
+ # sauvegarde
+ # les nouveaux parametres dans le fichier de configuration utilisateur
+ #
+ texte = ""
+ for clef in self.labelsUser:
+ if hasattr(self, clef):
+ valeur = getattr(self, clef)
+ texte = texte + clef + " = " + repr(valeur) + "\n"
+ f = open(self.fichierPrefsUtilisateur, "w+")
+ f.write(texte)
+ f.close()
+
+
+def makeConfig(appliEficas):
+ return configBase(appliEficas)
self.code = self.appliEficas.maConfiguration.code
self.maConfiguration = self.appliEficas.maConfiguration
- if (
- not hasattr(self.appliEficas, "readercata")
+ if ( not hasattr(self.appliEficas, "readercata")
or self.appliEficas.readercata.demandeCatalogue == True
- or self.appliEficas.multi == True
- ):
+ or self.appliEficas.multi == True):
+
if self.maConfiguration.typeDeCata == "XML":
from InterfaceGUI import readercataXML as readercata
else:
from InterfaceGUI import readercata
- self.readercata = readercata.ReaderCata(self, self.appliEficas)
+ self.readercata = readercata.ReaderCata(self.appliEficas, self)
self.appliEficas.readercata = self.readercata
self.appliEficas.code = self.code
else:
cata=self.readercata.cata,
cata_ord_dico=self.readercata.cata_ordonne_dico,
nom=jdcName,
- rep_mat=self.maConfiguration.rep_mat,
+ repMat=self.maConfiguration.repMat,
)
self.modified = False
self.monConvert = monConvert
appliEficas=self.appliEficas,
cata=self.readercata.cata,
cata_ord_dico=self.readercata.cata_ordonne_dico,
- rep_mat=self.maConfiguration.rep_mat,
+ repMat=self.maConfiguration.repMat,
)
jdc.lang = self.appliEficas.langue
appliEficas=self.appliEficas,
cata=self.readercata.cata,
cata_ord_dico=self.readercata.cata_ordonne_dico,
- rep_mat=self.maConfiguration.rep_mat,
+ repMat=self.maConfiguration.repMat,
)
jaux.editor = self
jaux.analyse()
cata=self.readercata.cata,
cata_ord_dico=self.readercata.cata_ordonne_dico,
jdc_pere=jaux,
- rep_mat=self.maConfiguration.rep_mat,
+ repMat=self.maConfiguration.repMat,
)
J.editor = self
J.analyse()
import os, sys
from Extensions.eficas_exception import EficasException
-from Extensions import param2
from InterfaceGUI.getVersion import getEficasVersion
-from viewManagerSsIhm import MyViewManagerSsIhm
+from InterfaceGUI.viewManagerSsIhm import MyViewManagerSsIhm
from Editeur import session
Class implementing the main user interface.
"""
- def __init__(
- self,
- code=None,
- salome=1,
- parent=None,
- multi=False,
- langue="fr",
- ssIhm=True,
- labelCode=None,
- genereXSD=False,
- versionCode=None,
- ssCode=None,
- fichierCata=None,
- GUIDir=None,
+ def __init__( self, code=None, salome=1, parent=None, multi=False, langue="fr",
+ ssIhm=True, labelCode=None, genereXSD=False, versionCode=None, ssCode=None, fichierCata=None,
+ GUIPath=None,
):
"""
Constructor
"""
version = getEficasVersion()
- self.VERSION_EFICAS = "Eficas QT5 Salome " + version
+ self.versionEficas = "Eficas QT5 Salome " + version
self.labelCode = labelCode
- if not GUIDir:
- self.GUIDir = "InterfaceQT4"
- else:
- self.GUIDir = GUIDir
+ self.GUIPath = None
self.salome = salome
self.ssIhm = True
self.recent = []
self.ficRecents = {}
self.mesScripts = {}
- self.listeAEnlever = []
- self.ListePathCode = [
- "Adao",
- "ADAO",
- "Carmel3D",
- "Telemac",
- "CF",
- "MAP",
- "ZCracks",
- "SEP",
- "SPECA",
- "PSEN_Eficas",
- "PSEN_N1",
- ]
- self.listeCode = [
- "Adao",
- "ADAO",
- "Carmel3D",
- "Telemac",
- "CF",
- "MAP",
- "ZCracks",
- "SEP",
- "SPECA",
- "PSEN_Eficas",
- "PSEN_N1",
- ]
- self.repIcon = os.path.join(
- os.path.dirname(os.path.abspath(__file__)), "..", "Editeur", "icons"
- )
-
- if fichierCata == None:
- self.fichierCata = session.d_env.fichierCata
- else:
- self.fichierCata = fichierCata
- if session.d_env.labelCode:
- self.labelCode = session.d_env.labelCode
+ self.listePathAEnlever = []
+ self.repIcon = os.path.join( os.path.dirname(os.path.abspath(__file__)), "..", "Editeur", "icons")
+
+ if fichierCata == None: self.fichierCata = session.d_env.fichierCata
+ else: self.fichierCata = fichierCata
+
+ if session.d_env.labelCode: self.labelCode = session.d_env.labelCode
self.withXSD = session.d_env.withXSD
if self.salome:
print("eficas hors salome")
self.multi = multi
- if self.multi:
- print("pas de multi sans ihm")
+ if self.multi: print("pas de multi sans ihm")
- if langue == "fr":
- self.langue = langue
- else:
- self.langue = "ang"
+ if langue == "fr": self.langue = langue
+ else: self.langue = "ang"
if self.multi == False:
self.definitCode(code, ssCode)
- if code == None:
- return
+ if code == None: return
self.suiteTelemac = False
self.viewmanager = MyViewManagerSsIhm(self)
self.formatFichierIn = "pythonUQ" # par defaut
def definitCode(self, code, ssCode):
+ # ssCode sert pour Map
self.code = code
self.ssCode = ssCode
if self.code == None:
return # pour le cancel de la fenetre choix code
- try:
- name = "prefs_" + self.code
- prefsCode = __import__(name)
- self.repIni = prefsCode.repIni
- except:
- self.repIni = os.path.dirname(os.path.abspath(__file__))
-
if ssCode != None:
self.formatFichierOut = ssCode # par defaut
prefsCode.NAME_SCHEME = ssCode
self.formatFichierIn = "python" # par defaut
self.formatFichierOut = "python" # par defaut
- nameConf = "configuration_" + self.code
- try:
- configuration = __import__(nameConf)
- self.maConfiguration = configuration.make_config(self, self.repIni)
- except:
- from InterfaceQT4.configuration import makeConfig
-
- # self.maConfiguration = configuration.makeConfig(self,prefsCode.repIni)
- self.maConfiguration = makeConfig(self, self.repIni)
+#ooooo
+ from InterfaceGUI.configuration import configBase
+ self.maConfiguration = configBase(self)
if hasattr(self, "maConfiguration") and self.maConfiguration.translatorFichier:
from Extensions import localisation
-
- localisation.localise(
- None,
- self.langue,
+ localisation.localise( None, self.langue,
translatorFichier=self.maConfiguration.translatorFichier,
)
if self.withXSD:
currentCata = CONTEXT.getCurrentCata()
texteXSD = currentCata.dumpXsd(avecEltAbstrait)
return texteXSD
- # if self.maConfiguration.afficheIhm==False : exit()
- # else : return texteXSD
+
+ def afficheMessage(self, titre, texte,critical=True):
+ print ('__________________________')
+ print (tr(titre))
+ print ('')
+ print (tr(texte))
+ print ('__________________________')
# ,self.fileSaveAs
from Noyau.N_CR import CR
from Editeur.catadesc import CatalogDescription
-import analyse_catalogue
-import analyse_catalogue_initial
-import autre_analyse_cata
-import uiinfo
+from Editeur import analyse_catalogue
+from Editeur import analyse_catalogue_initial
+from Editeur import autre_analyse_cata
+from Editeur import uiinfo
from Extensions.i18n import tr
from Extensions.eficas_exception import EficasException
# -------------------------------
class ReaderCataCommun(object):
- # -------------------------------
+# -------------------------------
def askChoixCatalogue(self, cataListeChoix):
- # ____________________________________________
+ #____________________________________________
"""
Ouvre une fenetre de selection du catalogue dans le cas où plusieurs
ont ete definis dans Accas/editeur.ini
"""
- try:
- from PyQt5.QtWidgets import QDialog
- except:
+ if self.appliEficas == None :
print("Pas de choix interactif sans qt")
return
code = getattr(self.appliEficas.maConfiguration, "code", None)
- if code != None:
- title = tr("Choix d une version du code ") + str(code)
- else:
- title = tr("Choix d une version ")
-
- from InterfaceGUI.QT5.monChoixCata import MonChoixCata
-
- widgetChoix = MonChoixCata(
+ if code != None: title = tr("Choix d une version du code ") + str(code)
+ else: title = tr("Choix d une version ")
+
+ # a Reflechir
+ # Pourquoi 2 fois MonChoixCata -- je ne comprends pas mais cela fonctionne
+ pathGui='InterfaceGUI.'+ self.appliEficas.GUIPath + '.monChoixCata'
+ MonChoixCata =__import__(pathGui, globals(), locals(), ['MonChoixCata,'])
+ widgetChoix = MonChoixCata.MonChoixCata(
self.appliEficas, [cata.labelCode for cata in cataListeChoix], title
)
ret = widgetChoix.exec_()
-
- lab = str(self.VERSION_EFICAS) + " "
- lab += tr(" pour ")
- lab += str(self.code)
- lab += tr(" avec le catalogue ")
- if ret == QDialog.Accepted:
+ #if ret == QDialog.Accepted:
+ if ret == 1:
cata = cataListeChoix[widgetChoix.CBChoixCata.currentIndex()]
self.fichierCata = cata.fichierCata
self.labelCode = cata.labelCode
self.appliEficas.formatFichierOut = cata.formatFichierOut
self.appliEficas.formatFichierIn = cata.formatFichierIn
- lab += self.labelCode
- self.appliEficas.setWindowTitle(lab)
+ titre='{} pour {} avec le catalogue {}'.format(self.appliEficas.versionEficas,self.code,self.labelCode)
+ self.appliEficas.setWindowTitle(titre)
widgetChoix.close()
else:
widgetChoix.close()
raise EficasException()
def choisitCata(self):
- # ____________________
+ # ____________________
listeCataPossibles = []
#self.commandesOrdreCatalogue = []
listeCataPossibles.append(catalogue)
if len(listeCataPossibles) == 0:
- try:
- QMessageBox.critical(
- self.QWParent,
+ self.appliEficas.afficheMessage(
tr("Import du catalogue"),
- tr("Pas de catalogue defini pour le code ") + self.code,
- )
- except:
- print("Pas de catalogue defini pour le code " + self.code)
- if self.appliEficas.salome == 0:
- sys.exit(1)
+ tr("Pas de catalogue defini pour le code {}".format(self.code)))
self.appliEficas.close()
+ if self.appliEficas.salome == 0: sys.exit(1)
return
if self.labelCode is not None:
listeCataPossibles = (catalogue,)
if len(listeCataPossibles) == 0:
- try:
- from PyQt5.QtWidgets import QMessageBox, QDialog
-
- QMessageBox.critical(
- self.QWParent,
- tr("Import du catalogue"),
- tr("Pas de catalogue defini pour le code ") + self.code,
- )
- except:
- print("Pas de catalogue defini pour le code " + self.code)
+ self.appliEficas.afficheMessage(
+ tr("Import du catalogue"),
+ tr("Pas de catalogue defini pour le code ") + self.code,
+ )
self.appliEficas.close()
- if self.appliEficas.salome == 0:
- sys.exit(1)
+ if self.appliEficas.salome == 0: sys.exit(1)
return
# le label est fixe dans la ligne de commande
cataListeChoix.append(cata)
if len(cataListeChoix) == 0:
- try:
- from PyQt5.QtWidgets import QMessageBox
-
- QMessageBox.critical(
- self.QWParent,
- tr("Import du catalogue"),
- tr("Aucun catalogue trouve"),
- )
- except:
- print("Pas de catalogue defini pour le code " + self.code)
+ self.appliEficas.afficheMessage(
+ tr("Import du catalogue"),
+ tr("Aucun catalogue trouve"),)
self.appliEficas.close()
- if self.appliEficas.salome == 0:
- sys.exit(1)
+ if self.appliEficas.salome == 0: sys.exit(1)
elif len(cataListeChoix) == 1:
self.fichierCata = cataListeChoix[0].fichierCata
# ------------------------------------
class ReaderCata(ReaderCataCommun):
- # ------------------------------------
+# ------------------------------------
- def __init__(self, QWParent, appliEficas):
- # _______________________________________
+ def __init__(self, appliEficas, editor):
+ # _________________________________
- self.QWParent = QWParent
- self.appliEficas = self.QWParent.appliEficas
- self.VERSION_EFICAS = self.appliEficas.VERSION_EFICAS
+ self.appliEficas = appliEficas
+ self.editor = editor
+ self.versionEficas = self.appliEficas.versionEficas
self.demandeCatalogue = False
self.code = self.appliEficas.code
self.titre = self.appliEficas.code
self.creeDicoCasToCata()
def openCata(self):
+ # _________________________________
"""
Ouvre le catalogue standard du code courant, cad le catalogue present
dans le repertoire Cata
self.choisitCata()
self.cata = self.importCata(self.fichierCata)
- if self.code == "NonConnu":
- self.code = self.cata.JdC.code
+ if self.code == "NonConnu": self.code = self.cata.JdC.code
modeleMetier = None
dicoEltDif = {}
if not (self.appliEficas.genereXSD):
try:
import pyxb
except:
- self.QWParent.informe(
+ self.appliEficas.afficheMessage(
"environnement", "please source pyxb environment"
)
exit()
modeleMetier = imp.load_source(nomCataXsd, pathCata)
# print ('nomCataXsd , pathCata ',nomCataXsd,pathCata)
try:
- # if 1 :
- # monObjetAnnotation = getattr(modeleMetier,'PNEFdico_'+self.code)
monObjetAnnotation = getattr(modeleMetier, "PNEFdico")
texte = monObjetAnnotation.__doc__
except:
dicoEltDif = l["dicoEltDif"]
# print ('dans readerCata _________', dicoEltDif)
- except:
+ except Exception as e :
if self.appliEficas.ssIhm == False:
- print("______________ poum import cata_genere ")
- self.QWParent.informe(
- "XSD driver", "unable to load xsd driver", critique=False
- )
+ self.appliEficas.afficheMessage(
+ "XSD driver", "unable to load xsd driver", critique=False
+ )
+ print (e)
modeleMetier = None
self.cata.DicoNomTypeDifferentNomElt = dicoEltDif
self.cata.modeleMetier = modeleMetier
if not self.cata:
- # try:
- # from PyQt5.QtWidgets import QMessageBox, QDialog
- # QMessageBox.critical( self.QWParent, tr("Import du catalogue"),tr("Impossible d'importer le catalogue ")+ self.fichierCata)
- # except :
- # print ("Impossible d'importer le catalogue "+ self.fichierCata)
- self.QWParent.informe(
+ self.appliEficas.afficheMessage(
"Catalogue", "Impossible d'importer le catalogue " + self.fichierCata
)
self.appliEficas.close()
if self.appliEficas.salome == 0:
sys.exit(1)
#
- # analyse du catalogue (ordre des mots-cles)
- #
# retrouveOrdreCataStandard fait une analyse textuelle du catalogue
# remplace par retrouveOrdreCataStandardAutre qui utilise une numerotation
# des mots cles a la creation
#
self.titre = (
- self.VERSION_EFICAS
+ self.versionEficas
+ " "
+ tr(" avec le catalogue ")
+ os.path.basename(self.fichierCata)
)
if self.appliEficas.ssIhm == False:
self.appliEficas.setWindowTitle(self.titre)
- self.appliEficas.titre = self.titre
- self.QWParent.titre = self.titre
+ self.editor.titre = self.titre
# incertitude --> change le convert
if hasattr(self.cata, "avecIncertitude"):
if hasattr(self.cata, "modifieCatalogueDeterministe"):
self.cata.modifieCatalogueDeterministe(self.cata)
- def importCata(self, cata):
+ def importCata(self, fichierCata):
"""
Realise l'import du catalogue dont le chemin d'acces est donne par cata
"""
- nom_cata = os.path.splitext(os.path.basename(cata))[0]
- rep_cata = os.path.dirname(cata)
- sys.path[:0] = [rep_cata]
- self.appliEficas.listeAEnlever.append(rep_cata)
+
+ nomCata = os.path.splitext(os.path.basename(fichierCata))[0]
+ repCata = os.path.abspath(os.path.dirname(fichierCata))
+ sys.path[:0] = [repCata]
+ self.appliEficas.listePathAEnlever.append(repCata)
- # PNPNPN pas propre __ A reflechir
- if "cata_Vimmp" in list(sys.modules.keys()):
- del sys.modules["cata_Vimmp"]
-
- if nom_cata in list(sys.modules.keys()):
- del sys.modules[nom_cata]
+ if nomCata in list(sys.modules.keys()):
+ del sys.modules[nomCata]
for k in sys.modules:
- if k[0 : len(nom_cata) + 1] == nom_cata + ".":
+ if k[0 : len(nomCata) + 1] == nomCata + ".":
del sys.modules[k]
+ # permet d ajouter des scripts appelables par des fonctions supplementaires
+ # dans l ihm
mesScriptsNomFichier = "mesScripts_" + self.code.upper()
- try:
- self.appliEficas.mesScripts[self.code] = __import__(mesScriptsNomFichier)
- except:
- pass
+ try: self.appliEficas.mesScripts[self.code] = __import__(mesScriptsNomFichier)
+ except: pass
- # if 1 :
try:
- o = __import__(nom_cata)
- return o
+ #import importlib.util
+ from importlib import util
+ cataSpec = util.spec_from_file_location(nomCata, fichierCata)
+ leCata = util.module_from_spec(cataSpec)
+ cataSpec.loader.exec_module(leCata)
+ return leCata
except Exception as e:
- self.QWParent.informe("catalog python", "unable to load catalog file")
+ self.appliEficas.afficheMessage("catalog python", "unable to load catalog file")
import traceback
-
traceback.print_exc()
- return 0
+ exit(1)
def retrouveOrdreCataStandardAutre(self):
"""
Retrouve l'ordre des mots-cles dans le catalogue, cad :
Attention s appuie sur les commentaires
"""
- nom_cata = os.path.splitext(os.path.basename(self.fichierCata))[0]
- rep_cata = os.path.dirname(self.fichierCata)
+ nomCata = os.path.splitext(os.path.basename(self.fichierCata))[0]
+ repCata = os.path.dirname(self.fichierCata)
self.commandesOrdreCatalogue = analyse_catalogue_initial.analyseCatalogue( self.fichierCata)
# print self.commandesOrdreCatalogue
class ReaderCata(ReaderCataCommun):
- def __init__(self, QWParent, appliEficas):
- self.QWParent = QWParent
+ def __init__(self, appliEficas, editor):
self.appliEficas = appliEficas
- self.VERSION_EFICAS = self.appliEficas.VERSION_EFICAS
+ self.editor = editor
+ self.versionEficas = self.appliEficas.versionEficas
self.code = self.appliEficas.code
self.ssCode = self.appliEficas.ssCode
# PN ?? bizarre le 22/04/20
--- /dev/null
+# -*- coding: utf-8 -*-
+
+from tkMessageBox import showinfo
+root=None
+jdcdisplay=None
+
+class UnKnownNode(Exception):pass
+
+def init_common(r,j):
+ global root,jdcdisplay
+ root=r
+ jdcdisplay=j
+
+def KP_return():
+ root.event_generate("<Return>")
+ root.update()
+
+def delete_node(panel):
+ panel.node.delete()
+
+def uncomment_command(panel):
+ panel.bouton_unc.invoke()
+ root.update()
+ panel=jdcdisplay.panel_courant
+ return panel
+
+def comment_command(panel):
+ panel.nb.selectpage('Commentaire')
+ panel.comment_commande()
+ root.update()
+ panel=jdcdisplay.panel_courant
+ return panel
+
+def create_mocle(nom,panel):
+ panel.nb.selectpage('Mocles')
+ panel.Liste.afficheMot(nom)
+ root.update()
+ label=panel.Liste.dico_labels[nom]
+ label.event_generate("<Enter>")
+ root.event_generate("<KeyPress-Return>")
+ root.update()
+ return jdcdisplay.panel_courant
+
+def change_commandcomm(text,panel):
+ panel.widget_text.setvalue(text)
+ root.update()
+ panel.bouton_val.invoke()
+ return panel
+
+def create_command(nom,panel):
+ panel.nb.selectpage('Commande')
+ root.update()
+ panel.command_entry.setentry(nom)
+ panel.command_entry.component('entry').focus_set()
+ root.event_generate("<Return>")
+ root.update()
+ label=panel.liste_command.dico_labels[nom]
+ label.event_generate("<Enter>")
+ label.event_generate("<Return>")
+ #root.event_generate("<Return>")
+ root.update()
+ panel=jdcdisplay.panel_courant
+ return panel
+
+def create_comment(text,panel):
+ panel.nb.selectpage('Commentaire')
+ panel.ajout_commentaire()
+ root.update()
+ panel=jdcdisplay.panel_courant
+ panel.widget_text.setvalue(text)
+ root.update()
+ panel.bouton_val.invoke()
+ #panel.change_valeur()
+ return panel
+
+def create_param(nom,valeur,panel):
+ panel.nb.selectpage('Commentaire')
+ panel.ajout_parametre()
+ root.update()
+ panel=jdcdisplay.panel_courant
+ if nom:
+ panel.entry_nom.delete(0,"end")
+ panel.entry_nom.insert(0,nom)
+ panel.entry_nom.event_generate("<Return>")
+ panel.entry_val.delete(0,"end")
+ panel.entry_val.insert(0,valeur)
+ panel.entry_val.event_generate("<Return>")
+ panel.bouton_val.invoke()
+ root.update()
+ return panel
+
+def create_formule(nom,args,expr,panel):
+ panel=create_command("FORMULE",panel)
+ panel.entry_nom.delete(0,"end")
+ panel.entry_nom.insert(0,nom)
+ panel.entry_nom.event_generate("<Return>")
+ panel.entry_arg.delete(0,"end")
+ panel.entry_arg.insert(0,args)
+ panel.entry_arg.event_generate("<Return>")
+ panel.entry_exp.delete(0,"end")
+ panel.entry_exp.insert(0,expr)
+ panel.entry_exp.event_generate("<Return>")
+ panel.bouton_val.invoke()
+ root.update()
+ return panel
+
+def nomme_concept(nom,panel):
+ panel.nb.selectpage('Concept')
+ root.update()
+ panel._any.delete(0,"end")
+ panel._any.insert(0,nom)
+ panel.but_ok.invoke()
+ root.update()
+ return jdcdisplay.panel_courant
+
+def select_mcf(nom,ind,node):
+ panel=select_child(nom,node)
+ parent=panel.node
+ parent.expand()
+ parent.select_next(ind)
+ panel=jdcdisplay.panel_courant
+ panel.node.expand()
+ return panel
+
+def select_child(nom,node):
+ """node est le parent dont on veut le fils nom"""
+ for n in node.children:
+ if n.item.nom == nom:
+ n.select()
+ root.update()
+ panel= jdcdisplay.panel_courant
+ panel.node.expand()
+ return panel
+ raise UnKnownNode(nom)
+
+def select_node(node):
+ node.select()
+ node.expand()
+ root.update()
+ return jdcdisplay.panel_courant
+
+def choose_valeur(valeur,panel):
+ panel.Liste_choix.afficheMot(valeur)
+ root.update()
+ label=panel.Liste_choix.dico_labels[valeur]
+ label.event_generate("<Button-1>")
+ label.event_generate("<Return>")
+ root.update()
+
+def choose_sdco(valeur,panel):
+ i = list(panel.listbox.get(0, 'end')).index(valeur)
+ panel.listbox.component("listbox").selection_set(i)
+ panel.listbox.component("listbox").focus_set()
+ panel.listbox.component("listbox").event_generate("<Return>")
+ root.update()
+
+def choose_assd(valeur,panel):
+ i = list(panel.listbox.get(0, 'end')).index(valeur)
+ panel.listbox.component("listbox").selection_set(i)
+ panel.but_val.invoke()
+ root.update()
+
+def set_valeur(valeur,panel):
+ panel.entry.delete(0,"end")
+ panel.entry.insert(0,valeur)
+ panel.entry.event_generate("<Return>")
+ root.update()
+
+def set_sdco(valeur,panel):
+ panel.entry_co.delete(0,"end")
+ panel.entry_co.insert(0,valeur)
+ panel.entry_co.event_generate("<Return>")
+ root.update()
+
+def set_complexe(valeur,panel):
+ panel.entry3.setentry(valeur)
+ panel.entry3.component('entry').focus_set()
+ panel.entry3.event_generate("<Return>")
+ root.update()
+
+def add_valeur_into(valeur,panel):
+ label=panel.Liste_choix.dico_labels[valeur]
+ panel.Liste_choix.afficheMot(valeur)
+ root.update()
+ label.event_generate("<1>")
+ panel.bouton_add.invoke()
+ root.update()
+
+def add_valeur(valeur,panel):
+ panel.entry.delete(0,"end")
+ panel.entry.insert(0,valeur)
+ panel.entry.event_generate("<Return>")
+ root.update()
+
+def valider_valeur(panel):
+ panel.bouton_accepter.invoke()
+ root.update()
+
+def copier_coller():
+ root.event_generate("<Control-c>")
+ root.event_generate("<Control-v>")
+ root.update()
+ return jdcdisplay.panel_courant
+
--- /dev/null
+# -*- coding: utf-8 -*-
+# Modules Python
+import os
+import unittest
+import difflib
+import compare
+import sys
+import Tkinter
+
+# Modules Eficas
+import prefs
+from Editeur import session
+from InterfaceTK import eficas_go
+from InterfaceTK import splash
+from InterfaceTK import eficas
+from InterfaceTK import images
+from common import *
+
+version='v8'
+
+class TestCase(unittest.TestCase):
+ def setUp(self):
+ self.root = Tkinter.Tk()
+ images.update_cache()
+ # Analyse des arguments de la ligne de commande
+ options=session.parse([])
+ options.cata=version
+ pass
+
+ def tearDown(self):
+ self.root.destroy()
+ init_common(None,None)
+ pass
+
+ def test000(self):
+ root=self.root
+ code="ASTER"
+ splash.init_splash(root,code=code,titre="Lancement d'EFICAS pour %s" %code)
+ splash._splash.configure(text="Chargement d'EFICAS en cours.\n Veuillez patienter ...")
+ app=eficas.EFICAS(root,code=code)
+ j=app.bureau.newJDC()
+ jdcdisplay=app.bureau.JDCDisplay_courant
+ init_common(root,jdcdisplay)
+
+ # commande DEBUT
+ co=j.addentite("DEBUT",0)
+ # commande FIN
+ co=j.addentite("FIN",1)
+
+ jdctree=jdcdisplay.tree.tree.children[0]
+ panel=select_child("DEBUT",jdctree)
+
+ panel=create_param("P1",9.8,panel)
+ panel=create_param("P2",8.8,panel)
+ panel=create_param("P3",7,panel)
+ panel=create_param("P4","[2,3,4]",panel)
+ panel=create_param("P5","P3*P1",panel)
+ panel=create_param(None,"P1-3",panel)
+ panel=create_comment("Pas trouve shellpanel",panel)
+
+ #commnde LIRE_MAILLAGE
+ panel=create_command("LIRE_MAILLAGE",panel)
+ command=panel.node
+ panel=nomme_concept("MAILLA2",panel)
+ panel=select_node(command)
+ panel=create_mocle("UNITE",panel)
+ panel=set_valeur("P4[1]",panel)
+ command.collapse()
+ panel=select_node(command)
+ #FORMULE
+ panel=create_formule("az","a,z","a+z",panel)
+ #commande AFFE_MODELE
+ panel=create_command("AFFE_MODELE",panel)
+ command=panel.node
+ select_child("MAILLAGE",command)
+ panel=select_node(command)
+ panel=create_mocle("AFFE",panel)
+ parent=panel.node
+ panel=select_child("PHENOMENE",parent)
+ choose_valeur("MECANIQUE",panel)
+ panel=select_child("b_mecanique",parent)
+ panel=select_child("MODELISATION",panel.node)
+ add_valeur_into("3D",panel)
+ add_valeur_into("3D_FLUIDE",panel)
+ valider_valeur(panel)
+ panel=select_node(parent)
+ panel=create_mocle("TOUT",panel)
+ choose_valeur("OUI",panel)
+ panel=select_node(command)
+ panel=nomme_concept("MO",panel)
+ command.collapse()
+ #fin commande AFFE_MODELE
+ panel=copier_coller()
+ command=panel.node
+ panel=create_mocle("AFFE",panel)
+ panel=select_node(command)
+ panel=create_mocle("AFFE",panel)
+ panel=select_mcf("AFFE",1,command)
+ parent=panel.node
+ panel=create_mocle("GROUP_NO",panel)
+ add_valeur("'GNP3','GNP5','GNP6','GNP7','GNP8','GNP9','GNP10','GNP11','GNP12'",panel)
+ valider_valeur(panel)
+ panel=select_child("PHENOMENE",parent)
+ choose_valeur("ACOUSTIQUE",panel)
+ panel=select_child("b_acoustique",parent)
+ panel=select_child("MODELISATION",panel.node)
+ add_valeur_into("PLAN",panel)
+ valider_valeur(panel)
+
+ panel=select_mcf("AFFE",2,command)
+ parent=panel.node
+ panel=create_mocle("GROUP_MA",panel)
+ add_valeur("MASSES",panel)
+ valider_valeur(panel)
+ panel=select_child("PHENOMENE",parent)
+ choose_valeur("THERMIQUE",panel)
+ panel=select_child("b_thermique",parent)
+ panel=select_child("MODELISATION",panel.node)
+ add_valeur_into("COQUE",panel)
+ valider_valeur(panel)
+
+ panel=select_node(command)
+ panel=nomme_concept("AFFE1",panel)
+ command.collapse()
+ #fin commande AFFE_MODELE
+ #commande AFFE_CARA_ELEM
+ panel=create_command("AFFE_CARA_ELEM",panel)
+ command=panel.node
+ panel=select_node(command)
+ panel=create_mocle("POUTRE",panel)
+ parent=panel.node
+ panel=select_child("SECTION",parent)
+ choose_valeur("CERCLE",panel)
+ panel=select_child("b_cercle",parent)
+ panel=select_child("b_constant",panel.node)
+ p=panel.node
+ panel=select_child("CARA",p)
+ add_valeur_into("R",panel)
+ add_valeur_into("EP",panel)
+ valider_valeur(panel)
+ panel=select_child("VALE",p)
+ add_valeur("1,2",panel)
+ valider_valeur(panel)
+ panel=select_node(parent)
+ panel=create_mocle("GROUP_MA",panel)
+ add_valeur("GR1,GR2",panel)
+ valider_valeur(panel)
+ panel=select_child("MODELE",command)
+ choose_assd("MO",panel)
+ panel=select_node(command)
+ panel=nomme_concept("CARA",panel)
+ command.collapse()
+ #fin commande AFFE_CARA_ELEM
+ panel=create_command("DEFI_FONCTION",panel)
+ command=panel.node
+ panel=create_mocle("VALE",panel)
+ add_valeur("5.0,3.0",panel)
+ add_valeur("P4[1],P3",panel)
+ valider_valeur(panel)
+ panel=select_child("NOM_PARA",command)
+ choose_valeur("DX",panel)
+ panel=select_node(command)
+ panel=nomme_concept("F1",panel)
+ command.collapse()
+ #fin DEFI_FONCTION
+ panel=create_command("DEFI_FONCTION",panel)
+ command=panel.node
+ panel=create_mocle("VALE_C",panel)
+ add_valeur("5.0,7.0,9.0",panel)
+ add_valeur("9.0,8.0,7.0",panel)
+ valider_valeur(panel)
+ panel=select_child("NOM_PARA",command)
+ choose_valeur("DRX",panel)
+ panel=select_node(command)
+ panel=nomme_concept("F3",panel)
+ command.collapse()
+ #fin DEFI_FONCTION
+#MATER2=DEFI_MATERIAU(ELAS=_F(E=100000000000.0,
+# NU=0.0,),
+# ECRO_ASYM_LINE=_F(DC_SIGM_EPSI=0.0,
+# SY_C=200000000.0,
+# DT_SIGM_EPSI=0.0,
+# SY_T=50000000.0,),);
+
+ panel=create_command("DEFI_MATERIAU",panel)
+ command=panel.node
+ panel=create_mocle("ELAS",panel)
+ p=panel.node
+ panel=select_child("E",p)
+ set_valeur("100000000000.0",panel)
+ panel=select_child("NU",p)
+ set_valeur("0.0",panel)
+ panel=select_node(command)
+ panel=create_mocle("ECRO_ASYM_LINE",panel)
+ p=panel.node
+ panel=select_child("DC_SIGM_EPSI",p)
+ set_valeur("0.0",panel)
+ panel=select_child("SY_C",p)
+ set_valeur("200000000.0",panel)
+ panel=select_child("DT_SIGM_EPSI",p)
+ set_valeur("0.0",panel)
+ panel=select_child("SY_T",p)
+ set_valeur("50000000.0",panel)
+ panel=select_node(command)
+ panel=nomme_concept("MATER2",panel)
+ command.collapse()
+ #fin DEFI_MATERIAU
+ #PS1=DEFI_PARA_SENSI(VALE=1.0,);
+ #PS2=DEFI_PARA_SENSI(VALE=1.0,);
+ #PS3=DEFI_PARA_SENSI(VALE=1.0,);
+ panel=create_command("DEFI_PARA_SENSI",panel)
+ command=panel.node
+ panel=select_child("VALE",command)
+ set_valeur("1.0",panel)
+ panel=select_node(command)
+ panel=nomme_concept("PS1",panel)
+ command.collapse()
+ panel=create_command("DEFI_PARA_SENSI",panel)
+ command=panel.node
+ panel=select_child("VALE",command)
+ set_valeur("1.0",panel)
+ panel=select_node(command)
+ panel=nomme_concept("PS2",panel)
+ command.collapse()
+ panel=create_command("DEFI_PARA_SENSI",panel)
+ command=panel.node
+ panel=select_child("VALE",command)
+ set_valeur("1.0",panel)
+ panel=select_node(command)
+ panel=nomme_concept("PS3",panel)
+ command.collapse()
+#CHMAT2=AFFE_MATERIAU(MAILLAGE=MAIL,
+# AFFE=_F(TOUT='OUI',
+# MATER=MATER2,),);
+ panel=create_command("AFFE_MATERIAU",panel)
+ command=panel.node
+ panel=select_child("MAILLAGE",command)
+ panel=select_child("AFFE",command)
+ affe=panel.node
+ panel=create_mocle("TOUT",panel)
+ choose_valeur("OUI",panel)
+ panel=select_child("MATER",affe)
+ add_valeur_into("MATER2",panel)
+ valider_valeur(panel)
+ panel=select_node(command)
+ panel=nomme_concept("CHMAT2",panel)
+ command.collapse()
+#AAAZ=AFFE_CHAR_THER(MODELE=AFFE1,
+# TEMP_IMPO=_F(TOUT='OUI',
+# TEMP=0.0,),);
+ panel=create_command("AFFE_CHAR_THER",panel)
+ command=panel.node
+ panel=create_mocle("TEMP_IMPO",panel)
+ temp=panel.node
+ panel=create_mocle("TOUT",panel)
+ choose_valeur("OUI",panel)
+ panel=select_node(temp)
+ panel=create_mocle("TEMP",panel)
+ panel=set_valeur("0.0",panel)
+ panel=select_child("MODELE",command)
+ choose_assd("AFFE1",panel)
+ panel=select_node(command)
+ panel=nomme_concept("AAAZ",panel)
+ command.collapse()
+#TH1=THER_LINEAIRE(MODELE=AFFE1,
+# CHAM_MATER=CHMAT2,
+# EXCIT=_F(CHARGE=AAAZ,),
+# SENSIBILITE=(PS1,PS2,),);
+ panel=create_command("THER_LINEAIRE",panel)
+ command=panel.node
+ panel=select_child("MODELE",command)
+ choose_assd("AFFE1",panel)
+ panel=select_child("CHAM_MATER",command)
+ panel=select_child("EXCIT",command)
+ panel=select_child("CHARGE",panel.node)
+ panel=select_node(command)
+ panel=create_mocle("SENSIBILITE",panel)
+ add_valeur_into("PS1",panel)
+ add_valeur_into("PS2",panel)
+ valider_valeur(panel)
+ panel=select_node(command)
+ panel=nomme_concept("TH1",panel)
+ command.collapse()
+#ACA1=AFFE_CHAR_ACOU(MODELE=AFFE1,
+# PRES_IMPO=_F(TOUT='OUI',
+# PRES=('RI',3.0,3.0,),),);
+ panel=create_command("AFFE_CHAR_ACOU",panel)
+ command=panel.node
+ panel=create_mocle("PRES_IMPO",panel)
+ pres=panel.node
+ panel=create_mocle("TOUT",panel)
+ choose_valeur("OUI",panel)
+ panel=select_child("MODELE",command)
+ choose_assd("AFFE1",panel)
+ panel=select_child("PRES",pres)
+ set_complexe("'RI',3.0,3.0",panel)
+ panel=select_node(command)
+ panel=nomme_concept("ACA1",panel)
+ command.collapse()
+#MACRO_MATR_ASSE(MODELE=AFFE1,
+# NUME_DDL=CO('DDL1'),
+# MATR_ASSE=_F(MATRICE=CO('MAT1'),
+# OPTION='RIGI_THER',),);
+ panel=create_command("MACRO_MATR_ASSE",panel)
+ command=panel.node
+ panel=select_child("NUME_DDL",command)
+ set_sdco("DDL1",panel)
+ panel=select_child("MODELE",command)
+ choose_assd("AFFE1",panel)
+ panel=select_child("MATR_ASSE",command)
+ matr=panel.node
+ panel=select_child("OPTION",matr)
+ choose_valeur("RIGI_THER",panel)
+ panel=select_child("MATRICE",matr)
+ set_sdco("MAT1",panel)
+ panel=select_node(command)
+ command.collapse()
+#MACRO_MATR_ASSE(MODELE=AFFE1,
+# NUME_DDL=DDL1,
+# MATR_ASSE=_F(MATRICE=MAT1,
+# OPTION='RIGI_THER',),);
+ panel=create_command("MACRO_MATR_ASSE",panel)
+ command=panel.node
+ panel=select_child("NUME_DDL",command)
+ choose_sdco("DDL1",panel)
+ panel=select_child("MODELE",command)
+ choose_assd("AFFE1",panel)
+ panel=select_child("MATR_ASSE",command)
+ matr=panel.node
+ panel=select_child("OPTION",matr)
+ choose_valeur("RIGI_THER",panel)
+ panel=select_child("MATRICE",matr)
+ set_sdco("MAT2",panel)
+ panel=select_node(command)
+ command.collapse()
+
+ assert j.isvalid(),j.report()
--- /dev/null
+# -*- coding: utf-8 -*-
+# Modules Python
+import os
+import unittest
+import difflib
+import compare
+import sys
+import Tkinter
+
+# Modules Eficas
+import prefs
+from Editeur import session
+from InterfaceTK import eficas_go,splash,eficas,images
+from common import *
+
+
+class TestCase(unittest.TestCase):
+ def setUp(self):
+ self.root = Tkinter.Tk()
+ images.update_cache()
+ # Analyse des arguments de la ligne de commande
+ options=session.parse([])
+ options.cata="v8"
+ pass
+
+ def tearDown(self):
+ self.root.destroy()
+ init_common(None,None)
+ pass
+
+ def test000(self):
+ root=self.root
+ code="ASTER"
+ splash.init_splash(root,code=code,titre="Lancement d'EFICAS pour %s" %code)
+ splash._splash.configure(text="Chargement d'EFICAS en cours.\n Veuillez patienter ...")
+ app=eficas.EFICAS(root,code=code)
+ j=app.bureau.newJDC()
+ jdcdisplay=app.bureau.JDCDisplay_courant
+ init_common(root,jdcdisplay)
+
+ # commande DEBUT
+ co=j.addentite("DEBUT",0)
+ # commande FIN
+ co=j.addentite("FIN",1)
+
+ jdctree=jdcdisplay.tree.tree.children[0]
+ panel=select_child("DEBUT",jdctree)
+ panel=create_command("LIRE_MAILLAGE",panel)
+ panel=nomme_concept("MA",panel)
+
+ panel=create_command("AFFE_MODELE",panel)
+ command=panel.node
+ select_child("MAILLAGE",command)
+ panel=select_node(command)
+ panel=create_mocle("AFFE",panel)
+ parent=panel.node
+ panel=select_child("PHENOMENE",parent)
+ choose_valeur("MECANIQUE",panel)
+ panel=select_child("b_mecanique",parent)
+ panel=select_child("MODELISATION",panel.node)
+ add_valeur_into("3D",panel)
+ add_valeur_into("3D_FLUIDE",panel)
+ valider_valeur(panel)
+ panel=select_node(parent)
+ panel=create_mocle("TOUT",panel)
+ choose_valeur("OUI",panel)
+ panel=select_node(command)
+ panel=nomme_concept("MO",panel)
+
+ assert j.isvalid(),j.report()
--- /dev/null
+# -*- coding: utf-8 -*-
+# Modules Python
+import os
+import unittest
+import difflib
+import compare
+import sys
+import Tkinter
+
+# Modules Eficas
+import prefs
+from Editeur import session
+from InterfaceTK import eficas_go,splash,eficas,images
+from common import *
+
+
+class TestCase(unittest.TestCase):
+ def setUp(self):
+ self.root = Tkinter.Tk()
+ images.update_cache()
+ # Analyse des arguments de la ligne de commande
+ options=session.parse([])
+ options.cata="petit"
+ pass
+
+ def tearDown(self):
+ self.root.destroy()
+ init_common(None,None)
+ pass
+
+ def test000(self):
+ root=self.root
+ code="ASTER"
+ splash.init_splash(root,code=code,titre="Lancement d'EFICAS pour %s" %code)
+ splash._splash.configure(text="Chargement d'EFICAS en cours.\n Veuillez patienter ...")
+ app=eficas.EFICAS(root,code=code)
+ j=app.bureau.newJDC()
+ jdcdisplay=app.bureau.JDCDisplay_courant
+ init_common(root,jdcdisplay)
+
+ # commande DEBUT
+ co=j.addentite("DEBUT",0)
+ # commande FIN
+ co=j.addentite("FIN",1)
+
+ jdctree=jdcdisplay.tree.tree.children[0]
+ panel=select_child("DEBUT",jdctree)
+ panel=create_command("TESTS_VALID",panel)
+ command=panel.node
+ panel=select_child("LongStr",command)
+ set_valeur("aaa",panel)
+ panel=select_child("ListStr",command)
+ add_valeur("aaa",panel)
+ add_valeur("bbbb,ccc",panel)
+ valider_valeur(panel)
+ panel=select_child("PairVal",command)
+ add_valeur(2,panel)
+ add_valeur("4,6",panel)
+ valider_valeur(panel)
+ panel=select_child("RangeVal",command)
+ set_valeur(4,panel)
+ panel=select_child("CardVal",command)
+ add_valeur("4,6,5,7",panel)
+ valider_valeur(panel)
+ panel=select_child("EnumVal",command)
+ choose_valeur(3,panel)
+ panel=select_child("OrdList",command)
+ add_valeur("4,6,5,7",panel)
+ valider_valeur(panel)
+ panel=select_child("OrdList2",command)
+ add_valeur_into(2,panel)
+ valider_valeur(panel)
+ panel=select_child("TypeVal",command)
+ set_valeur(5,panel)
+ panel=select_child("Compul",command)
+ add_valeur("2",panel)
+ add_valeur("1",panel)
+ valider_valeur(panel)
+ panel=select_child("CompulInto",command)
+ add_valeur_into(2,panel)
+ add_valeur_into(1,panel)
+ valider_valeur(panel)
+ panel=select_child("Norep",command)
+ add_valeur("2",panel)
+ valider_valeur(panel)
+ panel=select_child("NorepInto",command)
+ add_valeur_into(2,panel)
+ valider_valeur(panel)
+
+ panel=select_node(command)
+ panel=nomme_concept("MA",panel)
+
+ assert j.isvalid(),j.report()
--- /dev/null
+# -*- coding: utf-8 -*-
+# Modules Python
+import os
+import unittest
+import difflib
+import compare
+import sys
+import Tkinter
+
+# Modules Eficas
+import prefs
+from Editeur import session
+from InterfaceTK import eficas_go,splash,eficas,images
+from common import *
+
+
+class TestCase(unittest.TestCase):
+ def setUp(self):
+ self.root = Tkinter.Tk()
+ images.update_cache()
+ # Analyse des arguments de la ligne de commande
+ options=session.parse([])
+ options.cata="v8"
+ pass
+
+ def tearDown(self):
+ self.root.destroy()
+ init_common(None,None)
+ pass
+
+ def test000(self):
+ root=self.root
+ code="ASTER"
+ splash.init_splash(root,code=code,titre="Lancement d'EFICAS pour %s" %code)
+ splash._splash.configure(text="Chargement d'EFICAS en cours.\n Veuillez patienter ...")
+ app=eficas.EFICAS(root,code=code)
+ file=os.path.join(prefs.INSTALLDIR,"Tests/testelem/az.comm")
+ j=app.bureau.openJDC(file=file)
+ jdcdisplay=app.bureau.JDCDisplay_courant
+ init_common(root,jdcdisplay)
+ jdctree=jdcdisplay.tree.tree.children[0]
+ #commentariser commande MACRO_MATR_ASSE
+ panel=select_child("MACRO_MATR_ASSE",jdctree)
+ panel=comment_command(panel)
+ #decommentariser commande MACRO_MATR_ASSE
+ panel=uncomment_command(panel)
+ #creation commande commentée
+ panel=create_command("LIRE_MAILLAGE",panel)
+ panel=comment_command(panel)
+ panel=change_commandcomm("mm=LIRE_MAILLAGE(INFO=2,UNITE=21)",panel)
+ panel=uncomment_command(panel)
+ panel=select_child("DEFI_FONCTION",jdctree)
+ delete_node(panel)
+
+ assert j.isvalid(),j.report()
--- /dev/null
+# -*- coding: utf-8 -*-
+
+from tkMessageBox import showinfo
+root=None
+jdcdisplay=None
+
+class UnKnownNode(Exception):pass
+
+def init_common(r,j):
+ global root,jdcdisplay
+ root=r
+ jdcdisplay=j
+
+def KP_return():
+ root.event_generate("<Return>")
+ root.update()
+
+def delete_node(panel):
+ panel.node.delete()
+
+def uncomment_command(panel):
+ panel.bouton_unc.invoke()
+ root.update()
+ panel=jdcdisplay.panel_courant
+ return panel
+
+def comment_command(panel):
+ panel.nb.selectpage('Commentaire')
+ panel.comment_commande()
+ root.update()
+ panel=jdcdisplay.panel_courant
+ return panel
+
+def create_mocle(nom,panel):
+ panel.nb.selectpage('Mocles')
+ panel.Liste.afficheMot(nom)
+ root.update()
+ label=panel.Liste.dico_labels[nom]
+ label.event_generate("<Enter>")
+ root.event_generate("<KeyPress-Return>")
+ root.update()
+ return jdcdisplay.panel_courant
+
+def change_commandcomm(text,panel):
+ panel.widget_text.setvalue(text)
+ root.update()
+ panel.bouton_val.invoke()
+ return panel
+
+def create_command(nom,panel):
+ panel.nb.selectpage('Commande')
+ root.update()
+ panel.command_entry.setentry(nom)
+ panel.command_entry.component('entry').focus_set()
+ root.event_generate("<Return>")
+ root.update()
+ label=panel.liste_command.dico_labels[nom]
+ label.event_generate("<Enter>")
+ label.event_generate("<Return>")
+ #root.event_generate("<Return>")
+ root.update()
+ panel=jdcdisplay.panel_courant
+ return panel
+
+def create_comment(text,panel):
+ panel.nb.selectpage('Commentaire')
+ panel.ajout_commentaire()
+ root.update()
+ panel=jdcdisplay.panel_courant
+ panel.widget_text.setvalue(text)
+ root.update()
+ panel.bouton_val.invoke()
+ #panel.change_valeur()
+ return panel
+
+def create_param(nom,valeur,panel):
+ panel.nb.selectpage('Commentaire')
+ panel.ajout_parametre()
+ root.update()
+ panel=jdcdisplay.panel_courant
+ if nom:
+ panel.entry_nom.delete(0,"end")
+ panel.entry_nom.insert(0,nom)
+ panel.entry_nom.event_generate("<Return>")
+ panel.entry_val.delete(0,"end")
+ panel.entry_val.insert(0,valeur)
+ panel.entry_val.event_generate("<Return>")
+ panel.bouton_val.invoke()
+ root.update()
+ return panel
+
+def create_formule(nom,args,expr,panel):
+ panel=create_command("FORMULE",panel)
+ panel.entry_nom.delete(0,"end")
+ panel.entry_nom.insert(0,nom)
+ panel.entry_nom.event_generate("<Return>")
+ panel.entry_arg.delete(0,"end")
+ panel.entry_arg.insert(0,args)
+ panel.entry_arg.event_generate("<Return>")
+ panel.entry_exp.delete(0,"end")
+ panel.entry_exp.insert(0,expr)
+ panel.entry_exp.event_generate("<Return>")
+ panel.bouton_val.invoke()
+ root.update()
+ return panel
+
+def nomme_concept(nom,panel):
+ panel.nb.selectpage('Concept')
+ root.update()
+ panel._any.delete(0,"end")
+ panel._any.insert(0,nom)
+ panel.but_ok.invoke()
+ root.update()
+ return jdcdisplay.panel_courant
+
+def select_mcf(nom,ind,node):
+ panel=select_child(nom,node)
+ parent=panel.node
+ parent.expand()
+ parent.select_next(ind)
+ panel=jdcdisplay.panel_courant
+ panel.node.expand()
+ return panel
+
+def select_child(nom,node):
+ """node est le parent dont on veut le fils nom"""
+ for n in node.children:
+ if n.item.nom == nom:
+ n.select()
+ root.update()
+ panel= jdcdisplay.panel_courant
+ panel.node.expand()
+ return panel
+ raise UnKnownNode(nom)
+
+def select_node(node):
+ node.select()
+ node.expand()
+ root.update()
+ return jdcdisplay.panel_courant
+
+def choose_valeur(valeur,panel):
+ panel.Liste_choix.afficheMot(valeur)
+ root.update()
+ label=panel.Liste_choix.dico_labels[valeur]
+ label.event_generate("<Button-1>")
+ label.event_generate("<Return>")
+ root.update()
+
+def choose_sdco(valeur,panel):
+ i = list(panel.listbox.get(0, 'end')).index(valeur)
+ panel.listbox.component("listbox").selection_set(i)
+ panel.listbox.component("listbox").focus_set()
+ panel.listbox.component("listbox").event_generate("<Return>")
+ root.update()
+
+def choose_assd(valeur,panel):
+ i = list(panel.listbox.get(0, 'end')).index(valeur)
+ panel.listbox.component("listbox").selection_set(i)
+ panel.but_val.invoke()
+ root.update()
+
+def set_valeur(valeur,panel):
+ panel.entry.delete(0,"end")
+ panel.entry.insert(0,valeur)
+ panel.entry.event_generate("<Return>")
+ root.update()
+
+def set_sdco(valeur,panel):
+ panel.b_co.invoke('OUI')
+ root.update()
+ panel.entry_co.delete(0,"end")
+ panel.entry_co.insert(0,valeur)
+ panel.entry_co.event_generate("<Return>")
+ root.update()
+
+def set_complexe(valeur,panel):
+ panel.entry3.setentry(valeur)
+ panel.entry3.component('entry').focus_set()
+ panel.entry3.event_generate("<Return>")
+ root.update()
+
+def add_valeur_into(valeur,panel):
+ label=panel.Liste_choix.dico_labels[valeur]
+ panel.Liste_choix.afficheMot(valeur)
+ root.update()
+ label.event_generate("<1>")
+ panel.bouton_add.invoke()
+ root.update()
+
+def add_valeur(valeur,panel):
+ panel.entry.delete(0,"end")
+ panel.entry.insert(0,valeur)
+ panel.entry.event_generate("<Return>")
+ root.update()
+
+def valider_valeur(panel):
+ panel.bouton_accepter.invoke()
+ root.update()
+
+def copier_coller():
+ root.event_generate("<Control-c>")
+ root.event_generate("<Control-v>")
+ root.update()
+ return jdcdisplay.panel_courant
+
--- /dev/null
+# -*- coding: utf-8 -*-
+# Modules Python
+import os
+import unittest
+import difflib
+import compare
+import sys
+import Tkinter
+
+# Modules Eficas
+import prefs
+from Editeur import session
+from InterfaceTK import eficas_go,splash,eficas,images
+from common import *
+
+version='v7'
+
+class TestCase(unittest.TestCase):
+ def setUp(self):
+ self.root = Tkinter.Tk()
+ images.update_cache()
+ # Analyse des arguments de la ligne de commande
+ options=session.parse([])
+ options.cata=version
+ pass
+
+ def tearDown(self):
+ self.root.destroy()
+ init_common(None,None)
+ pass
+
+ def test000(self):
+ root=self.root
+ code="ASTER"
+ splash.init_splash(root,code=code,titre="Lancement d'EFICAS pour %s" %code)
+ splash._splash.configure(text="Chargement d'EFICAS en cours.\n Veuillez patienter ...")
+ app=eficas.EFICAS(root,code=code)
+ j=app.bureau.newJDC()
+ jdcdisplay=app.bureau.JDCDisplay_courant
+ init_common(root,jdcdisplay)
+
+ # commande DEBUT
+ co=j.addentite("DEBUT",0)
+ # commande FIN
+ co=j.addentite("FIN",1)
+
+ jdctree=jdcdisplay.tree.tree.children[0]
+ panel=select_child("DEBUT",jdctree)
+
+ panel=create_param("P1",9.8,panel)
+ panel=create_param("P2",8.8,panel)
+ panel=create_param("P3",7,panel)
+ panel=create_param("P4","[2,3,4]",panel)
+ panel=create_param("P5","P3*P1",panel)
+ panel=create_param(None,"P1-3",panel)
+ panel=create_comment("Pas trouve shellpanel",panel)
+
+ #commnde LIRE_MAILLAGE
+ panel=create_command("LIRE_MAILLAGE",panel)
+ command=panel.node
+ panel=nomme_concept("MAILLA2",panel)
+ panel=select_node(command)
+ panel=create_mocle("UNITE",panel)
+ panel=set_valeur("P4[1]",panel)
+ command.collapse()
+ panel=select_node(command)
+ #FORMULE
+ panel=create_formule("az","a,z","a+z",panel)
+ #commande AFFE_MODELE
+ panel=create_command("AFFE_MODELE",panel)
+ command=panel.node
+ select_child("MAILLAGE",command)
+ panel=select_node(command)
+ panel=create_mocle("AFFE",panel)
+ parent=panel.node
+ panel=select_child("PHENOMENE",parent)
+ choose_valeur("MECANIQUE",panel)
+ panel=select_child("b_mecanique",parent)
+ panel=select_child("MODELISATION",panel.node)
+ add_valeur_into("3D",panel)
+ add_valeur_into("3D_FLUIDE",panel)
+ valider_valeur(panel)
+ panel=select_node(parent)
+ panel=create_mocle("TOUT",panel)
+ choose_valeur("OUI",panel)
+ panel=select_node(command)
+ panel=nomme_concept("MO",panel)
+ command.collapse()
+ #fin commande AFFE_MODELE
+ panel=copier_coller()
+ command=panel.node
+ panel=create_mocle("AFFE",panel)
+ panel=select_node(command)
+ panel=create_mocle("AFFE",panel)
+ panel=select_mcf("AFFE",1,command)
+ parent=panel.node
+ panel=create_mocle("GROUP_NO",panel)
+ add_valeur("'GNP3','GNP5','GNP6','GNP7','GNP8','GNP9','GNP10','GNP11','GNP12'",panel)
+ valider_valeur(panel)
+ panel=select_child("PHENOMENE",parent)
+ choose_valeur("ACOUSTIQUE",panel)
+ panel=select_child("b_acoustique",parent)
+ panel=select_child("MODELISATION",panel.node)
+ add_valeur_into("PLAN",panel)
+ valider_valeur(panel)
+
+ panel=select_mcf("AFFE",2,command)
+ parent=panel.node
+ panel=create_mocle("GROUP_MA",panel)
+ add_valeur("MASSES",panel)
+ valider_valeur(panel)
+ panel=select_child("PHENOMENE",parent)
+ choose_valeur("THERMIQUE",panel)
+ panel=select_child("b_thermique",parent)
+ panel=select_child("MODELISATION",panel.node)
+ add_valeur_into("COQUE",panel)
+ valider_valeur(panel)
+
+ panel=select_node(command)
+ panel=nomme_concept("AFFE1",panel)
+ command.collapse()
+ #fin commande AFFE_MODELE
+ #commande AFFE_CARA_ELEM
+ panel=create_command("AFFE_CARA_ELEM",panel)
+ command=panel.node
+ panel=select_node(command)
+ panel=create_mocle("POUTRE",panel)
+ parent=panel.node
+ panel=select_child("SECTION",parent)
+ choose_valeur("CERCLE",panel)
+ panel=select_child("b_cercle",parent)
+ panel=select_child("b_constant",panel.node)
+ p=panel.node
+ panel=select_child("CARA",p)
+ add_valeur_into("R",panel)
+ add_valeur_into("EP",panel)
+ valider_valeur(panel)
+ panel=select_child("VALE",p)
+ add_valeur("1,2",panel)
+ valider_valeur(panel)
+ panel=select_node(parent)
+ panel=create_mocle("GROUP_MA",panel)
+ add_valeur("GR1,GR2",panel)
+ valider_valeur(panel)
+ panel=select_child("MODELE",command)
+ choose_assd("MO",panel)
+ panel=select_node(command)
+ panel=nomme_concept("CARA",panel)
+ command.collapse()
+ #fin commande AFFE_CARA_ELEM
+ panel=create_command("DEFI_FONCTION",panel)
+ command=panel.node
+ panel=create_mocle("VALE",panel)
+ add_valeur("5.0,3.0",panel)
+ add_valeur("P4[1],P3",panel)
+ valider_valeur(panel)
+ panel=select_child("NOM_PARA",command)
+ add_valeur("DX",panel)
+ panel=select_node(command)
+ panel=nomme_concept("F1",panel)
+ command.collapse()
+ #fin DEFI_FONCTION
+ panel=create_command("DEFI_FONCTION",panel)
+ command=panel.node
+ panel=create_mocle("VALE_C",panel)
+ add_valeur("5.0,7.0,9.0",panel)
+ add_valeur("9.0,8.0,7.0",panel)
+ valider_valeur(panel)
+ panel=select_child("NOM_PARA",command)
+ add_valeur("DRX",panel)
+ panel=select_node(command)
+ panel=nomme_concept("F3",panel)
+ command.collapse()
+ #fin DEFI_FONCTION
+#MATER2=DEFI_MATERIAU(ELAS=_F(E=100000000000.0,
+# NU=0.0,),
+# ECRO_ASYM_LINE=_F(DC_SIGM_EPSI=0.0,
+# SY_C=200000000.0,
+# DT_SIGM_EPSI=0.0,
+# SY_T=50000000.0,),);
+
+ panel=create_command("DEFI_MATERIAU",panel)
+ command=panel.node
+ panel=create_mocle("ELAS",panel)
+ p=panel.node
+ panel=select_child("E",p)
+ set_valeur("100000000000.0",panel)
+ panel=select_child("NU",p)
+ set_valeur("0.0",panel)
+ panel=select_node(command)
+ panel=create_mocle("ECRO_ASYM_LINE",panel)
+ p=panel.node
+ panel=select_child("DC_SIGM_EPSI",p)
+ set_valeur("0.0",panel)
+ panel=select_child("SY_C",p)
+ set_valeur("200000000.0",panel)
+ panel=select_child("DT_SIGM_EPSI",p)
+ set_valeur("0.0",panel)
+ panel=select_child("SY_T",p)
+ set_valeur("50000000.0",panel)
+ panel=select_node(command)
+ panel=nomme_concept("MATER2",panel)
+ command.collapse()
+ #fin DEFI_MATERIAU
+ #PS1=DEFI_PARA_SENSI(VALE=1.0,);
+ #PS2=DEFI_PARA_SENSI(VALE=1.0,);
+ #PS3=DEFI_PARA_SENSI(VALE=1.0,);
+ panel=create_command("DEFI_PARA_SENSI",panel)
+ command=panel.node
+ panel=select_child("VALE",command)
+ set_valeur("1.0",panel)
+ panel=select_node(command)
+ panel=nomme_concept("PS1",panel)
+ command.collapse()
+ panel=create_command("DEFI_PARA_SENSI",panel)
+ command=panel.node
+ panel=select_child("VALE",command)
+ set_valeur("1.0",panel)
+ panel=select_node(command)
+ panel=nomme_concept("PS2",panel)
+ command.collapse()
+ panel=create_command("DEFI_PARA_SENSI",panel)
+ command=panel.node
+ panel=select_child("VALE",command)
+ set_valeur("1.0",panel)
+ panel=select_node(command)
+ panel=nomme_concept("PS3",panel)
+ command.collapse()
+#CHMAT2=AFFE_MATERIAU(MAILLAGE=MAIL,
+# AFFE=_F(TOUT='OUI',
+# MATER=MATER2,),);
+ panel=create_command("AFFE_MATERIAU",panel)
+ command=panel.node
+ panel=select_child("MAILLAGE",command)
+ panel=select_child("AFFE",command)
+ affe=panel.node
+ panel=create_mocle("TOUT",panel)
+ choose_valeur("OUI",panel)
+ panel=select_child("MATER",affe)
+ add_valeur_into("MATER2",panel)
+ valider_valeur(panel)
+ panel=select_node(command)
+ panel=nomme_concept("CHMAT2",panel)
+ command.collapse()
+#AAAZ=AFFE_CHAR_THER(MODELE=AFFE1,
+# TEMP_IMPO=_F(TOUT='OUI',
+# TEMP=0.0,),);
+ panel=create_command("AFFE_CHAR_THER",panel)
+ command=panel.node
+ panel=create_mocle("TEMP_IMPO",panel)
+ temp=panel.node
+ panel=create_mocle("TOUT",panel)
+ choose_valeur("OUI",panel)
+ panel=select_node(temp)
+ panel=create_mocle("TEMP",panel)
+ panel=set_valeur("0.0",panel)
+ panel=select_child("MODELE",command)
+ choose_assd("AFFE1",panel)
+ panel=select_node(command)
+ panel=nomme_concept("AAAZ",panel)
+ command.collapse()
+#TH1=THER_LINEAIRE(MODELE=AFFE1,
+# CHAM_MATER=CHMAT2,
+# EXCIT=_F(CHARGE=AAAZ,),
+# SENSIBILITE=(PS1,PS2,),);
+ panel=create_command("THER_LINEAIRE",panel)
+ command=panel.node
+ panel=select_child("MODELE",command)
+ choose_assd("AFFE1",panel)
+ panel=select_child("CHAM_MATER",command)
+ panel=select_child("EXCIT",command)
+ panel=select_child("CHARGE",panel.node)
+ panel=select_node(command)
+ panel=create_mocle("SENSIBILITE",panel)
+ add_valeur_into("PS1",panel)
+ add_valeur_into("PS2",panel)
+ valider_valeur(panel)
+ panel=select_node(command)
+ panel=nomme_concept("TH1",panel)
+ command.collapse()
+#ACA1=AFFE_CHAR_ACOU(MODELE=AFFE1,
+# PRES_IMPO=_F(TOUT='OUI',
+# PRES=('RI',3.0,3.0,),),);
+ panel=create_command("AFFE_CHAR_ACOU",panel)
+ command=panel.node
+ panel=create_mocle("PRES_IMPO",panel)
+ pres=panel.node
+ panel=create_mocle("TOUT",panel)
+ choose_valeur("OUI",panel)
+ panel=select_child("MODELE",command)
+ choose_assd("AFFE1",panel)
+ panel=select_child("PRES",pres)
+ set_complexe("'RI',3.0,3.0",panel)
+ panel=select_node(command)
+ panel=nomme_concept("ACA1",panel)
+ command.collapse()
+#MACRO_MATR_ASSE(MODELE=AFFE1,
+# NUME_DDL=CO('DDL1'),
+# MATR_ASSE=_F(MATRICE=CO('MAT1'),
+# OPTION='RIGI_THER',),);
+ panel=create_command("MACRO_MATR_ASSE",panel)
+ command=panel.node
+ panel=select_child("NUME_DDL",command)
+ set_sdco("DDL1",panel)
+ panel=select_child("MODELE",command)
+ choose_assd("AFFE1",panel)
+ panel=select_child("MATR_ASSE",command)
+ matr=panel.node
+ panel=select_child("OPTION",matr)
+ choose_valeur("RIGI_THER",panel)
+ panel=select_child("MATRICE",matr)
+ set_sdco("MAT1",panel)
+ panel=select_node(command)
+ command.collapse()
+#MACRO_MATR_ASSE(MODELE=AFFE1,
+# NUME_DDL=DDL1,
+# MATR_ASSE=_F(MATRICE=MAT1,
+# OPTION='RIGI_THER',),);
+ panel=create_command("MACRO_MATR_ASSE",panel)
+ command=panel.node
+ panel=select_child("NUME_DDL",command)
+ choose_sdco("DDL1",panel)
+ panel=select_child("MODELE",command)
+ choose_assd("AFFE1",panel)
+ panel=select_child("MATR_ASSE",command)
+ matr=panel.node
+ panel=select_child("OPTION",matr)
+ choose_valeur("RIGI_THER",panel)
+ panel=select_child("MATRICE",matr)
+ set_sdco("MAT2",panel)
+ panel=select_node(command)
+ command.collapse()
+
+ assert j.isvalid(),j.report()
--- /dev/null
+# -*- coding: utf-8 -*-
+# Modules Python
+import os
+import unittest
+import difflib
+import compare
+import sys
+import Tkinter
+
+# Modules Eficas
+import prefs
+from Editeur import session
+from InterfaceTK import eficas_go,splash,eficas,images
+from common import *
+
+
+class TestCase(unittest.TestCase):
+ def setUp(self):
+ self.root = Tkinter.Tk()
+ images.update_cache()
+ # Analyse des arguments de la ligne de commande
+ options=session.parse([])
+ options.cata="v7"
+ pass
+
+ def tearDown(self):
+ self.root.destroy()
+ init_common(None,None)
+ pass
+
+ def test000(self):
+ root=self.root
+ code="ASTER"
+ splash.init_splash(root,code=code,titre="Lancement d'EFICAS pour %s" %code)
+ splash._splash.configure(text="Chargement d'EFICAS en cours.\n Veuillez patienter ...")
+ app=eficas.EFICAS(root,code=code)
+ j=app.bureau.newJDC()
+ jdcdisplay=app.bureau.JDCDisplay_courant
+ init_common(root,jdcdisplay)
+
+ # commande DEBUT
+ co=j.addentite("DEBUT",0)
+ # commande FIN
+ co=j.addentite("FIN",1)
+
+ jdctree=jdcdisplay.tree.tree.children[0]
+ panel=select_child("DEBUT",jdctree)
+ panel=create_command("LIRE_MAILLAGE",panel)
+ panel=nomme_concept("MA",panel)
+
+ panel=create_command("AFFE_MODELE",panel)
+ command=panel.node
+ select_child("MAILLAGE",command)
+ panel=select_node(command)
+ panel=create_mocle("AFFE",panel)
+ parent=panel.node
+ panel=select_child("PHENOMENE",parent)
+ choose_valeur("MECANIQUE",panel)
+ panel=select_child("b_mecanique",parent)
+ panel=select_child("MODELISATION",panel.node)
+ add_valeur_into("3D",panel)
+ add_valeur_into("3D_FLUIDE",panel)
+ valider_valeur(panel)
+ panel=select_node(parent)
+ panel=create_mocle("TOUT",panel)
+ choose_valeur("OUI",panel)
+ panel=select_node(command)
+ panel=nomme_concept("MO",panel)
+
+ assert j.isvalid(),j.report()
--- /dev/null
+# -*- coding: utf-8 -*-
+# Modules Python
+import os
+import unittest
+import difflib
+import compare
+import sys
+import Tkinter
+
+# Modules Eficas
+import prefs
+from Editeur import session
+from InterfaceTK import eficas_go,splash,eficas,images
+from common import *
+
+
+class TestCase(unittest.TestCase):
+ def setUp(self):
+ self.root = Tkinter.Tk()
+ images.update_cache()
+ # Analyse des arguments de la ligne de commande
+ options=session.parse([])
+ options.cata="v7"
+ pass
+
+ def tearDown(self):
+ self.root.destroy()
+ init_common(None,None)
+ pass
+
+ def test000(self):
+ root=self.root
+ code="ASTER"
+ splash.init_splash(root,code=code,titre="Lancement d'EFICAS pour %s" %code)
+ splash._splash.configure(text="Chargement d'EFICAS en cours.\n Veuillez patienter ...")
+ app=eficas.EFICAS(root,code=code)
+ file=os.path.join(prefs.INSTALLDIR,"Tests/testelem/az.comm")
+ j=app.bureau.openJDC(file=file)
+ jdcdisplay=app.bureau.JDCDisplay_courant
+ init_common(root,jdcdisplay)
+ jdctree=jdcdisplay.tree.tree.children[0]
+ #commentariser commande MACRO_MATR_ASSE
+ panel=select_child("MACRO_MATR_ASSE",jdctree)
+ panel=comment_command(panel)
+ #decommentariser commande MACRO_MATR_ASSE
+ panel=uncomment_command(panel)
+ #creation commande commentée
+ panel=create_command("LIRE_MAILLAGE",panel)
+ panel=comment_command(panel)
+ panel=change_commandcomm("mm=LIRE_MAILLAGE(INFO=2,UNITE=21)",panel)
+ panel=uncomment_command(panel)
+ panel=select_child("DEFI_FONCTION",jdctree)
+ delete_node(panel)
+
+ assert j.isvalid(),j.report()
--- /dev/null
+# -*- coding: utf-8 -*-
+
+from tkMessageBox import showinfo
+root=None
+jdcdisplay=None
+
+class UnKnownNode(Exception):pass
+
+def pause():
+ if 1:
+ showinfo("Pause","Pause")
+
+def init_common(r,j):
+ global root,jdcdisplay
+ root=r
+ jdcdisplay=j
+
+def KP_return():
+ root.event_generate("<Return>")
+ root.update()
+
+def delete_node(panel):
+ panel.node.delete()
+
+def uncomment_command(panel):
+ panel.bouton_unc.invoke()
+ root.update()
+ panel=jdcdisplay.panel_courant
+ return panel
+
+def comment_command(panel):
+ panel.nb.selectpage('Commentaire')
+ panel.comment_commande()
+ root.update()
+ panel=jdcdisplay.panel_courant
+ return panel
+
+def create_mocle(nom,panel):
+ panel.nb.selectpage('Mocles')
+ panel.Liste.afficheMot(nom)
+ root.update()
+ label=panel.Liste.dico_labels[nom]
+ label.event_generate("<Enter>")
+ root.event_generate("<KeyPress-Return>")
+ root.update()
+ return jdcdisplay.panel_courant
+
+def change_commandcomm(text,panel):
+ panel.widget_text.setvalue(text)
+ root.update()
+ panel.bouton_val.invoke()
+ return panel
+
+def create_command(nom,panel):
+ panel.nb.selectpage('Commande')
+ root.update()
+ panel.command_entry.setentry(nom)
+ panel.command_entry.component('entry').focus_set()
+ root.event_generate("<Return>")
+ root.update()
+ label=panel.liste_command.dico_labels[nom]
+ label.event_generate("<Enter>")
+ label.event_generate("<Return>")
+ root.update()
+ panel=jdcdisplay.panel_courant
+ return panel
+
+def create_comment(text,panel):
+ panel.nb.selectpage('Commentaire')
+ panel.ajout_commentaire()
+ root.update()
+ panel=jdcdisplay.panel_courant
+ panel.widget_text.setvalue(text)
+ root.update()
+ panel.bouton_val.invoke()
+ #panel.change_valeur()
+ return panel
+
+def create_param(nom,valeur,panel):
+ panel.nb.selectpage('Commentaire')
+ panel.ajout_parametre()
+ root.update()
+ panel=jdcdisplay.panel_courant
+ if nom:
+ panel.entry_nom.delete(0,"end")
+ panel.entry_nom.insert(0,nom)
+ panel.entry_nom.event_generate("<Return>")
+ panel.entry_val.delete(0,"end")
+ panel.entry_val.insert(0,valeur)
+ panel.entry_val.event_generate("<Return>")
+ panel.bouton_val.invoke()
+ root.update()
+ return panel
+
+def create_formule(nom,args,expr,panel):
+ panel=create_command("FORMULE",panel)
+ panel.entry_nom.delete(0,"end")
+ panel.entry_nom.insert(0,nom)
+ panel.entry_nom.event_generate("<Return>")
+ panel.entry_arg.delete(0,"end")
+ panel.entry_arg.insert(0,args)
+ panel.entry_arg.event_generate("<Return>")
+ panel.entry_exp.delete(0,"end")
+ panel.entry_exp.insert(0,expr)
+ panel.entry_exp.event_generate("<Return>")
+ panel.bouton_val.invoke()
+ root.update()
+ return panel
+
+def nomme_concept(nom,panel):
+ panel.nb.selectpage('Concept')
+ root.update()
+ panel._any.delete(0,"end")
+ panel._any.insert(0,nom)
+ panel.but_ok.invoke()
+ root.update()
+ return jdcdisplay.panel_courant
+
+def select_mcf(nom,ind,node):
+ panel=select_child(nom,node)
+ parent=panel.node
+ parent.expand()
+ parent.select_next(ind)
+ panel=jdcdisplay.panel_courant
+ panel.node.expand()
+ return panel
+
+def select_child(nom,node):
+ """node est le parent dont on veut le fils nom"""
+ for n in node.children:
+ if n.item.nom == nom:
+ n.select()
+ root.update()
+ panel= jdcdisplay.panel_courant
+ panel.node.expand()
+ return panel
+ raise UnKnownNode(nom)
+
+def select_node(node):
+ node.select()
+ node.expand()
+ root.update()
+ return jdcdisplay.panel_courant
+
+def choose_valeur(valeur,panel):
+ panel.Liste_choix.afficheMot(valeur)
+ root.update()
+ label=panel.Liste_choix.dico_labels[valeur]
+ label.event_generate("<Button-1>")
+ label.event_generate("<Return>")
+ root.update()
+
+def choose_sdco(valeur,panel):
+ i = list(panel.listbox.get(0, 'end')).index(valeur)
+ panel.listbox.component("listbox").selection_set(i)
+ panel.listbox.component("listbox").focus_set()
+ panel.listbox.component("listbox").event_generate("<Return>")
+ root.update()
+
+def choose_assd(valeur,panel):
+ i = list(panel.listbox.get(0, 'end')).index(valeur)
+ panel.listbox.component("listbox").selection_set(i)
+ panel.but_val.invoke()
+ root.update()
+
+def set_valeur(valeur,panel):
+ panel.entry.delete(0,"end")
+ panel.entry.insert(0,valeur)
+ panel.entry.event_generate("<Return>")
+ root.update()
+
+def set_sdco(valeur,panel):
+ panel.b_co.invoke('OUI')
+ root.update()
+ panel.entry_co.delete(0,"end")
+ panel.entry_co.insert(0,valeur)
+ panel.entry_co.event_generate("<Return>")
+ root.update()
+
+def set_complexe(valeur,panel):
+ panel.entry3.setentry(valeur)
+ panel.entry3.component('entry').focus_set()
+ panel.entry3.event_generate("<Return>")
+ root.update()
+
+def add_valeur_into(valeur,panel):
+ label=panel.Liste_choix.dico_labels[valeur]
+ panel.Liste_choix.afficheMot(valeur)
+ root.update()
+ label.event_generate("<1>")
+ panel.bouton_add.invoke()
+ root.update()
+
+def add_valeur(valeur,panel):
+ panel.entry.delete(0,"end")
+ panel.entry.insert(0,valeur)
+ panel.entry.event_generate("<Return>")
+ root.update()
+
+def valider_valeur(panel):
+ panel.bouton_accepter.invoke()
+ root.update()
+
+def copier_coller():
+ root.event_generate("<Control-c>")
+ root.event_generate("<Control-v>")
+ root.update()
+ return jdcdisplay.panel_courant
+
--- /dev/null
+# -*- coding: utf-8 -*-
+# Modules Python
+import os
+import unittest
+import difflib
+import compare
+import sys
+import Tkinter
+
+# Modules Eficas
+import prefs
+from Editeur import session
+from InterfaceTK import eficas_go,splash,eficas,images
+from common import *
+
+version='v9'
+
+class TestCase(unittest.TestCase):
+ def setUp(self):
+ self.root = Tkinter.Tk()
+ images.update_cache()
+ # Analyse des arguments de la ligne de commande
+ options=session.parse([])
+ options.cata=version
+ pass
+
+ def tearDown(self):
+ self.root.destroy()
+ init_common(None,None)
+ pass
+
+ def test000(self):
+ root=self.root
+ code="ASTER"
+ splash.init_splash(root,code=code,titre="Lancement d'EFICAS pour %s" %code)
+ splash._splash.configure(text="Chargement d'EFICAS en cours.\n Veuillez patienter ...")
+ app=eficas.EFICAS(root,code=code)
+ j=app.bureau.newJDC()
+ jdcdisplay=app.bureau.JDCDisplay_courant
+ init_common(root,jdcdisplay)
+
+ # commande DEBUT
+ co=j.addentite("DEBUT",0)
+ # commande FIN
+ co=j.addentite("FIN",1)
+
+ jdctree=jdcdisplay.tree.tree.children[0]
+ panel=select_child("DEBUT",jdctree)
+
+ panel=create_param("P1",9.8,panel)
+ panel=create_param("P2",8.8,panel)
+ panel=create_param("P3",7,panel)
+ panel=create_param("P4","[2,3,4]",panel)
+ panel=create_param("P5","P3*P1",panel)
+ panel=create_param(None,"P1-3",panel)
+ panel=create_comment("Pas trouve shellpanel",panel)
+
+ #commnde LIRE_MAILLAGE
+ panel=create_command("LIRE_MAILLAGE",panel)
+ command=panel.node
+ panel=nomme_concept("MAILLA2",panel)
+ panel=select_node(command)
+ panel=create_mocle("UNITE",panel)
+ panel=set_valeur("P4[1]",panel)
+ command.collapse()
+ panel=select_node(command)
+ #FORMULE
+ panel=create_formule("az","a,z","a+z",panel)
+ #commande AFFE_MODELE
+ panel=create_command("AFFE_MODELE",panel)
+ command=panel.node
+ select_child("MAILLAGE",command)
+ panel=select_node(command)
+ panel=create_mocle("AFFE",panel)
+ parent=panel.node
+ panel=select_child("PHENOMENE",parent)
+ choose_valeur("MECANIQUE",panel)
+ panel=select_child("b_mecanique",parent)
+ panel=select_child("MODELISATION",panel.node)
+ add_valeur_into("3D",panel)
+ add_valeur_into("3D_FLUIDE",panel)
+ valider_valeur(panel)
+ panel=select_node(parent)
+ panel=create_mocle("TOUT",panel)
+ choose_valeur("OUI",panel)
+ panel=select_node(command)
+ panel=nomme_concept("MO",panel)
+ command.collapse()
+ #fin commande AFFE_MODELE
+ panel=copier_coller()
+ command=panel.node
+ panel=create_mocle("AFFE",panel)
+ panel=select_node(command)
+ panel=create_mocle("AFFE",panel)
+ panel=select_mcf("AFFE",1,command)
+ parent=panel.node
+ panel=create_mocle("GROUP_NO",panel)
+ add_valeur("'GNP3','GNP5','GNP6','GNP7','GNP8','GNP9','GNP10','GNP11','GNP12'",panel)
+ valider_valeur(panel)
+ panel=select_child("PHENOMENE",parent)
+ choose_valeur("ACOUSTIQUE",panel)
+ panel=select_child("b_acoustique",parent)
+ panel=select_child("MODELISATION",panel.node)
+ add_valeur_into("PLAN",panel)
+ valider_valeur(panel)
+
+ panel=select_mcf("AFFE",2,command)
+ parent=panel.node
+ panel=create_mocle("GROUP_MA",panel)
+ add_valeur("MASSES",panel)
+ valider_valeur(panel)
+ panel=select_child("PHENOMENE",parent)
+ choose_valeur("THERMIQUE",panel)
+ panel=select_child("b_thermique",parent)
+ panel=select_child("MODELISATION",panel.node)
+ add_valeur_into("COQUE",panel)
+ valider_valeur(panel)
+
+ panel=select_node(command)
+ panel=nomme_concept("AFFE1",panel)
+ command.collapse()
+ #fin commande AFFE_MODELE
+ #commande AFFE_CARA_ELEM
+ panel=create_command("AFFE_CARA_ELEM",panel)
+ command=panel.node
+ panel=select_node(command)
+ panel=create_mocle("POUTRE",panel)
+ parent=panel.node
+ panel=select_child("SECTION",parent)
+ choose_valeur("CERCLE",panel)
+ panel=select_child("b_cercle",parent)
+ panel=select_child("b_constant",panel.node)
+ p=panel.node
+ panel=select_child("CARA",p)
+ add_valeur_into("R",panel)
+ add_valeur_into("EP",panel)
+ valider_valeur(panel)
+ panel=select_child("VALE",p)
+ add_valeur("1,2",panel)
+ valider_valeur(panel)
+ panel=select_node(parent)
+ panel=create_mocle("GROUP_MA",panel)
+ add_valeur("GR1,GR2",panel)
+ valider_valeur(panel)
+ panel=select_child("MODELE",command)
+ choose_assd("MO",panel)
+ panel=select_node(command)
+ panel=nomme_concept("CARA",panel)
+ command.collapse()
+ #fin commande AFFE_CARA_ELEM
+ panel=create_command("DEFI_FONCTION",panel)
+ command=panel.node
+ panel=create_mocle("VALE",panel)
+ add_valeur("5.0,3.0",panel)
+ add_valeur("P4[1],P3",panel)
+ valider_valeur(panel)
+ panel=select_child("NOM_PARA",command)
+ choose_valeur("DX",panel)
+ panel=select_node(command)
+ panel=nomme_concept("F1",panel)
+ command.collapse()
+ #fin DEFI_FONCTION
+ panel=create_command("DEFI_FONCTION",panel)
+ command=panel.node
+ panel=create_mocle("VALE_C",panel)
+ add_valeur("5.0,7.0,9.0",panel)
+ add_valeur("9.0,8.0,7.0",panel)
+ valider_valeur(panel)
+ panel=select_child("NOM_PARA",command)
+ choose_valeur("DRX",panel)
+ panel=select_node(command)
+ panel=nomme_concept("F3",panel)
+ command.collapse()
+ #fin DEFI_FONCTION
+#MATER2=DEFI_MATERIAU(ELAS=_F(E=100000000000.0,
+# NU=0.0,),
+# ECRO_ASYM_LINE=_F(DC_SIGM_EPSI=0.0,
+# SY_C=200000000.0,
+# DT_SIGM_EPSI=0.0,
+# SY_T=50000000.0,),);
+
+ panel=create_command("DEFI_MATERIAU",panel)
+ command=panel.node
+ panel=create_mocle("ELAS",panel)
+ p=panel.node
+ panel=select_child("E",p)
+ set_valeur("100000000000.0",panel)
+ panel=select_child("NU",p)
+ set_valeur("0.0",panel)
+ panel=select_node(command)
+ panel=create_mocle("ECRO_ASYM_LINE",panel)
+ p=panel.node
+ panel=select_child("DC_SIGM_EPSI",p)
+ set_valeur("0.0",panel)
+ panel=select_child("SY_C",p)
+ set_valeur("200000000.0",panel)
+ panel=select_child("DT_SIGM_EPSI",p)
+ set_valeur("0.0",panel)
+ panel=select_child("SY_T",p)
+ set_valeur("50000000.0",panel)
+ panel=select_node(command)
+ panel=nomme_concept("MATER2",panel)
+ command.collapse()
+ #fin DEFI_MATERIAU
+ #PS1=DEFI_PARA_SENSI(VALE=1.0,);
+ #PS2=DEFI_PARA_SENSI(VALE=1.0,);
+ #PS3=DEFI_PARA_SENSI(VALE=1.0,);
+ panel=create_command("DEFI_PARA_SENSI",panel)
+ command=panel.node
+ panel=select_child("VALE",command)
+ set_valeur("1.0",panel)
+ panel=select_node(command)
+ panel=nomme_concept("PS1",panel)
+ command.collapse()
+ panel=create_command("DEFI_PARA_SENSI",panel)
+ command=panel.node
+ panel=select_child("VALE",command)
+ set_valeur("1.0",panel)
+ panel=select_node(command)
+ panel=nomme_concept("PS2",panel)
+ command.collapse()
+ panel=create_command("DEFI_PARA_SENSI",panel)
+ command=panel.node
+ panel=select_child("VALE",command)
+ set_valeur("1.0",panel)
+ panel=select_node(command)
+ panel=nomme_concept("PS3",panel)
+ command.collapse()
+#CHMAT2=AFFE_MATERIAU(MAILLAGE=MAIL,
+# AFFE=_F(TOUT='OUI',
+# MATER=MATER2,),);
+ panel=create_command("AFFE_MATERIAU",panel)
+ command=panel.node
+ panel=select_child("MAILLAGE",command)
+ panel=select_child("AFFE",command)
+ affe=panel.node
+ panel=create_mocle("TOUT",panel)
+ choose_valeur("OUI",panel)
+ panel=select_child("MATER",affe)
+ add_valeur_into("MATER2",panel)
+ valider_valeur(panel)
+ panel=select_node(command)
+ panel=nomme_concept("CHMAT2",panel)
+ command.collapse()
+#AAAZ=AFFE_CHAR_THER(MODELE=AFFE1,
+# TEMP_IMPO=_F(TOUT='OUI',
+# TEMP=0.0,),);
+ panel=create_command("AFFE_CHAR_THER",panel)
+ command=panel.node
+ panel=create_mocle("TEMP_IMPO",panel)
+ temp=panel.node
+ panel=create_mocle("TOUT",panel)
+ choose_valeur("OUI",panel)
+ panel=select_node(temp)
+ panel=create_mocle("TEMP",panel)
+ panel=set_valeur("0.0",panel)
+ panel=select_child("MODELE",command)
+ choose_assd("AFFE1",panel)
+ panel=select_node(command)
+ panel=nomme_concept("AAAZ",panel)
+ command.collapse()
+#TH1=THER_LINEAIRE(MODELE=AFFE1,
+# CHAM_MATER=CHMAT2,
+# EXCIT=_F(CHARGE=AAAZ,),
+# SENSIBILITE=(PS1,PS2,),);
+ panel=create_command("THER_LINEAIRE",panel)
+ command=panel.node
+ panel=select_child("MODELE",command)
+ choose_assd("AFFE1",panel)
+ panel=select_child("CHAM_MATER",command)
+ panel=select_child("EXCIT",command)
+ panel=select_child("CHARGE",panel.node)
+ panel=select_node(command)
+ panel=create_mocle("SENSIBILITE",panel)
+ add_valeur_into("PS1",panel)
+ add_valeur_into("PS2",panel)
+ valider_valeur(panel)
+ panel=select_node(command)
+ panel=nomme_concept("TH1",panel)
+ command.collapse()
+#ACA1=AFFE_CHAR_ACOU(MODELE=AFFE1,
+# PRES_IMPO=_F(TOUT='OUI',
+# PRES=('RI',3.0,3.0,),),);
+ panel=create_command("AFFE_CHAR_ACOU",panel)
+ command=panel.node
+ panel=create_mocle("PRES_IMPO",panel)
+ pres=panel.node
+ panel=create_mocle("TOUT",panel)
+ choose_valeur("OUI",panel)
+ panel=select_child("MODELE",command)
+ choose_assd("AFFE1",panel)
+ panel=select_child("PRES",pres)
+ set_complexe("'RI',3.0,3.0",panel)
+ panel=select_node(command)
+ panel=nomme_concept("ACA1",panel)
+ command.collapse()
+#MACRO_MATR_ASSE(MODELE=AFFE1,
+# NUME_DDL=CO('DDL1'),
+# MATR_ASSE=_F(MATRICE=CO('MAT1'),
+# OPTION='RIGI_THER',),);
+ panel=create_command("MACRO_MATR_ASSE",panel)
+ command=panel.node
+ panel=select_child("NUME_DDL",command)
+ set_sdco("DDL1",panel)
+ panel=select_child("MODELE",command)
+ choose_assd("AFFE1",panel)
+ panel=select_child("MATR_ASSE",command)
+ matr=panel.node
+ panel=select_child("OPTION",matr)
+ choose_valeur("RIGI_THER",panel)
+ panel=select_child("MATRICE",matr)
+ set_sdco("MAT1",panel)
+ panel=select_node(command)
+ command.collapse()
+#MACRO_MATR_ASSE(MODELE=AFFE1,
+# NUME_DDL=DDL1,
+# MATR_ASSE=_F(MATRICE=MAT1,
+# OPTION='RIGI_THER',),);
+ panel=create_command("MACRO_MATR_ASSE",panel)
+ command=panel.node
+ panel=select_child("NUME_DDL",command)
+ choose_sdco("DDL1",panel)
+ panel=select_child("MODELE",command)
+ choose_assd("AFFE1",panel)
+ panel=select_child("MATR_ASSE",command)
+ matr=panel.node
+ panel=select_child("OPTION",matr)
+ choose_valeur("RIGI_THER",panel)
+ panel=select_child("MATRICE",matr)
+ set_sdco("MAT2",panel)
+ panel=select_node(command)
+ command.collapse()
+
+ assert j.isvalid(),j.report()
--- /dev/null
+# -*- coding: utf-8 -*-
+# Modules Python
+import os
+import unittest
+import difflib
+import compare
+import sys
+import Tkinter
+
+# Modules Eficas
+import prefs
+from Editeur import session
+from InterfaceTK import eficas_go,splash,eficas,images
+from common import *
+
+
+class TestCase(unittest.TestCase):
+ def setUp(self):
+ self.root = Tkinter.Tk()
+ images.update_cache()
+ # Analyse des arguments de la ligne de commande
+ options=session.parse([])
+ options.cata="v9"
+ pass
+
+ def tearDown(self):
+ self.root.destroy()
+ init_common(None,None)
+ pass
+
+ def test000(self):
+ root=self.root
+ code="ASTER"
+ splash.init_splash(root,code=code,titre="Lancement d'EFICAS pour %s" %code)
+ splash._splash.configure(text="Chargement d'EFICAS en cours.\n Veuillez patienter ...")
+ app=eficas.EFICAS(root,code=code)
+ j=app.bureau.newJDC()
+ jdcdisplay=app.bureau.JDCDisplay_courant
+ init_common(root,jdcdisplay)
+
+ # commande DEBUT
+ co=j.addentite("DEBUT",0)
+ # commande FIN
+ co=j.addentite("FIN",1)
+
+ jdctree=jdcdisplay.tree.tree.children[0]
+ panel=select_child("DEBUT",jdctree)
+ panel=create_command("LIRE_MAILLAGE",panel)
+ panel=nomme_concept("MA",panel)
+
+ panel=create_command("AFFE_MODELE",panel)
+ command=panel.node
+ select_child("MAILLAGE",command)
+ panel=select_node(command)
+ panel=create_mocle("AFFE",panel)
+ parent=panel.node
+ panel=select_child("PHENOMENE",parent)
+ choose_valeur("MECANIQUE",panel)
+ panel=select_child("b_mecanique",parent)
+ panel=select_child("MODELISATION",panel.node)
+ add_valeur_into("3D",panel)
+ add_valeur_into("3D_FLUIDE",panel)
+ valider_valeur(panel)
+ panel=select_node(parent)
+ panel=create_mocle("TOUT",panel)
+ choose_valeur("OUI",panel)
+ panel=select_node(command)
+ panel=nomme_concept("MO",panel)
+
+ assert j.isvalid(),j.report()
--- /dev/null
+# -*- coding: utf-8 -*-
+# Modules Python
+import os
+import unittest
+import difflib
+import compare
+import sys
+import Tkinter
+
+# Modules Eficas
+import prefs
+from Editeur import session
+from InterfaceTK import eficas_go,splash,eficas,images
+from common import *
+
+
+class TestCase(unittest.TestCase):
+ def setUp(self):
+ self.root = Tkinter.Tk()
+ images.update_cache()
+ # Analyse des arguments de la ligne de commande
+ options=session.parse([])
+ options.cata="petit"
+ pass
+
+ def tearDown(self):
+ self.root.destroy()
+ init_common(None,None)
+ pass
+
+ def test000(self):
+ root=self.root
+ code="ASTER"
+ splash.init_splash(root,code=code,titre="Lancement d'EFICAS pour %s" %code)
+ splash._splash.configure(text="Chargement d'EFICAS en cours.\n Veuillez patienter ...")
+ app=eficas.EFICAS(root,code=code)
+ j=app.bureau.newJDC()
+ jdcdisplay=app.bureau.JDCDisplay_courant
+ init_common(root,jdcdisplay)
+
+ # commande DEBUT
+ co=j.addentite("DEBUT",0)
+ # commande FIN
+ co=j.addentite("FIN",1)
+
+ jdctree=jdcdisplay.tree.tree.children[0]
+ panel=select_child("DEBUT",jdctree)
+ panel=create_command("TESTS_VALID",panel)
+ command=panel.node
+ panel=select_child("LongStr",command)
+ set_valeur("aaa",panel)
+ panel=select_child("ListStr",command)
+ add_valeur("aaa",panel)
+ add_valeur("bbbb,ccc",panel)
+ valider_valeur(panel)
+ panel=select_child("PairVal",command)
+ add_valeur(2,panel)
+ add_valeur("4,6",panel)
+ valider_valeur(panel)
+ panel=select_child("RangeVal",command)
+ set_valeur(4,panel)
+ panel=select_child("CardVal",command)
+ add_valeur("4,6,5,7",panel)
+ valider_valeur(panel)
+ panel=select_child("EnumVal",command)
+ choose_valeur(3,panel)
+ panel=select_child("OrdList",command)
+ add_valeur("4,6,5,7",panel)
+ valider_valeur(panel)
+ panel=select_child("OrdList2",command)
+ add_valeur_into(2,panel)
+ valider_valeur(panel)
+ panel=select_child("TypeVal",command)
+ set_valeur(5,panel)
+ panel=select_child("Compul",command)
+ add_valeur("2",panel)
+ add_valeur("1",panel)
+ valider_valeur(panel)
+ panel=select_child("CompulInto",command)
+ add_valeur_into(2,panel)
+ add_valeur_into(1,panel)
+ valider_valeur(panel)
+ panel=select_child("Norep",command)
+ add_valeur("2",panel)
+ valider_valeur(panel)
+ panel=select_child("NorepInto",command)
+ add_valeur_into(2,panel)
+ valider_valeur(panel)
+
+ panel=select_node(command)
+ panel=nomme_concept("MA",panel)
+
+ assert j.isvalid(),j.report()
--- /dev/null
+# -*- coding: utf-8 -*-
+# Modules Python
+import os
+import unittest
+import difflib
+import compare
+import sys
+import Tkinter
+
+# Modules Eficas
+import prefs
+from Editeur import session
+from InterfaceTK import eficas_go,splash,eficas,images
+from common import *
+
+
+class TestCase(unittest.TestCase):
+ def setUp(self):
+ self.root = Tkinter.Tk()
+ images.update_cache()
+ # Analyse des arguments de la ligne de commande
+ options=session.parse([])
+ options.cata="v9"
+ pass
+
+ def tearDown(self):
+ self.root.destroy()
+ init_common(None,None)
+ pass
+
+ def test000(self):
+ root=self.root
+ code="ASTER"
+ splash.init_splash(root,code=code,titre="Lancement d'EFICAS pour %s" %code)
+ splash._splash.configure(text="Chargement d'EFICAS en cours.\n Veuillez patienter ...")
+ app=eficas.EFICAS(root,code=code)
+ file=os.path.join(prefs.INSTALLDIR,"Tests/testelem/az.comm")
+ j=app.bureau.openJDC(file=file)
+ jdcdisplay=app.bureau.JDCDisplay_courant
+ init_common(root,jdcdisplay)
+ jdctree=jdcdisplay.tree.tree.children[0]
+ #commentariser commande MACRO_MATR_ASSE
+ panel=select_child("MACRO_MATR_ASSE",jdctree)
+ panel=comment_command(panel)
+ #decommentariser commande MACRO_MATR_ASSE
+ panel=uncomment_command(panel)
+ #creation commande commentée
+ panel=create_command("LIRE_MAILLAGE",panel)
+ panel=comment_command(panel)
+ panel=change_commandcomm("mm=LIRE_MAILLAGE(INFO=2,UNITE=21)",panel)
+ panel=uncomment_command(panel)
+ panel=select_child("DEFI_FONCTION",jdctree)
+ delete_node(panel)
+
+ assert j.isvalid(),j.report()
+++ /dev/null
-# -*- coding: iso-8859-1 -*-
-import re
-
-BLANKLINE_MARKER = '<BLANKLINE>'
-ELLIPSIS_MARKER = '...'
-True=1
-False=0
-
-def check(want,got):
- if got == want: return True
-
- # Replace <BLANKLINE> in want with a blank line.
- want = re.sub('(?m)^%s\s*?$' % re.escape(BLANKLINE_MARKER),
- '', want)
- # If a line in got contains only spaces, then remove the
- # spaces.
- got = re.sub('(?m)^\s*?$', '', got)
- if got == want:
- return True
-
- if _ellipsis_match(want, got):
- return True
-
- return False
-
-def _ellipsis_match(want, got):
- if ELLIPSIS_MARKER not in want:
- return want == got
-
- # Find "the real" strings.
- ws = want.split(ELLIPSIS_MARKER)
- assert len(ws) >= 2
-
- # Deal with exact matches possibly needed at one or both ends.
- startpos, endpos = 0, len(got)
- w = ws[0]
- if w: # starts with exact match
- if got.startswith(w):
- startpos = len(w)
- del ws[0]
- else:
- return False
- w = ws[-1]
- if w: # ends with exact match
- if got.endswith(w):
- endpos -= len(w)
- del ws[-1]
- else:
- return False
-
- if startpos > endpos:
- # Exact end matches required more characters than we have, as in
- # _ellipsis_match('aa...aa', 'aaa')
- return False
-
- # For the rest, we only need to find the leftmost non-overlapping
- # match for each piece. If there's no overall match that way alone,
- # there's no overall match period.
- for w in ws:
- # w may be '' at times, if there are consecutive ellipses, or
- # due to an ellipsis at the start or end of `want`. That's OK.
- # Search for an empty string succeeds, and doesn't change startpos.
- startp = got.find(w, startpos, endpos)
- if startp < 0:
- return False
- startpos = startp + len(w)
-
- return True
+++ /dev/null
-import sys
-import prefs
-ASTERDIR={
- "v7":"/local/chris/ASTER/instals/STA7/astest",
- "v8":"/local/chris/ASTER/instals/STA8/astest",
- "v9":"/local/chris/ASTER/instals/NEW9/astest",
- }
-
+++ /dev/null
-# CONFIGURATION 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
-
-import prefs
-
-rep_cata = os.path.abspath(os.path.join(prefs.repIni,'../Aster/Cata'))
-rep_Pmw = os.path.join(prefs.repIni,'../Pmw')
-
-# Accès à la documentation Aster
-path_doc = os.path.join(rep_cata,'..','Doc')
-exec_acrobat = "acroread"
-# Utilisateur/Développeur
-isdeveloppeur = "NON"
-path_cata_dev = "/tmp/cata"
-# Répertoire temporaire
-rep_travail = "/tmp"
-# Répertoire initial
-initialdir=os.curdir
-
-# Choix des catalogues
-#rep_mat=os.path.join(rep_cata,'..','materiau')
-rep_mat_v7="/local/cchris/ASTER/instals/materiaux/STA7"
-rep_mat_v8="/local/cchris/ASTER/instals/materiaux/STA8"
-rep_mat_v9="/local/cchris/ASTER/instals/materiaux/NEW9"
-
-catalogues = (
- ('ASTER','petit',os.path.join(rep_cata,'petitcata'),'python'),
- ('ASTER','v5.9',os.path.join(rep_cata,'cataSTA5'),'asterv5'),
- ('ASTER','v6.8',os.path.join(rep_cata,'cataSTA6'),'python6'),
- ('ASTER','v6',os.path.join(rep_cata,'cataSTA6'),'python6'),
- ('ASTER','v7.7',os.path.join(rep_cata,'cataSTA7'),'python'),
- ('ASTER','v7',os.path.join(rep_cata,'cataSTA7'),'python'),
- ('ASTER','v8.4',os.path.join(rep_cata,'cataSTA8'),'python'),
- ('ASTER','v8',os.path.join(rep_cata,'cataSTA8'),'python'),
- ('ASTER','v9.1',os.path.join(rep_cata,'cataSTA9'),'python'),
- ('ASTER','v9',os.path.join(rep_cata,'cataSTA9'),'python','defaut'),
- )
-
+++ /dev/null
-#!/usr/bin/env python
-# -*- coding: utf-8 -*-
-# CONFIGURATION 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.
-#
-#
-# ======================================================================
-
-"""
- Ce module sert à lancer EFICAS configuré pour Code_Aster
-"""
-# Modules Python
-
-# Modules Eficas
-import prefs
-from InterfaceTK import eficas_go
-
-eficas_go.lance_eficas()
--- /dev/null
+# -*- coding: iso-8859-1 -*-
+import re
+
+BLANKLINE_MARKER = '<BLANKLINE>'
+ELLIPSIS_MARKER = '...'
+True=1
+False=0
+
+def check(want,got):
+ if got == want: return True
+
+ # Replace <BLANKLINE> in want with a blank line.
+ want = re.sub('(?m)^%s\s*?$' % re.escape(BLANKLINE_MARKER),
+ '', want)
+ # If a line in got contains only spaces, then remove the
+ # spaces.
+ got = re.sub('(?m)^\s*?$', '', got)
+ if got == want:
+ return True
+
+ if _ellipsis_match(want, got):
+ return True
+
+ return False
+
+def _ellipsis_match(want, got):
+ if ELLIPSIS_MARKER not in want:
+ return want == got
+
+ # Find "the real" strings.
+ ws = want.split(ELLIPSIS_MARKER)
+ assert len(ws) >= 2
+
+ # Deal with exact matches possibly needed at one or both ends.
+ startpos, endpos = 0, len(got)
+ w = ws[0]
+ if w: # starts with exact match
+ if got.startswith(w):
+ startpos = len(w)
+ del ws[0]
+ else:
+ return False
+ w = ws[-1]
+ if w: # ends with exact match
+ if got.endswith(w):
+ endpos -= len(w)
+ del ws[-1]
+ else:
+ return False
+
+ if startpos > endpos:
+ # Exact end matches required more characters than we have, as in
+ # _ellipsis_match('aa...aa', 'aaa')
+ return False
+
+ # For the rest, we only need to find the leftmost non-overlapping
+ # match for each piece. If there's no overall match that way alone,
+ # there's no overall match period.
+ for w in ws:
+ # w may be '' at times, if there are consecutive ellipses, or
+ # due to an ellipsis at the start or end of `want`. That's OK.
+ # Search for an empty string succeeds, and doesn't change startpos.
+ startp = got.find(w, startpos, endpos)
+ if startp < 0:
+ return False
+ startpos = startp + len(w)
+
+ return True
+++ /dev/null
-# -*- coding: utf-8 -*-
-"""
-Pour modifier le style d'EFICAS il faut ajouter un fichier style.py qui contiendra les
-informations sur le style voulu dans son repertoire Eficas_install.
-
-La methode la plus simple consiste à modifier directement les attributs de l'objet style dans le
-fichier style.py d'Eficas_install. Exemple::
-
- style.background='yellow'
-
-pour modifier la couleur du background.
-
-Il existe une autre méthode qui peut être utilisée quand on veut modifier plusieurs propriétés à la fois.
-
-Le fichier style.py doit définir une nouvelle classe qui dérive de la classe de base STYLE avec des attributs
-de classe qui définiront le nouveau style (par exemple, si on veut modifier le background)::
-
- class STYLE(STYLE):
- background='yellow'
-
-Il faut ensuite instancier cette classe, dans ce meme fichier, en donnant le nom style à l'objet cree::
-
- style=STYLE()
-
-Tous les attributs de classe possibles sont visibles dans le module Editeur/basestyle.py::
-
- background='gray90'
- foreground='black'
- entry_background='white'
- list_background='white'
- list_select_background='#00008b'
- list_select_foreground='grey'
- tooltip_background="yellow"
-
- standard = ("Helvetica",12)
- standard_italique = ("Helvetica",12,'italic')
- standard_gras = ("Helvetica",12,'bold')
- standard_gras_souligne = ("Helvetica",12,'bold','underline')
-
- canvas = ('Helvetica',10)
- canvas_italique = ('Helvetica',10,'italic')
- canvas_gras = ("Helvetica",10,'bold')
- canvas_gras_italique = ("Helvetica",12,'bold','italic')
-
- standard12 = ("Helvetica",14)
- standard12_gras = ("Helvetica",14,'bold')
- standard12_gras_italique = ( "Helvetica",14,'bold','italic')
-
-
-Le fichier style.py contenu dans le répertoire Aster permet de spécifier des propriétés globales pour une installation.
-Les modifications de style contenues dans ce fichier et dans le fichier style.py d'Eficas_install
-sont prises en compte dans cet ordre.
-"""
-
-
-style.background='gray90'
-style.foreground='black'
-style.standard = ("Helvetica",10)
-style.standard_italique = ("Helvetica",10,'italic')
-style.standard_gras = ("Helvetica",10,'bold')
-style.canvas_italique = ('Helvetica',10,'italic')
-style.canvas_gras = ("Helvetica",10,'bold')
-style.statusfont = ("Helvetica",14)
+++ /dev/null
-# -*- coding: utf-8 -*-
-
-from tkMessageBox import showinfo
-root=None
-jdcdisplay=None
-
-class UnKnownNode(Exception):pass
-
-def init_common(r,j):
- global root,jdcdisplay
- root=r
- jdcdisplay=j
-
-def KP_return():
- root.event_generate("<Return>")
- root.update()
-
-def delete_node(panel):
- panel.node.delete()
-
-def uncomment_command(panel):
- panel.bouton_unc.invoke()
- root.update()
- panel=jdcdisplay.panel_courant
- return panel
-
-def comment_command(panel):
- panel.nb.selectpage('Commentaire')
- panel.comment_commande()
- root.update()
- panel=jdcdisplay.panel_courant
- return panel
-
-def create_mocle(nom,panel):
- panel.nb.selectpage('Mocles')
- panel.Liste.afficheMot(nom)
- root.update()
- label=panel.Liste.dico_labels[nom]
- label.event_generate("<Enter>")
- root.event_generate("<KeyPress-Return>")
- root.update()
- return jdcdisplay.panel_courant
-
-def change_commandcomm(text,panel):
- panel.widget_text.setvalue(text)
- root.update()
- panel.bouton_val.invoke()
- return panel
-
-def create_command(nom,panel):
- panel.nb.selectpage('Commande')
- root.update()
- panel.command_entry.setentry(nom)
- panel.command_entry.component('entry').focus_set()
- root.event_generate("<Return>")
- root.update()
- label=panel.liste_command.dico_labels[nom]
- label.event_generate("<Enter>")
- label.event_generate("<Return>")
- #root.event_generate("<Return>")
- root.update()
- panel=jdcdisplay.panel_courant
- return panel
-
-def create_comment(text,panel):
- panel.nb.selectpage('Commentaire')
- panel.ajout_commentaire()
- root.update()
- panel=jdcdisplay.panel_courant
- panel.widget_text.setvalue(text)
- root.update()
- panel.bouton_val.invoke()
- #panel.change_valeur()
- return panel
-
-def create_param(nom,valeur,panel):
- panel.nb.selectpage('Commentaire')
- panel.ajout_parametre()
- root.update()
- panel=jdcdisplay.panel_courant
- if nom:
- panel.entry_nom.delete(0,"end")
- panel.entry_nom.insert(0,nom)
- panel.entry_nom.event_generate("<Return>")
- panel.entry_val.delete(0,"end")
- panel.entry_val.insert(0,valeur)
- panel.entry_val.event_generate("<Return>")
- panel.bouton_val.invoke()
- root.update()
- return panel
-
-def create_formule(nom,args,expr,panel):
- panel=create_command("FORMULE",panel)
- panel.entry_nom.delete(0,"end")
- panel.entry_nom.insert(0,nom)
- panel.entry_nom.event_generate("<Return>")
- panel.entry_arg.delete(0,"end")
- panel.entry_arg.insert(0,args)
- panel.entry_arg.event_generate("<Return>")
- panel.entry_exp.delete(0,"end")
- panel.entry_exp.insert(0,expr)
- panel.entry_exp.event_generate("<Return>")
- panel.bouton_val.invoke()
- root.update()
- return panel
-
-def nomme_concept(nom,panel):
- panel.nb.selectpage('Concept')
- root.update()
- panel._any.delete(0,"end")
- panel._any.insert(0,nom)
- panel.but_ok.invoke()
- root.update()
- return jdcdisplay.panel_courant
-
-def select_mcf(nom,ind,node):
- panel=select_child(nom,node)
- parent=panel.node
- parent.expand()
- parent.select_next(ind)
- panel=jdcdisplay.panel_courant
- panel.node.expand()
- return panel
-
-def select_child(nom,node):
- """node est le parent dont on veut le fils nom"""
- for n in node.children:
- if n.item.nom == nom:
- n.select()
- root.update()
- panel= jdcdisplay.panel_courant
- panel.node.expand()
- return panel
- raise UnKnownNode(nom)
-
-def select_node(node):
- node.select()
- node.expand()
- root.update()
- return jdcdisplay.panel_courant
-
-def choose_valeur(valeur,panel):
- panel.Liste_choix.afficheMot(valeur)
- root.update()
- label=panel.Liste_choix.dico_labels[valeur]
- label.event_generate("<Button-1>")
- label.event_generate("<Return>")
- root.update()
-
-def choose_sdco(valeur,panel):
- i = list(panel.listbox.get(0, 'end')).index(valeur)
- panel.listbox.component("listbox").selection_set(i)
- panel.listbox.component("listbox").focus_set()
- panel.listbox.component("listbox").event_generate("<Return>")
- root.update()
-
-def choose_assd(valeur,panel):
- i = list(panel.listbox.get(0, 'end')).index(valeur)
- panel.listbox.component("listbox").selection_set(i)
- panel.but_val.invoke()
- root.update()
-
-def set_valeur(valeur,panel):
- panel.entry.delete(0,"end")
- panel.entry.insert(0,valeur)
- panel.entry.event_generate("<Return>")
- root.update()
-
-def set_sdco(valeur,panel):
- panel.entry_co.delete(0,"end")
- panel.entry_co.insert(0,valeur)
- panel.entry_co.event_generate("<Return>")
- root.update()
-
-def set_complexe(valeur,panel):
- panel.entry3.setentry(valeur)
- panel.entry3.component('entry').focus_set()
- panel.entry3.event_generate("<Return>")
- root.update()
-
-def add_valeur_into(valeur,panel):
- label=panel.Liste_choix.dico_labels[valeur]
- panel.Liste_choix.afficheMot(valeur)
- root.update()
- label.event_generate("<1>")
- panel.bouton_add.invoke()
- root.update()
-
-def add_valeur(valeur,panel):
- panel.entry.delete(0,"end")
- panel.entry.insert(0,valeur)
- panel.entry.event_generate("<Return>")
- root.update()
-
-def valider_valeur(panel):
- panel.bouton_accepter.invoke()
- root.update()
-
-def copier_coller():
- root.event_generate("<Control-c>")
- root.event_generate("<Control-v>")
- root.update()
- return jdcdisplay.panel_courant
-
+++ /dev/null
-# -*- coding: utf-8 -*-
-# Modules Python
-import os
-import unittest
-import difflib
-import compare
-import sys
-import Tkinter
-
-# Modules Eficas
-import prefs
-from Editeur import session
-from InterfaceTK import eficas_go
-from InterfaceTK import splash
-from InterfaceTK import eficas
-from InterfaceTK import images
-from common import *
-
-version='v8'
-
-class TestCase(unittest.TestCase):
- def setUp(self):
- self.root = Tkinter.Tk()
- images.update_cache()
- # Analyse des arguments de la ligne de commande
- options=session.parse([])
- options.cata=version
- pass
-
- def tearDown(self):
- self.root.destroy()
- init_common(None,None)
- pass
-
- def test000(self):
- root=self.root
- code="ASTER"
- splash.init_splash(root,code=code,titre="Lancement d'EFICAS pour %s" %code)
- splash._splash.configure(text="Chargement d'EFICAS en cours.\n Veuillez patienter ...")
- app=eficas.EFICAS(root,code=code)
- j=app.bureau.newJDC()
- jdcdisplay=app.bureau.JDCDisplay_courant
- init_common(root,jdcdisplay)
-
- # commande DEBUT
- co=j.addentite("DEBUT",0)
- # commande FIN
- co=j.addentite("FIN",1)
-
- jdctree=jdcdisplay.tree.tree.children[0]
- panel=select_child("DEBUT",jdctree)
-
- panel=create_param("P1",9.8,panel)
- panel=create_param("P2",8.8,panel)
- panel=create_param("P3",7,panel)
- panel=create_param("P4","[2,3,4]",panel)
- panel=create_param("P5","P3*P1",panel)
- panel=create_param(None,"P1-3",panel)
- panel=create_comment("Pas trouve shellpanel",panel)
-
- #commnde LIRE_MAILLAGE
- panel=create_command("LIRE_MAILLAGE",panel)
- command=panel.node
- panel=nomme_concept("MAILLA2",panel)
- panel=select_node(command)
- panel=create_mocle("UNITE",panel)
- panel=set_valeur("P4[1]",panel)
- command.collapse()
- panel=select_node(command)
- #FORMULE
- panel=create_formule("az","a,z","a+z",panel)
- #commande AFFE_MODELE
- panel=create_command("AFFE_MODELE",panel)
- command=panel.node
- select_child("MAILLAGE",command)
- panel=select_node(command)
- panel=create_mocle("AFFE",panel)
- parent=panel.node
- panel=select_child("PHENOMENE",parent)
- choose_valeur("MECANIQUE",panel)
- panel=select_child("b_mecanique",parent)
- panel=select_child("MODELISATION",panel.node)
- add_valeur_into("3D",panel)
- add_valeur_into("3D_FLUIDE",panel)
- valider_valeur(panel)
- panel=select_node(parent)
- panel=create_mocle("TOUT",panel)
- choose_valeur("OUI",panel)
- panel=select_node(command)
- panel=nomme_concept("MO",panel)
- command.collapse()
- #fin commande AFFE_MODELE
- panel=copier_coller()
- command=panel.node
- panel=create_mocle("AFFE",panel)
- panel=select_node(command)
- panel=create_mocle("AFFE",panel)
- panel=select_mcf("AFFE",1,command)
- parent=panel.node
- panel=create_mocle("GROUP_NO",panel)
- add_valeur("'GNP3','GNP5','GNP6','GNP7','GNP8','GNP9','GNP10','GNP11','GNP12'",panel)
- valider_valeur(panel)
- panel=select_child("PHENOMENE",parent)
- choose_valeur("ACOUSTIQUE",panel)
- panel=select_child("b_acoustique",parent)
- panel=select_child("MODELISATION",panel.node)
- add_valeur_into("PLAN",panel)
- valider_valeur(panel)
-
- panel=select_mcf("AFFE",2,command)
- parent=panel.node
- panel=create_mocle("GROUP_MA",panel)
- add_valeur("MASSES",panel)
- valider_valeur(panel)
- panel=select_child("PHENOMENE",parent)
- choose_valeur("THERMIQUE",panel)
- panel=select_child("b_thermique",parent)
- panel=select_child("MODELISATION",panel.node)
- add_valeur_into("COQUE",panel)
- valider_valeur(panel)
-
- panel=select_node(command)
- panel=nomme_concept("AFFE1",panel)
- command.collapse()
- #fin commande AFFE_MODELE
- #commande AFFE_CARA_ELEM
- panel=create_command("AFFE_CARA_ELEM",panel)
- command=panel.node
- panel=select_node(command)
- panel=create_mocle("POUTRE",panel)
- parent=panel.node
- panel=select_child("SECTION",parent)
- choose_valeur("CERCLE",panel)
- panel=select_child("b_cercle",parent)
- panel=select_child("b_constant",panel.node)
- p=panel.node
- panel=select_child("CARA",p)
- add_valeur_into("R",panel)
- add_valeur_into("EP",panel)
- valider_valeur(panel)
- panel=select_child("VALE",p)
- add_valeur("1,2",panel)
- valider_valeur(panel)
- panel=select_node(parent)
- panel=create_mocle("GROUP_MA",panel)
- add_valeur("GR1,GR2",panel)
- valider_valeur(panel)
- panel=select_child("MODELE",command)
- choose_assd("MO",panel)
- panel=select_node(command)
- panel=nomme_concept("CARA",panel)
- command.collapse()
- #fin commande AFFE_CARA_ELEM
- panel=create_command("DEFI_FONCTION",panel)
- command=panel.node
- panel=create_mocle("VALE",panel)
- add_valeur("5.0,3.0",panel)
- add_valeur("P4[1],P3",panel)
- valider_valeur(panel)
- panel=select_child("NOM_PARA",command)
- choose_valeur("DX",panel)
- panel=select_node(command)
- panel=nomme_concept("F1",panel)
- command.collapse()
- #fin DEFI_FONCTION
- panel=create_command("DEFI_FONCTION",panel)
- command=panel.node
- panel=create_mocle("VALE_C",panel)
- add_valeur("5.0,7.0,9.0",panel)
- add_valeur("9.0,8.0,7.0",panel)
- valider_valeur(panel)
- panel=select_child("NOM_PARA",command)
- choose_valeur("DRX",panel)
- panel=select_node(command)
- panel=nomme_concept("F3",panel)
- command.collapse()
- #fin DEFI_FONCTION
-#MATER2=DEFI_MATERIAU(ELAS=_F(E=100000000000.0,
-# NU=0.0,),
-# ECRO_ASYM_LINE=_F(DC_SIGM_EPSI=0.0,
-# SY_C=200000000.0,
-# DT_SIGM_EPSI=0.0,
-# SY_T=50000000.0,),);
-
- panel=create_command("DEFI_MATERIAU",panel)
- command=panel.node
- panel=create_mocle("ELAS",panel)
- p=panel.node
- panel=select_child("E",p)
- set_valeur("100000000000.0",panel)
- panel=select_child("NU",p)
- set_valeur("0.0",panel)
- panel=select_node(command)
- panel=create_mocle("ECRO_ASYM_LINE",panel)
- p=panel.node
- panel=select_child("DC_SIGM_EPSI",p)
- set_valeur("0.0",panel)
- panel=select_child("SY_C",p)
- set_valeur("200000000.0",panel)
- panel=select_child("DT_SIGM_EPSI",p)
- set_valeur("0.0",panel)
- panel=select_child("SY_T",p)
- set_valeur("50000000.0",panel)
- panel=select_node(command)
- panel=nomme_concept("MATER2",panel)
- command.collapse()
- #fin DEFI_MATERIAU
- #PS1=DEFI_PARA_SENSI(VALE=1.0,);
- #PS2=DEFI_PARA_SENSI(VALE=1.0,);
- #PS3=DEFI_PARA_SENSI(VALE=1.0,);
- panel=create_command("DEFI_PARA_SENSI",panel)
- command=panel.node
- panel=select_child("VALE",command)
- set_valeur("1.0",panel)
- panel=select_node(command)
- panel=nomme_concept("PS1",panel)
- command.collapse()
- panel=create_command("DEFI_PARA_SENSI",panel)
- command=panel.node
- panel=select_child("VALE",command)
- set_valeur("1.0",panel)
- panel=select_node(command)
- panel=nomme_concept("PS2",panel)
- command.collapse()
- panel=create_command("DEFI_PARA_SENSI",panel)
- command=panel.node
- panel=select_child("VALE",command)
- set_valeur("1.0",panel)
- panel=select_node(command)
- panel=nomme_concept("PS3",panel)
- command.collapse()
-#CHMAT2=AFFE_MATERIAU(MAILLAGE=MAIL,
-# AFFE=_F(TOUT='OUI',
-# MATER=MATER2,),);
- panel=create_command("AFFE_MATERIAU",panel)
- command=panel.node
- panel=select_child("MAILLAGE",command)
- panel=select_child("AFFE",command)
- affe=panel.node
- panel=create_mocle("TOUT",panel)
- choose_valeur("OUI",panel)
- panel=select_child("MATER",affe)
- add_valeur_into("MATER2",panel)
- valider_valeur(panel)
- panel=select_node(command)
- panel=nomme_concept("CHMAT2",panel)
- command.collapse()
-#AAAZ=AFFE_CHAR_THER(MODELE=AFFE1,
-# TEMP_IMPO=_F(TOUT='OUI',
-# TEMP=0.0,),);
- panel=create_command("AFFE_CHAR_THER",panel)
- command=panel.node
- panel=create_mocle("TEMP_IMPO",panel)
- temp=panel.node
- panel=create_mocle("TOUT",panel)
- choose_valeur("OUI",panel)
- panel=select_node(temp)
- panel=create_mocle("TEMP",panel)
- panel=set_valeur("0.0",panel)
- panel=select_child("MODELE",command)
- choose_assd("AFFE1",panel)
- panel=select_node(command)
- panel=nomme_concept("AAAZ",panel)
- command.collapse()
-#TH1=THER_LINEAIRE(MODELE=AFFE1,
-# CHAM_MATER=CHMAT2,
-# EXCIT=_F(CHARGE=AAAZ,),
-# SENSIBILITE=(PS1,PS2,),);
- panel=create_command("THER_LINEAIRE",panel)
- command=panel.node
- panel=select_child("MODELE",command)
- choose_assd("AFFE1",panel)
- panel=select_child("CHAM_MATER",command)
- panel=select_child("EXCIT",command)
- panel=select_child("CHARGE",panel.node)
- panel=select_node(command)
- panel=create_mocle("SENSIBILITE",panel)
- add_valeur_into("PS1",panel)
- add_valeur_into("PS2",panel)
- valider_valeur(panel)
- panel=select_node(command)
- panel=nomme_concept("TH1",panel)
- command.collapse()
-#ACA1=AFFE_CHAR_ACOU(MODELE=AFFE1,
-# PRES_IMPO=_F(TOUT='OUI',
-# PRES=('RI',3.0,3.0,),),);
- panel=create_command("AFFE_CHAR_ACOU",panel)
- command=panel.node
- panel=create_mocle("PRES_IMPO",panel)
- pres=panel.node
- panel=create_mocle("TOUT",panel)
- choose_valeur("OUI",panel)
- panel=select_child("MODELE",command)
- choose_assd("AFFE1",panel)
- panel=select_child("PRES",pres)
- set_complexe("'RI',3.0,3.0",panel)
- panel=select_node(command)
- panel=nomme_concept("ACA1",panel)
- command.collapse()
-#MACRO_MATR_ASSE(MODELE=AFFE1,
-# NUME_DDL=CO('DDL1'),
-# MATR_ASSE=_F(MATRICE=CO('MAT1'),
-# OPTION='RIGI_THER',),);
- panel=create_command("MACRO_MATR_ASSE",panel)
- command=panel.node
- panel=select_child("NUME_DDL",command)
- set_sdco("DDL1",panel)
- panel=select_child("MODELE",command)
- choose_assd("AFFE1",panel)
- panel=select_child("MATR_ASSE",command)
- matr=panel.node
- panel=select_child("OPTION",matr)
- choose_valeur("RIGI_THER",panel)
- panel=select_child("MATRICE",matr)
- set_sdco("MAT1",panel)
- panel=select_node(command)
- command.collapse()
-#MACRO_MATR_ASSE(MODELE=AFFE1,
-# NUME_DDL=DDL1,
-# MATR_ASSE=_F(MATRICE=MAT1,
-# OPTION='RIGI_THER',),);
- panel=create_command("MACRO_MATR_ASSE",panel)
- command=panel.node
- panel=select_child("NUME_DDL",command)
- choose_sdco("DDL1",panel)
- panel=select_child("MODELE",command)
- choose_assd("AFFE1",panel)
- panel=select_child("MATR_ASSE",command)
- matr=panel.node
- panel=select_child("OPTION",matr)
- choose_valeur("RIGI_THER",panel)
- panel=select_child("MATRICE",matr)
- set_sdco("MAT2",panel)
- panel=select_node(command)
- command.collapse()
-
- assert j.isvalid(),j.report()
+++ /dev/null
-# -*- coding: utf-8 -*-
-# Modules Python
-import os
-import unittest
-import difflib
-import compare
-import sys
-import Tkinter
-
-# Modules Eficas
-import prefs
-from Editeur import session
-from InterfaceTK import eficas_go,splash,eficas,images
-from common import *
-
-
-class TestCase(unittest.TestCase):
- def setUp(self):
- self.root = Tkinter.Tk()
- images.update_cache()
- # Analyse des arguments de la ligne de commande
- options=session.parse([])
- options.cata="v8"
- pass
-
- def tearDown(self):
- self.root.destroy()
- init_common(None,None)
- pass
-
- def test000(self):
- root=self.root
- code="ASTER"
- splash.init_splash(root,code=code,titre="Lancement d'EFICAS pour %s" %code)
- splash._splash.configure(text="Chargement d'EFICAS en cours.\n Veuillez patienter ...")
- app=eficas.EFICAS(root,code=code)
- j=app.bureau.newJDC()
- jdcdisplay=app.bureau.JDCDisplay_courant
- init_common(root,jdcdisplay)
-
- # commande DEBUT
- co=j.addentite("DEBUT",0)
- # commande FIN
- co=j.addentite("FIN",1)
-
- jdctree=jdcdisplay.tree.tree.children[0]
- panel=select_child("DEBUT",jdctree)
- panel=create_command("LIRE_MAILLAGE",panel)
- panel=nomme_concept("MA",panel)
-
- panel=create_command("AFFE_MODELE",panel)
- command=panel.node
- select_child("MAILLAGE",command)
- panel=select_node(command)
- panel=create_mocle("AFFE",panel)
- parent=panel.node
- panel=select_child("PHENOMENE",parent)
- choose_valeur("MECANIQUE",panel)
- panel=select_child("b_mecanique",parent)
- panel=select_child("MODELISATION",panel.node)
- add_valeur_into("3D",panel)
- add_valeur_into("3D_FLUIDE",panel)
- valider_valeur(panel)
- panel=select_node(parent)
- panel=create_mocle("TOUT",panel)
- choose_valeur("OUI",panel)
- panel=select_node(command)
- panel=nomme_concept("MO",panel)
-
- assert j.isvalid(),j.report()
+++ /dev/null
-# -*- coding: utf-8 -*-
-# Modules Python
-import os
-import unittest
-import difflib
-import compare
-import sys
-import Tkinter
-
-# Modules Eficas
-import prefs
-from Editeur import session
-from InterfaceTK import eficas_go,splash,eficas,images
-from common import *
-
-
-class TestCase(unittest.TestCase):
- def setUp(self):
- self.root = Tkinter.Tk()
- images.update_cache()
- # Analyse des arguments de la ligne de commande
- options=session.parse([])
- options.cata="petit"
- pass
-
- def tearDown(self):
- self.root.destroy()
- init_common(None,None)
- pass
-
- def test000(self):
- root=self.root
- code="ASTER"
- splash.init_splash(root,code=code,titre="Lancement d'EFICAS pour %s" %code)
- splash._splash.configure(text="Chargement d'EFICAS en cours.\n Veuillez patienter ...")
- app=eficas.EFICAS(root,code=code)
- j=app.bureau.newJDC()
- jdcdisplay=app.bureau.JDCDisplay_courant
- init_common(root,jdcdisplay)
-
- # commande DEBUT
- co=j.addentite("DEBUT",0)
- # commande FIN
- co=j.addentite("FIN",1)
-
- jdctree=jdcdisplay.tree.tree.children[0]
- panel=select_child("DEBUT",jdctree)
- panel=create_command("TESTS_VALID",panel)
- command=panel.node
- panel=select_child("LongStr",command)
- set_valeur("aaa",panel)
- panel=select_child("ListStr",command)
- add_valeur("aaa",panel)
- add_valeur("bbbb,ccc",panel)
- valider_valeur(panel)
- panel=select_child("PairVal",command)
- add_valeur(2,panel)
- add_valeur("4,6",panel)
- valider_valeur(panel)
- panel=select_child("RangeVal",command)
- set_valeur(4,panel)
- panel=select_child("CardVal",command)
- add_valeur("4,6,5,7",panel)
- valider_valeur(panel)
- panel=select_child("EnumVal",command)
- choose_valeur(3,panel)
- panel=select_child("OrdList",command)
- add_valeur("4,6,5,7",panel)
- valider_valeur(panel)
- panel=select_child("OrdList2",command)
- add_valeur_into(2,panel)
- valider_valeur(panel)
- panel=select_child("TypeVal",command)
- set_valeur(5,panel)
- panel=select_child("Compul",command)
- add_valeur("2",panel)
- add_valeur("1",panel)
- valider_valeur(panel)
- panel=select_child("CompulInto",command)
- add_valeur_into(2,panel)
- add_valeur_into(1,panel)
- valider_valeur(panel)
- panel=select_child("Norep",command)
- add_valeur("2",panel)
- valider_valeur(panel)
- panel=select_child("NorepInto",command)
- add_valeur_into(2,panel)
- valider_valeur(panel)
-
- panel=select_node(command)
- panel=nomme_concept("MA",panel)
-
- assert j.isvalid(),j.report()
+++ /dev/null
-# -*- coding: utf-8 -*-
-# Modules Python
-import os
-import unittest
-import difflib
-import compare
-import sys
-import Tkinter
-
-# Modules Eficas
-import prefs
-from Editeur import session
-from InterfaceTK import eficas_go,splash,eficas,images
-from common import *
-
-
-class TestCase(unittest.TestCase):
- def setUp(self):
- self.root = Tkinter.Tk()
- images.update_cache()
- # Analyse des arguments de la ligne de commande
- options=session.parse([])
- options.cata="v8"
- pass
-
- def tearDown(self):
- self.root.destroy()
- init_common(None,None)
- pass
-
- def test000(self):
- root=self.root
- code="ASTER"
- splash.init_splash(root,code=code,titre="Lancement d'EFICAS pour %s" %code)
- splash._splash.configure(text="Chargement d'EFICAS en cours.\n Veuillez patienter ...")
- app=eficas.EFICAS(root,code=code)
- file=os.path.join(prefs.INSTALLDIR,"Tests/testelem/az.comm")
- j=app.bureau.openJDC(file=file)
- jdcdisplay=app.bureau.JDCDisplay_courant
- init_common(root,jdcdisplay)
- jdctree=jdcdisplay.tree.tree.children[0]
- #commentariser commande MACRO_MATR_ASSE
- panel=select_child("MACRO_MATR_ASSE",jdctree)
- panel=comment_command(panel)
- #decommentariser commande MACRO_MATR_ASSE
- panel=uncomment_command(panel)
- #creation commande commentée
- panel=create_command("LIRE_MAILLAGE",panel)
- panel=comment_command(panel)
- panel=change_commandcomm("mm=LIRE_MAILLAGE(INFO=2,UNITE=21)",panel)
- panel=uncomment_command(panel)
- panel=select_child("DEFI_FONCTION",jdctree)
- delete_node(panel)
-
- assert j.isvalid(),j.report()
+++ /dev/null
-# -*- coding: utf-8 -*-
-
-from tkMessageBox import showinfo
-root=None
-jdcdisplay=None
-
-class UnKnownNode(Exception):pass
-
-def init_common(r,j):
- global root,jdcdisplay
- root=r
- jdcdisplay=j
-
-def KP_return():
- root.event_generate("<Return>")
- root.update()
-
-def delete_node(panel):
- panel.node.delete()
-
-def uncomment_command(panel):
- panel.bouton_unc.invoke()
- root.update()
- panel=jdcdisplay.panel_courant
- return panel
-
-def comment_command(panel):
- panel.nb.selectpage('Commentaire')
- panel.comment_commande()
- root.update()
- panel=jdcdisplay.panel_courant
- return panel
-
-def create_mocle(nom,panel):
- panel.nb.selectpage('Mocles')
- panel.Liste.afficheMot(nom)
- root.update()
- label=panel.Liste.dico_labels[nom]
- label.event_generate("<Enter>")
- root.event_generate("<KeyPress-Return>")
- root.update()
- return jdcdisplay.panel_courant
-
-def change_commandcomm(text,panel):
- panel.widget_text.setvalue(text)
- root.update()
- panel.bouton_val.invoke()
- return panel
-
-def create_command(nom,panel):
- panel.nb.selectpage('Commande')
- root.update()
- panel.command_entry.setentry(nom)
- panel.command_entry.component('entry').focus_set()
- root.event_generate("<Return>")
- root.update()
- label=panel.liste_command.dico_labels[nom]
- label.event_generate("<Enter>")
- label.event_generate("<Return>")
- #root.event_generate("<Return>")
- root.update()
- panel=jdcdisplay.panel_courant
- return panel
-
-def create_comment(text,panel):
- panel.nb.selectpage('Commentaire')
- panel.ajout_commentaire()
- root.update()
- panel=jdcdisplay.panel_courant
- panel.widget_text.setvalue(text)
- root.update()
- panel.bouton_val.invoke()
- #panel.change_valeur()
- return panel
-
-def create_param(nom,valeur,panel):
- panel.nb.selectpage('Commentaire')
- panel.ajout_parametre()
- root.update()
- panel=jdcdisplay.panel_courant
- if nom:
- panel.entry_nom.delete(0,"end")
- panel.entry_nom.insert(0,nom)
- panel.entry_nom.event_generate("<Return>")
- panel.entry_val.delete(0,"end")
- panel.entry_val.insert(0,valeur)
- panel.entry_val.event_generate("<Return>")
- panel.bouton_val.invoke()
- root.update()
- return panel
-
-def create_formule(nom,args,expr,panel):
- panel=create_command("FORMULE",panel)
- panel.entry_nom.delete(0,"end")
- panel.entry_nom.insert(0,nom)
- panel.entry_nom.event_generate("<Return>")
- panel.entry_arg.delete(0,"end")
- panel.entry_arg.insert(0,args)
- panel.entry_arg.event_generate("<Return>")
- panel.entry_exp.delete(0,"end")
- panel.entry_exp.insert(0,expr)
- panel.entry_exp.event_generate("<Return>")
- panel.bouton_val.invoke()
- root.update()
- return panel
-
-def nomme_concept(nom,panel):
- panel.nb.selectpage('Concept')
- root.update()
- panel._any.delete(0,"end")
- panel._any.insert(0,nom)
- panel.but_ok.invoke()
- root.update()
- return jdcdisplay.panel_courant
-
-def select_mcf(nom,ind,node):
- panel=select_child(nom,node)
- parent=panel.node
- parent.expand()
- parent.select_next(ind)
- panel=jdcdisplay.panel_courant
- panel.node.expand()
- return panel
-
-def select_child(nom,node):
- """node est le parent dont on veut le fils nom"""
- for n in node.children:
- if n.item.nom == nom:
- n.select()
- root.update()
- panel= jdcdisplay.panel_courant
- panel.node.expand()
- return panel
- raise UnKnownNode(nom)
-
-def select_node(node):
- node.select()
- node.expand()
- root.update()
- return jdcdisplay.panel_courant
-
-def choose_valeur(valeur,panel):
- panel.Liste_choix.afficheMot(valeur)
- root.update()
- label=panel.Liste_choix.dico_labels[valeur]
- label.event_generate("<Button-1>")
- label.event_generate("<Return>")
- root.update()
-
-def choose_sdco(valeur,panel):
- i = list(panel.listbox.get(0, 'end')).index(valeur)
- panel.listbox.component("listbox").selection_set(i)
- panel.listbox.component("listbox").focus_set()
- panel.listbox.component("listbox").event_generate("<Return>")
- root.update()
-
-def choose_assd(valeur,panel):
- i = list(panel.listbox.get(0, 'end')).index(valeur)
- panel.listbox.component("listbox").selection_set(i)
- panel.but_val.invoke()
- root.update()
-
-def set_valeur(valeur,panel):
- panel.entry.delete(0,"end")
- panel.entry.insert(0,valeur)
- panel.entry.event_generate("<Return>")
- root.update()
-
-def set_sdco(valeur,panel):
- panel.b_co.invoke('OUI')
- root.update()
- panel.entry_co.delete(0,"end")
- panel.entry_co.insert(0,valeur)
- panel.entry_co.event_generate("<Return>")
- root.update()
-
-def set_complexe(valeur,panel):
- panel.entry3.setentry(valeur)
- panel.entry3.component('entry').focus_set()
- panel.entry3.event_generate("<Return>")
- root.update()
-
-def add_valeur_into(valeur,panel):
- label=panel.Liste_choix.dico_labels[valeur]
- panel.Liste_choix.afficheMot(valeur)
- root.update()
- label.event_generate("<1>")
- panel.bouton_add.invoke()
- root.update()
-
-def add_valeur(valeur,panel):
- panel.entry.delete(0,"end")
- panel.entry.insert(0,valeur)
- panel.entry.event_generate("<Return>")
- root.update()
-
-def valider_valeur(panel):
- panel.bouton_accepter.invoke()
- root.update()
-
-def copier_coller():
- root.event_generate("<Control-c>")
- root.event_generate("<Control-v>")
- root.update()
- return jdcdisplay.panel_courant
-
+++ /dev/null
-# -*- coding: utf-8 -*-
-# Modules Python
-import os
-import unittest
-import difflib
-import compare
-import sys
-import Tkinter
-
-# Modules Eficas
-import prefs
-from Editeur import session
-from InterfaceTK import eficas_go,splash,eficas,images
-from common import *
-
-version='v7'
-
-class TestCase(unittest.TestCase):
- def setUp(self):
- self.root = Tkinter.Tk()
- images.update_cache()
- # Analyse des arguments de la ligne de commande
- options=session.parse([])
- options.cata=version
- pass
-
- def tearDown(self):
- self.root.destroy()
- init_common(None,None)
- pass
-
- def test000(self):
- root=self.root
- code="ASTER"
- splash.init_splash(root,code=code,titre="Lancement d'EFICAS pour %s" %code)
- splash._splash.configure(text="Chargement d'EFICAS en cours.\n Veuillez patienter ...")
- app=eficas.EFICAS(root,code=code)
- j=app.bureau.newJDC()
- jdcdisplay=app.bureau.JDCDisplay_courant
- init_common(root,jdcdisplay)
-
- # commande DEBUT
- co=j.addentite("DEBUT",0)
- # commande FIN
- co=j.addentite("FIN",1)
-
- jdctree=jdcdisplay.tree.tree.children[0]
- panel=select_child("DEBUT",jdctree)
-
- panel=create_param("P1",9.8,panel)
- panel=create_param("P2",8.8,panel)
- panel=create_param("P3",7,panel)
- panel=create_param("P4","[2,3,4]",panel)
- panel=create_param("P5","P3*P1",panel)
- panel=create_param(None,"P1-3",panel)
- panel=create_comment("Pas trouve shellpanel",panel)
-
- #commnde LIRE_MAILLAGE
- panel=create_command("LIRE_MAILLAGE",panel)
- command=panel.node
- panel=nomme_concept("MAILLA2",panel)
- panel=select_node(command)
- panel=create_mocle("UNITE",panel)
- panel=set_valeur("P4[1]",panel)
- command.collapse()
- panel=select_node(command)
- #FORMULE
- panel=create_formule("az","a,z","a+z",panel)
- #commande AFFE_MODELE
- panel=create_command("AFFE_MODELE",panel)
- command=panel.node
- select_child("MAILLAGE",command)
- panel=select_node(command)
- panel=create_mocle("AFFE",panel)
- parent=panel.node
- panel=select_child("PHENOMENE",parent)
- choose_valeur("MECANIQUE",panel)
- panel=select_child("b_mecanique",parent)
- panel=select_child("MODELISATION",panel.node)
- add_valeur_into("3D",panel)
- add_valeur_into("3D_FLUIDE",panel)
- valider_valeur(panel)
- panel=select_node(parent)
- panel=create_mocle("TOUT",panel)
- choose_valeur("OUI",panel)
- panel=select_node(command)
- panel=nomme_concept("MO",panel)
- command.collapse()
- #fin commande AFFE_MODELE
- panel=copier_coller()
- command=panel.node
- panel=create_mocle("AFFE",panel)
- panel=select_node(command)
- panel=create_mocle("AFFE",panel)
- panel=select_mcf("AFFE",1,command)
- parent=panel.node
- panel=create_mocle("GROUP_NO",panel)
- add_valeur("'GNP3','GNP5','GNP6','GNP7','GNP8','GNP9','GNP10','GNP11','GNP12'",panel)
- valider_valeur(panel)
- panel=select_child("PHENOMENE",parent)
- choose_valeur("ACOUSTIQUE",panel)
- panel=select_child("b_acoustique",parent)
- panel=select_child("MODELISATION",panel.node)
- add_valeur_into("PLAN",panel)
- valider_valeur(panel)
-
- panel=select_mcf("AFFE",2,command)
- parent=panel.node
- panel=create_mocle("GROUP_MA",panel)
- add_valeur("MASSES",panel)
- valider_valeur(panel)
- panel=select_child("PHENOMENE",parent)
- choose_valeur("THERMIQUE",panel)
- panel=select_child("b_thermique",parent)
- panel=select_child("MODELISATION",panel.node)
- add_valeur_into("COQUE",panel)
- valider_valeur(panel)
-
- panel=select_node(command)
- panel=nomme_concept("AFFE1",panel)
- command.collapse()
- #fin commande AFFE_MODELE
- #commande AFFE_CARA_ELEM
- panel=create_command("AFFE_CARA_ELEM",panel)
- command=panel.node
- panel=select_node(command)
- panel=create_mocle("POUTRE",panel)
- parent=panel.node
- panel=select_child("SECTION",parent)
- choose_valeur("CERCLE",panel)
- panel=select_child("b_cercle",parent)
- panel=select_child("b_constant",panel.node)
- p=panel.node
- panel=select_child("CARA",p)
- add_valeur_into("R",panel)
- add_valeur_into("EP",panel)
- valider_valeur(panel)
- panel=select_child("VALE",p)
- add_valeur("1,2",panel)
- valider_valeur(panel)
- panel=select_node(parent)
- panel=create_mocle("GROUP_MA",panel)
- add_valeur("GR1,GR2",panel)
- valider_valeur(panel)
- panel=select_child("MODELE",command)
- choose_assd("MO",panel)
- panel=select_node(command)
- panel=nomme_concept("CARA",panel)
- command.collapse()
- #fin commande AFFE_CARA_ELEM
- panel=create_command("DEFI_FONCTION",panel)
- command=panel.node
- panel=create_mocle("VALE",panel)
- add_valeur("5.0,3.0",panel)
- add_valeur("P4[1],P3",panel)
- valider_valeur(panel)
- panel=select_child("NOM_PARA",command)
- add_valeur("DX",panel)
- panel=select_node(command)
- panel=nomme_concept("F1",panel)
- command.collapse()
- #fin DEFI_FONCTION
- panel=create_command("DEFI_FONCTION",panel)
- command=panel.node
- panel=create_mocle("VALE_C",panel)
- add_valeur("5.0,7.0,9.0",panel)
- add_valeur("9.0,8.0,7.0",panel)
- valider_valeur(panel)
- panel=select_child("NOM_PARA",command)
- add_valeur("DRX",panel)
- panel=select_node(command)
- panel=nomme_concept("F3",panel)
- command.collapse()
- #fin DEFI_FONCTION
-#MATER2=DEFI_MATERIAU(ELAS=_F(E=100000000000.0,
-# NU=0.0,),
-# ECRO_ASYM_LINE=_F(DC_SIGM_EPSI=0.0,
-# SY_C=200000000.0,
-# DT_SIGM_EPSI=0.0,
-# SY_T=50000000.0,),);
-
- panel=create_command("DEFI_MATERIAU",panel)
- command=panel.node
- panel=create_mocle("ELAS",panel)
- p=panel.node
- panel=select_child("E",p)
- set_valeur("100000000000.0",panel)
- panel=select_child("NU",p)
- set_valeur("0.0",panel)
- panel=select_node(command)
- panel=create_mocle("ECRO_ASYM_LINE",panel)
- p=panel.node
- panel=select_child("DC_SIGM_EPSI",p)
- set_valeur("0.0",panel)
- panel=select_child("SY_C",p)
- set_valeur("200000000.0",panel)
- panel=select_child("DT_SIGM_EPSI",p)
- set_valeur("0.0",panel)
- panel=select_child("SY_T",p)
- set_valeur("50000000.0",panel)
- panel=select_node(command)
- panel=nomme_concept("MATER2",panel)
- command.collapse()
- #fin DEFI_MATERIAU
- #PS1=DEFI_PARA_SENSI(VALE=1.0,);
- #PS2=DEFI_PARA_SENSI(VALE=1.0,);
- #PS3=DEFI_PARA_SENSI(VALE=1.0,);
- panel=create_command("DEFI_PARA_SENSI",panel)
- command=panel.node
- panel=select_child("VALE",command)
- set_valeur("1.0",panel)
- panel=select_node(command)
- panel=nomme_concept("PS1",panel)
- command.collapse()
- panel=create_command("DEFI_PARA_SENSI",panel)
- command=panel.node
- panel=select_child("VALE",command)
- set_valeur("1.0",panel)
- panel=select_node(command)
- panel=nomme_concept("PS2",panel)
- command.collapse()
- panel=create_command("DEFI_PARA_SENSI",panel)
- command=panel.node
- panel=select_child("VALE",command)
- set_valeur("1.0",panel)
- panel=select_node(command)
- panel=nomme_concept("PS3",panel)
- command.collapse()
-#CHMAT2=AFFE_MATERIAU(MAILLAGE=MAIL,
-# AFFE=_F(TOUT='OUI',
-# MATER=MATER2,),);
- panel=create_command("AFFE_MATERIAU",panel)
- command=panel.node
- panel=select_child("MAILLAGE",command)
- panel=select_child("AFFE",command)
- affe=panel.node
- panel=create_mocle("TOUT",panel)
- choose_valeur("OUI",panel)
- panel=select_child("MATER",affe)
- add_valeur_into("MATER2",panel)
- valider_valeur(panel)
- panel=select_node(command)
- panel=nomme_concept("CHMAT2",panel)
- command.collapse()
-#AAAZ=AFFE_CHAR_THER(MODELE=AFFE1,
-# TEMP_IMPO=_F(TOUT='OUI',
-# TEMP=0.0,),);
- panel=create_command("AFFE_CHAR_THER",panel)
- command=panel.node
- panel=create_mocle("TEMP_IMPO",panel)
- temp=panel.node
- panel=create_mocle("TOUT",panel)
- choose_valeur("OUI",panel)
- panel=select_node(temp)
- panel=create_mocle("TEMP",panel)
- panel=set_valeur("0.0",panel)
- panel=select_child("MODELE",command)
- choose_assd("AFFE1",panel)
- panel=select_node(command)
- panel=nomme_concept("AAAZ",panel)
- command.collapse()
-#TH1=THER_LINEAIRE(MODELE=AFFE1,
-# CHAM_MATER=CHMAT2,
-# EXCIT=_F(CHARGE=AAAZ,),
-# SENSIBILITE=(PS1,PS2,),);
- panel=create_command("THER_LINEAIRE",panel)
- command=panel.node
- panel=select_child("MODELE",command)
- choose_assd("AFFE1",panel)
- panel=select_child("CHAM_MATER",command)
- panel=select_child("EXCIT",command)
- panel=select_child("CHARGE",panel.node)
- panel=select_node(command)
- panel=create_mocle("SENSIBILITE",panel)
- add_valeur_into("PS1",panel)
- add_valeur_into("PS2",panel)
- valider_valeur(panel)
- panel=select_node(command)
- panel=nomme_concept("TH1",panel)
- command.collapse()
-#ACA1=AFFE_CHAR_ACOU(MODELE=AFFE1,
-# PRES_IMPO=_F(TOUT='OUI',
-# PRES=('RI',3.0,3.0,),),);
- panel=create_command("AFFE_CHAR_ACOU",panel)
- command=panel.node
- panel=create_mocle("PRES_IMPO",panel)
- pres=panel.node
- panel=create_mocle("TOUT",panel)
- choose_valeur("OUI",panel)
- panel=select_child("MODELE",command)
- choose_assd("AFFE1",panel)
- panel=select_child("PRES",pres)
- set_complexe("'RI',3.0,3.0",panel)
- panel=select_node(command)
- panel=nomme_concept("ACA1",panel)
- command.collapse()
-#MACRO_MATR_ASSE(MODELE=AFFE1,
-# NUME_DDL=CO('DDL1'),
-# MATR_ASSE=_F(MATRICE=CO('MAT1'),
-# OPTION='RIGI_THER',),);
- panel=create_command("MACRO_MATR_ASSE",panel)
- command=panel.node
- panel=select_child("NUME_DDL",command)
- set_sdco("DDL1",panel)
- panel=select_child("MODELE",command)
- choose_assd("AFFE1",panel)
- panel=select_child("MATR_ASSE",command)
- matr=panel.node
- panel=select_child("OPTION",matr)
- choose_valeur("RIGI_THER",panel)
- panel=select_child("MATRICE",matr)
- set_sdco("MAT1",panel)
- panel=select_node(command)
- command.collapse()
-#MACRO_MATR_ASSE(MODELE=AFFE1,
-# NUME_DDL=DDL1,
-# MATR_ASSE=_F(MATRICE=MAT1,
-# OPTION='RIGI_THER',),);
- panel=create_command("MACRO_MATR_ASSE",panel)
- command=panel.node
- panel=select_child("NUME_DDL",command)
- choose_sdco("DDL1",panel)
- panel=select_child("MODELE",command)
- choose_assd("AFFE1",panel)
- panel=select_child("MATR_ASSE",command)
- matr=panel.node
- panel=select_child("OPTION",matr)
- choose_valeur("RIGI_THER",panel)
- panel=select_child("MATRICE",matr)
- set_sdco("MAT2",panel)
- panel=select_node(command)
- command.collapse()
-
- assert j.isvalid(),j.report()
+++ /dev/null
-# -*- coding: utf-8 -*-
-# Modules Python
-import os
-import unittest
-import difflib
-import compare
-import sys
-import Tkinter
-
-# Modules Eficas
-import prefs
-from Editeur import session
-from InterfaceTK import eficas_go,splash,eficas,images
-from common import *
-
-
-class TestCase(unittest.TestCase):
- def setUp(self):
- self.root = Tkinter.Tk()
- images.update_cache()
- # Analyse des arguments de la ligne de commande
- options=session.parse([])
- options.cata="v7"
- pass
-
- def tearDown(self):
- self.root.destroy()
- init_common(None,None)
- pass
-
- def test000(self):
- root=self.root
- code="ASTER"
- splash.init_splash(root,code=code,titre="Lancement d'EFICAS pour %s" %code)
- splash._splash.configure(text="Chargement d'EFICAS en cours.\n Veuillez patienter ...")
- app=eficas.EFICAS(root,code=code)
- j=app.bureau.newJDC()
- jdcdisplay=app.bureau.JDCDisplay_courant
- init_common(root,jdcdisplay)
-
- # commande DEBUT
- co=j.addentite("DEBUT",0)
- # commande FIN
- co=j.addentite("FIN",1)
-
- jdctree=jdcdisplay.tree.tree.children[0]
- panel=select_child("DEBUT",jdctree)
- panel=create_command("LIRE_MAILLAGE",panel)
- panel=nomme_concept("MA",panel)
-
- panel=create_command("AFFE_MODELE",panel)
- command=panel.node
- select_child("MAILLAGE",command)
- panel=select_node(command)
- panel=create_mocle("AFFE",panel)
- parent=panel.node
- panel=select_child("PHENOMENE",parent)
- choose_valeur("MECANIQUE",panel)
- panel=select_child("b_mecanique",parent)
- panel=select_child("MODELISATION",panel.node)
- add_valeur_into("3D",panel)
- add_valeur_into("3D_FLUIDE",panel)
- valider_valeur(panel)
- panel=select_node(parent)
- panel=create_mocle("TOUT",panel)
- choose_valeur("OUI",panel)
- panel=select_node(command)
- panel=nomme_concept("MO",panel)
-
- assert j.isvalid(),j.report()
+++ /dev/null
-# -*- coding: utf-8 -*-
-# Modules Python
-import os
-import unittest
-import difflib
-import compare
-import sys
-import Tkinter
-
-# Modules Eficas
-import prefs
-from Editeur import session
-from InterfaceTK import eficas_go,splash,eficas,images
-from common import *
-
-
-class TestCase(unittest.TestCase):
- def setUp(self):
- self.root = Tkinter.Tk()
- images.update_cache()
- # Analyse des arguments de la ligne de commande
- options=session.parse([])
- options.cata="v7"
- pass
-
- def tearDown(self):
- self.root.destroy()
- init_common(None,None)
- pass
-
- def test000(self):
- root=self.root
- code="ASTER"
- splash.init_splash(root,code=code,titre="Lancement d'EFICAS pour %s" %code)
- splash._splash.configure(text="Chargement d'EFICAS en cours.\n Veuillez patienter ...")
- app=eficas.EFICAS(root,code=code)
- file=os.path.join(prefs.INSTALLDIR,"Tests/testelem/az.comm")
- j=app.bureau.openJDC(file=file)
- jdcdisplay=app.bureau.JDCDisplay_courant
- init_common(root,jdcdisplay)
- jdctree=jdcdisplay.tree.tree.children[0]
- #commentariser commande MACRO_MATR_ASSE
- panel=select_child("MACRO_MATR_ASSE",jdctree)
- panel=comment_command(panel)
- #decommentariser commande MACRO_MATR_ASSE
- panel=uncomment_command(panel)
- #creation commande commentée
- panel=create_command("LIRE_MAILLAGE",panel)
- panel=comment_command(panel)
- panel=change_commandcomm("mm=LIRE_MAILLAGE(INFO=2,UNITE=21)",panel)
- panel=uncomment_command(panel)
- panel=select_child("DEFI_FONCTION",jdctree)
- delete_node(panel)
-
- assert j.isvalid(),j.report()
+++ /dev/null
-# -*- coding: utf-8 -*-
-
-from tkMessageBox import showinfo
-root=None
-jdcdisplay=None
-
-class UnKnownNode(Exception):pass
-
-def pause():
- if 1:
- showinfo("Pause","Pause")
-
-def init_common(r,j):
- global root,jdcdisplay
- root=r
- jdcdisplay=j
-
-def KP_return():
- root.event_generate("<Return>")
- root.update()
-
-def delete_node(panel):
- panel.node.delete()
-
-def uncomment_command(panel):
- panel.bouton_unc.invoke()
- root.update()
- panel=jdcdisplay.panel_courant
- return panel
-
-def comment_command(panel):
- panel.nb.selectpage('Commentaire')
- panel.comment_commande()
- root.update()
- panel=jdcdisplay.panel_courant
- return panel
-
-def create_mocle(nom,panel):
- panel.nb.selectpage('Mocles')
- panel.Liste.afficheMot(nom)
- root.update()
- label=panel.Liste.dico_labels[nom]
- label.event_generate("<Enter>")
- root.event_generate("<KeyPress-Return>")
- root.update()
- return jdcdisplay.panel_courant
-
-def change_commandcomm(text,panel):
- panel.widget_text.setvalue(text)
- root.update()
- panel.bouton_val.invoke()
- return panel
-
-def create_command(nom,panel):
- panel.nb.selectpage('Commande')
- root.update()
- panel.command_entry.setentry(nom)
- panel.command_entry.component('entry').focus_set()
- root.event_generate("<Return>")
- root.update()
- label=panel.liste_command.dico_labels[nom]
- label.event_generate("<Enter>")
- label.event_generate("<Return>")
- root.update()
- panel=jdcdisplay.panel_courant
- return panel
-
-def create_comment(text,panel):
- panel.nb.selectpage('Commentaire')
- panel.ajout_commentaire()
- root.update()
- panel=jdcdisplay.panel_courant
- panel.widget_text.setvalue(text)
- root.update()
- panel.bouton_val.invoke()
- #panel.change_valeur()
- return panel
-
-def create_param(nom,valeur,panel):
- panel.nb.selectpage('Commentaire')
- panel.ajout_parametre()
- root.update()
- panel=jdcdisplay.panel_courant
- if nom:
- panel.entry_nom.delete(0,"end")
- panel.entry_nom.insert(0,nom)
- panel.entry_nom.event_generate("<Return>")
- panel.entry_val.delete(0,"end")
- panel.entry_val.insert(0,valeur)
- panel.entry_val.event_generate("<Return>")
- panel.bouton_val.invoke()
- root.update()
- return panel
-
-def create_formule(nom,args,expr,panel):
- panel=create_command("FORMULE",panel)
- panel.entry_nom.delete(0,"end")
- panel.entry_nom.insert(0,nom)
- panel.entry_nom.event_generate("<Return>")
- panel.entry_arg.delete(0,"end")
- panel.entry_arg.insert(0,args)
- panel.entry_arg.event_generate("<Return>")
- panel.entry_exp.delete(0,"end")
- panel.entry_exp.insert(0,expr)
- panel.entry_exp.event_generate("<Return>")
- panel.bouton_val.invoke()
- root.update()
- return panel
-
-def nomme_concept(nom,panel):
- panel.nb.selectpage('Concept')
- root.update()
- panel._any.delete(0,"end")
- panel._any.insert(0,nom)
- panel.but_ok.invoke()
- root.update()
- return jdcdisplay.panel_courant
-
-def select_mcf(nom,ind,node):
- panel=select_child(nom,node)
- parent=panel.node
- parent.expand()
- parent.select_next(ind)
- panel=jdcdisplay.panel_courant
- panel.node.expand()
- return panel
-
-def select_child(nom,node):
- """node est le parent dont on veut le fils nom"""
- for n in node.children:
- if n.item.nom == nom:
- n.select()
- root.update()
- panel= jdcdisplay.panel_courant
- panel.node.expand()
- return panel
- raise UnKnownNode(nom)
-
-def select_node(node):
- node.select()
- node.expand()
- root.update()
- return jdcdisplay.panel_courant
-
-def choose_valeur(valeur,panel):
- panel.Liste_choix.afficheMot(valeur)
- root.update()
- label=panel.Liste_choix.dico_labels[valeur]
- label.event_generate("<Button-1>")
- label.event_generate("<Return>")
- root.update()
-
-def choose_sdco(valeur,panel):
- i = list(panel.listbox.get(0, 'end')).index(valeur)
- panel.listbox.component("listbox").selection_set(i)
- panel.listbox.component("listbox").focus_set()
- panel.listbox.component("listbox").event_generate("<Return>")
- root.update()
-
-def choose_assd(valeur,panel):
- i = list(panel.listbox.get(0, 'end')).index(valeur)
- panel.listbox.component("listbox").selection_set(i)
- panel.but_val.invoke()
- root.update()
-
-def set_valeur(valeur,panel):
- panel.entry.delete(0,"end")
- panel.entry.insert(0,valeur)
- panel.entry.event_generate("<Return>")
- root.update()
-
-def set_sdco(valeur,panel):
- panel.b_co.invoke('OUI')
- root.update()
- panel.entry_co.delete(0,"end")
- panel.entry_co.insert(0,valeur)
- panel.entry_co.event_generate("<Return>")
- root.update()
-
-def set_complexe(valeur,panel):
- panel.entry3.setentry(valeur)
- panel.entry3.component('entry').focus_set()
- panel.entry3.event_generate("<Return>")
- root.update()
-
-def add_valeur_into(valeur,panel):
- label=panel.Liste_choix.dico_labels[valeur]
- panel.Liste_choix.afficheMot(valeur)
- root.update()
- label.event_generate("<1>")
- panel.bouton_add.invoke()
- root.update()
-
-def add_valeur(valeur,panel):
- panel.entry.delete(0,"end")
- panel.entry.insert(0,valeur)
- panel.entry.event_generate("<Return>")
- root.update()
-
-def valider_valeur(panel):
- panel.bouton_accepter.invoke()
- root.update()
-
-def copier_coller():
- root.event_generate("<Control-c>")
- root.event_generate("<Control-v>")
- root.update()
- return jdcdisplay.panel_courant
-
+++ /dev/null
-# -*- coding: utf-8 -*-
-# Modules Python
-import os
-import unittest
-import difflib
-import compare
-import sys
-import Tkinter
-
-# Modules Eficas
-import prefs
-from Editeur import session
-from InterfaceTK import eficas_go,splash,eficas,images
-from common import *
-
-version='v9'
-
-class TestCase(unittest.TestCase):
- def setUp(self):
- self.root = Tkinter.Tk()
- images.update_cache()
- # Analyse des arguments de la ligne de commande
- options=session.parse([])
- options.cata=version
- pass
-
- def tearDown(self):
- self.root.destroy()
- init_common(None,None)
- pass
-
- def test000(self):
- root=self.root
- code="ASTER"
- splash.init_splash(root,code=code,titre="Lancement d'EFICAS pour %s" %code)
- splash._splash.configure(text="Chargement d'EFICAS en cours.\n Veuillez patienter ...")
- app=eficas.EFICAS(root,code=code)
- j=app.bureau.newJDC()
- jdcdisplay=app.bureau.JDCDisplay_courant
- init_common(root,jdcdisplay)
-
- # commande DEBUT
- co=j.addentite("DEBUT",0)
- # commande FIN
- co=j.addentite("FIN",1)
-
- jdctree=jdcdisplay.tree.tree.children[0]
- panel=select_child("DEBUT",jdctree)
-
- panel=create_param("P1",9.8,panel)
- panel=create_param("P2",8.8,panel)
- panel=create_param("P3",7,panel)
- panel=create_param("P4","[2,3,4]",panel)
- panel=create_param("P5","P3*P1",panel)
- panel=create_param(None,"P1-3",panel)
- panel=create_comment("Pas trouve shellpanel",panel)
-
- #commnde LIRE_MAILLAGE
- panel=create_command("LIRE_MAILLAGE",panel)
- command=panel.node
- panel=nomme_concept("MAILLA2",panel)
- panel=select_node(command)
- panel=create_mocle("UNITE",panel)
- panel=set_valeur("P4[1]",panel)
- command.collapse()
- panel=select_node(command)
- #FORMULE
- panel=create_formule("az","a,z","a+z",panel)
- #commande AFFE_MODELE
- panel=create_command("AFFE_MODELE",panel)
- command=panel.node
- select_child("MAILLAGE",command)
- panel=select_node(command)
- panel=create_mocle("AFFE",panel)
- parent=panel.node
- panel=select_child("PHENOMENE",parent)
- choose_valeur("MECANIQUE",panel)
- panel=select_child("b_mecanique",parent)
- panel=select_child("MODELISATION",panel.node)
- add_valeur_into("3D",panel)
- add_valeur_into("3D_FLUIDE",panel)
- valider_valeur(panel)
- panel=select_node(parent)
- panel=create_mocle("TOUT",panel)
- choose_valeur("OUI",panel)
- panel=select_node(command)
- panel=nomme_concept("MO",panel)
- command.collapse()
- #fin commande AFFE_MODELE
- panel=copier_coller()
- command=panel.node
- panel=create_mocle("AFFE",panel)
- panel=select_node(command)
- panel=create_mocle("AFFE",panel)
- panel=select_mcf("AFFE",1,command)
- parent=panel.node
- panel=create_mocle("GROUP_NO",panel)
- add_valeur("'GNP3','GNP5','GNP6','GNP7','GNP8','GNP9','GNP10','GNP11','GNP12'",panel)
- valider_valeur(panel)
- panel=select_child("PHENOMENE",parent)
- choose_valeur("ACOUSTIQUE",panel)
- panel=select_child("b_acoustique",parent)
- panel=select_child("MODELISATION",panel.node)
- add_valeur_into("PLAN",panel)
- valider_valeur(panel)
-
- panel=select_mcf("AFFE",2,command)
- parent=panel.node
- panel=create_mocle("GROUP_MA",panel)
- add_valeur("MASSES",panel)
- valider_valeur(panel)
- panel=select_child("PHENOMENE",parent)
- choose_valeur("THERMIQUE",panel)
- panel=select_child("b_thermique",parent)
- panel=select_child("MODELISATION",panel.node)
- add_valeur_into("COQUE",panel)
- valider_valeur(panel)
-
- panel=select_node(command)
- panel=nomme_concept("AFFE1",panel)
- command.collapse()
- #fin commande AFFE_MODELE
- #commande AFFE_CARA_ELEM
- panel=create_command("AFFE_CARA_ELEM",panel)
- command=panel.node
- panel=select_node(command)
- panel=create_mocle("POUTRE",panel)
- parent=panel.node
- panel=select_child("SECTION",parent)
- choose_valeur("CERCLE",panel)
- panel=select_child("b_cercle",parent)
- panel=select_child("b_constant",panel.node)
- p=panel.node
- panel=select_child("CARA",p)
- add_valeur_into("R",panel)
- add_valeur_into("EP",panel)
- valider_valeur(panel)
- panel=select_child("VALE",p)
- add_valeur("1,2",panel)
- valider_valeur(panel)
- panel=select_node(parent)
- panel=create_mocle("GROUP_MA",panel)
- add_valeur("GR1,GR2",panel)
- valider_valeur(panel)
- panel=select_child("MODELE",command)
- choose_assd("MO",panel)
- panel=select_node(command)
- panel=nomme_concept("CARA",panel)
- command.collapse()
- #fin commande AFFE_CARA_ELEM
- panel=create_command("DEFI_FONCTION",panel)
- command=panel.node
- panel=create_mocle("VALE",panel)
- add_valeur("5.0,3.0",panel)
- add_valeur("P4[1],P3",panel)
- valider_valeur(panel)
- panel=select_child("NOM_PARA",command)
- choose_valeur("DX",panel)
- panel=select_node(command)
- panel=nomme_concept("F1",panel)
- command.collapse()
- #fin DEFI_FONCTION
- panel=create_command("DEFI_FONCTION",panel)
- command=panel.node
- panel=create_mocle("VALE_C",panel)
- add_valeur("5.0,7.0,9.0",panel)
- add_valeur("9.0,8.0,7.0",panel)
- valider_valeur(panel)
- panel=select_child("NOM_PARA",command)
- choose_valeur("DRX",panel)
- panel=select_node(command)
- panel=nomme_concept("F3",panel)
- command.collapse()
- #fin DEFI_FONCTION
-#MATER2=DEFI_MATERIAU(ELAS=_F(E=100000000000.0,
-# NU=0.0,),
-# ECRO_ASYM_LINE=_F(DC_SIGM_EPSI=0.0,
-# SY_C=200000000.0,
-# DT_SIGM_EPSI=0.0,
-# SY_T=50000000.0,),);
-
- panel=create_command("DEFI_MATERIAU",panel)
- command=panel.node
- panel=create_mocle("ELAS",panel)
- p=panel.node
- panel=select_child("E",p)
- set_valeur("100000000000.0",panel)
- panel=select_child("NU",p)
- set_valeur("0.0",panel)
- panel=select_node(command)
- panel=create_mocle("ECRO_ASYM_LINE",panel)
- p=panel.node
- panel=select_child("DC_SIGM_EPSI",p)
- set_valeur("0.0",panel)
- panel=select_child("SY_C",p)
- set_valeur("200000000.0",panel)
- panel=select_child("DT_SIGM_EPSI",p)
- set_valeur("0.0",panel)
- panel=select_child("SY_T",p)
- set_valeur("50000000.0",panel)
- panel=select_node(command)
- panel=nomme_concept("MATER2",panel)
- command.collapse()
- #fin DEFI_MATERIAU
- #PS1=DEFI_PARA_SENSI(VALE=1.0,);
- #PS2=DEFI_PARA_SENSI(VALE=1.0,);
- #PS3=DEFI_PARA_SENSI(VALE=1.0,);
- panel=create_command("DEFI_PARA_SENSI",panel)
- command=panel.node
- panel=select_child("VALE",command)
- set_valeur("1.0",panel)
- panel=select_node(command)
- panel=nomme_concept("PS1",panel)
- command.collapse()
- panel=create_command("DEFI_PARA_SENSI",panel)
- command=panel.node
- panel=select_child("VALE",command)
- set_valeur("1.0",panel)
- panel=select_node(command)
- panel=nomme_concept("PS2",panel)
- command.collapse()
- panel=create_command("DEFI_PARA_SENSI",panel)
- command=panel.node
- panel=select_child("VALE",command)
- set_valeur("1.0",panel)
- panel=select_node(command)
- panel=nomme_concept("PS3",panel)
- command.collapse()
-#CHMAT2=AFFE_MATERIAU(MAILLAGE=MAIL,
-# AFFE=_F(TOUT='OUI',
-# MATER=MATER2,),);
- panel=create_command("AFFE_MATERIAU",panel)
- command=panel.node
- panel=select_child("MAILLAGE",command)
- panel=select_child("AFFE",command)
- affe=panel.node
- panel=create_mocle("TOUT",panel)
- choose_valeur("OUI",panel)
- panel=select_child("MATER",affe)
- add_valeur_into("MATER2",panel)
- valider_valeur(panel)
- panel=select_node(command)
- panel=nomme_concept("CHMAT2",panel)
- command.collapse()
-#AAAZ=AFFE_CHAR_THER(MODELE=AFFE1,
-# TEMP_IMPO=_F(TOUT='OUI',
-# TEMP=0.0,),);
- panel=create_command("AFFE_CHAR_THER",panel)
- command=panel.node
- panel=create_mocle("TEMP_IMPO",panel)
- temp=panel.node
- panel=create_mocle("TOUT",panel)
- choose_valeur("OUI",panel)
- panel=select_node(temp)
- panel=create_mocle("TEMP",panel)
- panel=set_valeur("0.0",panel)
- panel=select_child("MODELE",command)
- choose_assd("AFFE1",panel)
- panel=select_node(command)
- panel=nomme_concept("AAAZ",panel)
- command.collapse()
-#TH1=THER_LINEAIRE(MODELE=AFFE1,
-# CHAM_MATER=CHMAT2,
-# EXCIT=_F(CHARGE=AAAZ,),
-# SENSIBILITE=(PS1,PS2,),);
- panel=create_command("THER_LINEAIRE",panel)
- command=panel.node
- panel=select_child("MODELE",command)
- choose_assd("AFFE1",panel)
- panel=select_child("CHAM_MATER",command)
- panel=select_child("EXCIT",command)
- panel=select_child("CHARGE",panel.node)
- panel=select_node(command)
- panel=create_mocle("SENSIBILITE",panel)
- add_valeur_into("PS1",panel)
- add_valeur_into("PS2",panel)
- valider_valeur(panel)
- panel=select_node(command)
- panel=nomme_concept("TH1",panel)
- command.collapse()
-#ACA1=AFFE_CHAR_ACOU(MODELE=AFFE1,
-# PRES_IMPO=_F(TOUT='OUI',
-# PRES=('RI',3.0,3.0,),),);
- panel=create_command("AFFE_CHAR_ACOU",panel)
- command=panel.node
- panel=create_mocle("PRES_IMPO",panel)
- pres=panel.node
- panel=create_mocle("TOUT",panel)
- choose_valeur("OUI",panel)
- panel=select_child("MODELE",command)
- choose_assd("AFFE1",panel)
- panel=select_child("PRES",pres)
- set_complexe("'RI',3.0,3.0",panel)
- panel=select_node(command)
- panel=nomme_concept("ACA1",panel)
- command.collapse()
-#MACRO_MATR_ASSE(MODELE=AFFE1,
-# NUME_DDL=CO('DDL1'),
-# MATR_ASSE=_F(MATRICE=CO('MAT1'),
-# OPTION='RIGI_THER',),);
- panel=create_command("MACRO_MATR_ASSE",panel)
- command=panel.node
- panel=select_child("NUME_DDL",command)
- set_sdco("DDL1",panel)
- panel=select_child("MODELE",command)
- choose_assd("AFFE1",panel)
- panel=select_child("MATR_ASSE",command)
- matr=panel.node
- panel=select_child("OPTION",matr)
- choose_valeur("RIGI_THER",panel)
- panel=select_child("MATRICE",matr)
- set_sdco("MAT1",panel)
- panel=select_node(command)
- command.collapse()
-#MACRO_MATR_ASSE(MODELE=AFFE1,
-# NUME_DDL=DDL1,
-# MATR_ASSE=_F(MATRICE=MAT1,
-# OPTION='RIGI_THER',),);
- panel=create_command("MACRO_MATR_ASSE",panel)
- command=panel.node
- panel=select_child("NUME_DDL",command)
- choose_sdco("DDL1",panel)
- panel=select_child("MODELE",command)
- choose_assd("AFFE1",panel)
- panel=select_child("MATR_ASSE",command)
- matr=panel.node
- panel=select_child("OPTION",matr)
- choose_valeur("RIGI_THER",panel)
- panel=select_child("MATRICE",matr)
- set_sdco("MAT2",panel)
- panel=select_node(command)
- command.collapse()
-
- assert j.isvalid(),j.report()
+++ /dev/null
-# -*- coding: utf-8 -*-
-# Modules Python
-import os
-import unittest
-import difflib
-import compare
-import sys
-import Tkinter
-
-# Modules Eficas
-import prefs
-from Editeur import session
-from InterfaceTK import eficas_go,splash,eficas,images
-from common import *
-
-
-class TestCase(unittest.TestCase):
- def setUp(self):
- self.root = Tkinter.Tk()
- images.update_cache()
- # Analyse des arguments de la ligne de commande
- options=session.parse([])
- options.cata="v9"
- pass
-
- def tearDown(self):
- self.root.destroy()
- init_common(None,None)
- pass
-
- def test000(self):
- root=self.root
- code="ASTER"
- splash.init_splash(root,code=code,titre="Lancement d'EFICAS pour %s" %code)
- splash._splash.configure(text="Chargement d'EFICAS en cours.\n Veuillez patienter ...")
- app=eficas.EFICAS(root,code=code)
- j=app.bureau.newJDC()
- jdcdisplay=app.bureau.JDCDisplay_courant
- init_common(root,jdcdisplay)
-
- # commande DEBUT
- co=j.addentite("DEBUT",0)
- # commande FIN
- co=j.addentite("FIN",1)
-
- jdctree=jdcdisplay.tree.tree.children[0]
- panel=select_child("DEBUT",jdctree)
- panel=create_command("LIRE_MAILLAGE",panel)
- panel=nomme_concept("MA",panel)
-
- panel=create_command("AFFE_MODELE",panel)
- command=panel.node
- select_child("MAILLAGE",command)
- panel=select_node(command)
- panel=create_mocle("AFFE",panel)
- parent=panel.node
- panel=select_child("PHENOMENE",parent)
- choose_valeur("MECANIQUE",panel)
- panel=select_child("b_mecanique",parent)
- panel=select_child("MODELISATION",panel.node)
- add_valeur_into("3D",panel)
- add_valeur_into("3D_FLUIDE",panel)
- valider_valeur(panel)
- panel=select_node(parent)
- panel=create_mocle("TOUT",panel)
- choose_valeur("OUI",panel)
- panel=select_node(command)
- panel=nomme_concept("MO",panel)
-
- assert j.isvalid(),j.report()
+++ /dev/null
-# -*- coding: utf-8 -*-
-# Modules Python
-import os
-import unittest
-import difflib
-import compare
-import sys
-import Tkinter
-
-# Modules Eficas
-import prefs
-from Editeur import session
-from InterfaceTK import eficas_go,splash,eficas,images
-from common import *
-
-
-class TestCase(unittest.TestCase):
- def setUp(self):
- self.root = Tkinter.Tk()
- images.update_cache()
- # Analyse des arguments de la ligne de commande
- options=session.parse([])
- options.cata="petit"
- pass
-
- def tearDown(self):
- self.root.destroy()
- init_common(None,None)
- pass
-
- def test000(self):
- root=self.root
- code="ASTER"
- splash.init_splash(root,code=code,titre="Lancement d'EFICAS pour %s" %code)
- splash._splash.configure(text="Chargement d'EFICAS en cours.\n Veuillez patienter ...")
- app=eficas.EFICAS(root,code=code)
- j=app.bureau.newJDC()
- jdcdisplay=app.bureau.JDCDisplay_courant
- init_common(root,jdcdisplay)
-
- # commande DEBUT
- co=j.addentite("DEBUT",0)
- # commande FIN
- co=j.addentite("FIN",1)
-
- jdctree=jdcdisplay.tree.tree.children[0]
- panel=select_child("DEBUT",jdctree)
- panel=create_command("TESTS_VALID",panel)
- command=panel.node
- panel=select_child("LongStr",command)
- set_valeur("aaa",panel)
- panel=select_child("ListStr",command)
- add_valeur("aaa",panel)
- add_valeur("bbbb,ccc",panel)
- valider_valeur(panel)
- panel=select_child("PairVal",command)
- add_valeur(2,panel)
- add_valeur("4,6",panel)
- valider_valeur(panel)
- panel=select_child("RangeVal",command)
- set_valeur(4,panel)
- panel=select_child("CardVal",command)
- add_valeur("4,6,5,7",panel)
- valider_valeur(panel)
- panel=select_child("EnumVal",command)
- choose_valeur(3,panel)
- panel=select_child("OrdList",command)
- add_valeur("4,6,5,7",panel)
- valider_valeur(panel)
- panel=select_child("OrdList2",command)
- add_valeur_into(2,panel)
- valider_valeur(panel)
- panel=select_child("TypeVal",command)
- set_valeur(5,panel)
- panel=select_child("Compul",command)
- add_valeur("2",panel)
- add_valeur("1",panel)
- valider_valeur(panel)
- panel=select_child("CompulInto",command)
- add_valeur_into(2,panel)
- add_valeur_into(1,panel)
- valider_valeur(panel)
- panel=select_child("Norep",command)
- add_valeur("2",panel)
- valider_valeur(panel)
- panel=select_child("NorepInto",command)
- add_valeur_into(2,panel)
- valider_valeur(panel)
-
- panel=select_node(command)
- panel=nomme_concept("MA",panel)
-
- assert j.isvalid(),j.report()
+++ /dev/null
-# -*- coding: utf-8 -*-
-# Modules Python
-import os
-import unittest
-import difflib
-import compare
-import sys
-import Tkinter
-
-# Modules Eficas
-import prefs
-from Editeur import session
-from InterfaceTK import eficas_go,splash,eficas,images
-from common import *
-
-
-class TestCase(unittest.TestCase):
- def setUp(self):
- self.root = Tkinter.Tk()
- images.update_cache()
- # Analyse des arguments de la ligne de commande
- options=session.parse([])
- options.cata="v9"
- pass
-
- def tearDown(self):
- self.root.destroy()
- init_common(None,None)
- pass
-
- def test000(self):
- root=self.root
- code="ASTER"
- splash.init_splash(root,code=code,titre="Lancement d'EFICAS pour %s" %code)
- splash._splash.configure(text="Chargement d'EFICAS en cours.\n Veuillez patienter ...")
- app=eficas.EFICAS(root,code=code)
- file=os.path.join(prefs.INSTALLDIR,"Tests/testelem/az.comm")
- j=app.bureau.openJDC(file=file)
- jdcdisplay=app.bureau.JDCDisplay_courant
- init_common(root,jdcdisplay)
- jdctree=jdcdisplay.tree.tree.children[0]
- #commentariser commande MACRO_MATR_ASSE
- panel=select_child("MACRO_MATR_ASSE",jdctree)
- panel=comment_command(panel)
- #decommentariser commande MACRO_MATR_ASSE
- panel=uncomment_command(panel)
- #creation commande commentée
- panel=create_command("LIRE_MAILLAGE",panel)
- panel=comment_command(panel)
- panel=change_commandcomm("mm=LIRE_MAILLAGE(INFO=2,UNITE=21)",panel)
- panel=uncomment_command(panel)
- panel=select_child("DEFI_FONCTION",jdctree)
- delete_node(panel)
-
- assert j.isvalid(),j.report()
--- /dev/null
+# coding: utf-8\r
+#\r
+from Accas import JDC_CATA\r
+\r
+JdC = JDC_CATA(code='EMPTY',\r
+ execmodul=None,\r
+ )\r
+\r
--- /dev/null
+# coding: utf-8\r
+#\r
+from Accas import JDC_CATA, PROC, EXAMPLE\r
+\r
+JdC = JDC_CATA(code='PATTERNS',\r
+ execmodul=None,\r
+ )\r
+\r
+\r
+EXAMPLE = PROC (nom = 'EXAMPLE',\r
+ op=None,\r
+\r
+ TITRE = SIMP(statut ='o', typ = 'TXM', defaut = 'Mon Etude',),\r
+ TITRE2 = SIMP(statut ='f', typ = 'TXM', ),\r
+)\r
+CREEOBJET = OPER (nom="CREEOBJET",\r
+ op=None,\r
+ sd_prod=ObjetUtilisateur,\r
+ UIinfo={"groupes":("Group1",)},\r
+\r
+ TITLE = SIMP(statut ='o', typ = 'TXM', defaut = '',),\r
+ RB1 = SIMP(statut ='o', typ = 'I', into = [1,2,3],),\r
+ RB2 = SIMP(statut ='o', typ = 'I', into = [1,2,3,4,5,6,],),\r
+ CB = SIMP(statut ='o', typ = 'I', into = [1,2,3,4,5,6,7,8,9],),\r
+ MBool = SIMP(statut ='o', typ = bool,),\r
+ MFile = SIMP(statut ='o', typ = ('Fichier','All Files (*)')),\r
+ MDir = SIMP(statut ='o', typ = 'Repertoire'),\r
+ Reel1 = SIMP(statut ='o', typ = 'R'),\r
+ Compl = SIMP(statut ='o', typ = 'C'),\r
+ Tuple2 = SIMP(statut ='o', typ = Tuple(2), validators=VerifTypeTuple(('R','R'))),\r
+ Tuple3 = SIMP(statut ='o', typ = Tuple(3), validators=VerifTypeTuple(('R','R','R'))),\r
+\r
+ LTITLE = SIMP(statut ='o', typ = 'TXM', max='**', defaut = '',),\r
+ LRB2 = SIMP(statut ='o', typ = 'I', max = '**', into = [1,2,3,4,5,6,],),\r
+ LCB = SIMP(statut ='o', typ = 'I', max = '**', homo="SansOrdreNiDoublon", into = [1,2,3,4,5,6,7,8,9],),\r
+ LReel1 = SIMP(statut ='o', typ = 'R', max = "**"),\r
+ LCompl = SIMP(statut ='o', typ = 'C', max = "**"),\r
+ LTuple2 = SIMP(statut ='o', typ = Tuple(2), validators=VerifTypeTuple(('R','R')), max = "**"),\r
+ LTuple3 = SIMP(statut ='o', typ = Tuple(3), validators=VerifTypeTuple(('R','R','R')), max = "**"),\r
+\r
+ LREEL = SIMP(statut ='f', typ = 'R', max='**', defaut = '',),\r
+)\r
+\r
+UTILISEOBJET = PROC (nom="UTILISEOBJET",\r
+ op=None,\r
+ UIinfo={"groupes":("Group1",)},\r
+ Obj = SIMP (statut ='o', typ = ObjetUtilisateur,)\r
+)\r
+\r
+ESSAI_FACT=OPER(nom="ESSAI_FACT",\r
+ sd_prod=ObjetUtilisateur,\r
+ op=None,\r
+ fr="Affectation de caractéristiques à des éléments de structure",\r
+ regles = (AU_MOINS_UN('Poutre','Barre'),\r
+ EXCLUS('Discret','Discret_2D'),),\r
+ Info = SIMP(statut='f',typ='I', defaut= 1 ,into=(1,2) ),\r
+ Verif = SIMP(statut='f',typ='TXM',validators=NoRepeat(),max='**',into=("Maille","Noeud") ),\r
+#\r
+# ==============================================================================\r
+ Poutre = FACT(statut= 'f',max= '**',\r
+ Section = SIMP(statut= 'o',typ= 'TXM' ,into= ("GENERALE","RECTANGLE","CERCLE") ),\r
+\r
+ b_generale = BLOC(condition = " Section == 'GENERALE'",\r
+ regles = (UN_PARMI('Maille','GroupeMailles'),),\r
+ Maille = SIMP(statut= 'f',typ= 'TXM' ,validators= NoRepeat(),max= '**'),\r
+ GroupeMailles = SIMP(statut= 'f',typ= grma,validators= NoRepeat(),max= '**'),\r
+\r
+ Vari = SIMP(statut= 'f',typ= 'TXM',into= ("CONSTANT","HOMOTHETIQUE"),defaut= "CONSTANT"),\r
+\r
+ b_constant = BLOC(condition = "Vari == 'CONSTANT'",\r
+ regles = (PRESENT_ABSENT('Table','Cara'),\r
+ PRESENT_PRESENT('Table','Nom'),\r
+ PRESENT_PRESENT('Cara','Valeur'),),\r
+ Table = SIMP(statut= 'f',typ='TXM'),\r
+ Nom = SIMP(statut= 'f',typ= 'TXM'),\r
+ Cara = SIMP(statut= 'o',typ= 'TXM',min= 4 ,max= 5,\r
+ fr= "A,IY,IZ,JX sont des paramètres obligatoires",\r
+ validators= [NoRepeat(), Compulsory(['A','IY','IZ','JX'])],\r
+ into= ("A","IY","IZ","AY","AZ","EY","EZ","JX","RY","RZ","RT","JG","IYR2","IZR2","AI") ),\r
+ Valeur = SIMP(statut= 'f',typ= 'R',min= 4 ,max= 15),\r
+ ),\r
+ ),\r
+ b_rectangle = BLOC(condition = "Section == 'RECTANGLE'",\r
+ regles = (UN_PARMI('Maille','GroupeMailles'),),\r
+ Maille = SIMP(statut= 'f',typ= 'TXM' ,validators= NoRepeat(),max= '**'),\r
+ GroupeMailles = SIMP(statut= 'f',typ= grma,validators= NoRepeat(),max= '**'),\r
+ Vari = SIMP(statut= 'f',typ= 'TXM',into= ("CONSTANT","HOMOTHETIQUE","AFFINE"),defaut= "CONSTANT"),\r
+ b_constant = BLOC(condition = "Vari == 'CONSTANT'",\r
+ Cara = SIMP(statut= 'o',typ= 'TXM',min= 1 ,max= 4,\r
+ validators = [NoRepeat(),\r
+ OrVal( [AndVal( [Compulsory(['H']),Absent(['HY','HZ','EPY','EPZ'])] ),\r
+ AndVal( [Compulsory(['HY','HZ']),Together(['EPY','EPZ']),Absent(['H','EP'])] )] )],\r
+ into= ("H","EP", "HY","HZ","EPY","EPZ"),),\r
+ Valeur = SIMP(statut= 'o',typ= 'R',min= 1 ,max= 4),\r
+ ),\r
+\r
+ Metrique = SIMP(statut= 'f',typ= 'TXM',defaut= "NON",into= ("OUI","NON") ),\r
+ Fcx = SIMP(statut= 'f',typ= 'R'),\r
+ Tuyau = SIMP(statut= 'f',typ= 'I',val_max= 10,defaut= 3),\r
+ ),\r
+ ),\r
+#\r
+# ==============================================================================\r
+ Barre = FACT(statut='f',max='**',\r
+ regles = (UN_PARMI('Maille','GroupeMailles'),),\r
+ Maille = SIMP(statut='f',typ='TXM' ,validators=NoRepeat(),max='**'),\r
+ GroupeMailles = SIMP(statut='f',typ=grma,validators=NoRepeat(),max='**'),\r
+ Section = SIMP(statut='o',typ='TXM',into=("GENERALE","RECTANGLE","CERCLE") ),\r
+ b_generale = BLOC(condition = "Section=='GENERALE'",\r
+ regles = (PRESENT_ABSENT('Table','Cara'),\r
+ PRESENT_PRESENT('Table','Nom'),\r
+ PRESENT_PRESENT('Cara','Valeur')),\r
+ Table = SIMP(statut='f',typ='TXM'),\r
+ Nom = SIMP(statut='f',typ='TXM',validators=LongStr(1,24) ),\r
+ Cara = SIMP(statut='f',typ='TXM',into=("A",) ),\r
+ Valeur = SIMP(statut='f',typ='R',min=1,max=1 ),\r
+ ),\r
+ b_rectangle = BLOC(condition = "Section=='RECTANGLE'",\r
+ Cara = SIMP(statut='o',typ='TXM', min=1, max=4,\r
+ validators = [NoRepeat(),\r
+ OrVal( [AndVal( [Compulsory(['H']),Absent(['HY','HZ','EPY','EPZ'])] ),\r
+ AndVal( [Compulsory(['HY','HZ']),Together(['EPY','EPZ']),Absent(['H','EP'])] )] )],\r
+ into=("H","EP","HZ","HY","EPY","EPZ"), ),\r
+ Valeur = SIMP(statut='o',typ='R',min=1,max=4 ), ),\r
+ b_cercle = BLOC(condition = "Section=='CERCLE'",\r
+ Cara = SIMP(statut='o',typ='TXM',validators=[NoRepeat(),Compulsory(['R'])],min=1,max=2,into=("R","EP") ),\r
+ Valeur = SIMP(statut='o',typ='R',min=1,max=2 ), ),\r
+ ),\r
+#\r
+# ==============================================================================\r
+ Discret = FACT(statut='f',max='**',\r
+ REPERE = SIMP(statut='f',typ='TXM',into=("LOCAL","GLOBAL") ),\r
+ AMOR_HYST = SIMP(statut='f',typ='R' ),\r
+ SYME = SIMP(statut='f',typ='TXM',defaut="OUI",into=("OUI","NON"),),\r
+ b_SYME_OUI = BLOC(condition="SYME=='OUI'",\r
+ fr="SYMETRIQUE: Affectation de matrices de rigidité, de masse ou d'amortissement à des mailles ou noeuds",\r
+ Cara = SIMP(statut='o',typ='TXM',validators=NoRepeat(),max=1,defaut="None",\r
+ into = ("K_T_D_N", "K_T_D_L", "K_TR_D_N", "K_TR_D_L", "K_T_N", "K_T_L", "K_TR_N", "K_TR_L",\r
+ "M_T_D_N", "M_T_D_L", "M_TR_D_N", "M_TR_D_L", "M_T_N", "M_T_L", "M_TR_N", "M_TR_L",\r
+ "A_T_D_N", "A_T_D_L", "A_TR_D_N", "A_TR_D_L", "A_T_N", "A_T_L", "A_TR_N", "A_TR_L",),),\r
+ # Affection des caractéristiques de RIGIDITE/AMORTISSEMENT/MASSE\r
+ b_AK_T_D_N = BLOC(condition = "((Cara=='K_T_D_N')or(Cara=='A_T_D_N'))",\r
+ fr = "Noeud: 3 valeurs (triangulaire supérieure par colonne)",\r
+ regles = (UN_PARMI('Maille','GroupeMailles','Noeud','GROUP_NO'),),\r
+ Noeud = SIMP(statut='f',typ='TXM' ,validators=NoRepeat(),max='**'),\r
+ GROUP_NO = SIMP(statut='f',typ=grno,validators=NoRepeat(),max='**'),\r
+ Maille = SIMP(statut='f',typ='TXM' ,validators=NoRepeat(),max='**'),\r
+ GroupeMailles = SIMP(statut='f',typ=grma,validators=NoRepeat(),homo='SansOrdreNiDoublon',max='**'),\r
+ Valeur = SIMP(statut='o',typ='R',min=3 ,max=3 ),),\r
+ ),\r
+ ),\r
+#\r
+# ==============================================================================\r
+ Discret_2D = FACT(statut='f',max='**',\r
+ REPERE = SIMP(statut='f',typ='TXM',into=("LOCAL","GLOBAL") ),\r
+ AMOR_HYST = SIMP(statut='f',typ='R' ),\r
+ SYME = SIMP(statut='f',typ='TXM',defaut="OUI",into=("OUI","NON"),),\r
+ ),\r
+)\r
+\r
+\r
--- /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
+#
+"""
+ cree le .xsd associe au .py
+ generateXSD.py -c leCatalogueAVECSONNOMCOMPLET POUR TROUVER LE DRIVER
+ 23 avril
+"""
+# Modules Python
+# Modules Eficas
+import sys
+import os
+sys.path.append(os.path.join(os.path.abspath(os.path.dirname(__file__)),'..'))
+
+from InterfaceQT4 import eficas_go
+eficas_go.genereStructure(code='NonConnu')
--- /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
+#
+"""
+""
+ cree le .xml associe au .comm
+ generateXML.py -c leCatalogue le.comm
+ 23 avril
+
+"""
+# Modules Python
+# Modules Eficas
+
+import sys
+import os
+sys.path.append(os.path.join(os.path.abspath(os.path.dirname(__file__)),'../'))
+
+from InterfaceQT4 import eficas_go
+eficas_go.genereXML(code='NonConnu')
--- /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
+#
+"""
+ cree le .xsd associe au .py
+ generateXSD.py -c leCatalogueAVECSONNOMCOMPLET POUR TROUVER LE DRIVER
+ 23 avril
+"""
+# Modules Python
+# Modules Eficas
+import sys
+import os
+sys.path.append(os.path.join(os.path.abspath(os.path.dirname(__file__)),'..'))
+
+from InterfaceQT4 import eficas_go
+eficas_go.genereXSD(code='NonConnu')
--- /dev/null
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+# Copyright (C) 2007-2024 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 contre l avis de Pascale sans directory associee
+ Dans ce cas on peut taper
+ a) de n importe ou sans avoir rien positionne :
+ /leCheminVersTools/qtEficasGui.py -c leFichierCatalogueAvecSonPathComplet
+ b) En ayant positionne le PYTHONPATH avec la directory qui contient ce qu il faut
+ c est a dire le prefs.py et prefs_leCode.py
+ exemple pour Adao
+ /leCheminVersTools/qtEficasGui.py -k Adao
+ /leCheminVersTools/qtEficasGui.py -k Adao -v V95
+ version du 23 avril
+
+"""
+# Modules Python
+# Modules Eficas
+
+import sys
+import os
+
+repIni=os.path.dirname(os.path.abspath(__file__))
+INSTALLDIR=os.path.join(repIni,'..')
+sys.path[:0]=[INSTALLDIR]
+#sys.path.append(os.path.join(os.path.abspath(os.path.dirname(__file__)),'../..'))
+
+from Editeur import eficas_go
+eficas_go.lanceEficas(code='NonConnu')
--- /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
+#
+"""
+""
+ cree le .xml associe au .comm
+ generateXML.py -c leCatalogue le.comm
+ 23 avril
+
+"""
+# Modules Python
+# Modules Eficas
+
+import sys
+import os
+sys.path.append(os.path.join(os.path.abspath(os.path.dirname(__file__)),'../'))
+
+from InterfaceQT4 import eficas_go
+eficas_go.validateDataSet(code='NonConnu')