#
__version__="$Name: $"
-__Id__="$Id: cata_STA6.py,v 1.5 2004/09/10 15:51:42 eficas Exp $"
+__Id__="$Id: cata.py,v 1.1 2004/11/19 09:06:20 eficas Exp $"
#
JdC = JDC_CATA(code='ASTER',
execmodul=None,
# ======================================================================
# RESPONSABLE JMBHH01 J.M.PROIX
-from Macro.macro_cara_poutre_ops import macro_cara_poutre_ops
+from Macro.macr_cara_poutre_ops import macro_cara_poutre_ops
MACRO_CARA_POUTRE=MACRO(nom="MACRO_CARA_POUTRE",op=macro_cara_poutre_ops,sd_prod=tabl_cara_geom,
docu="U4.42.02-d1",reentrant='n',
# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE.
# ======================================================================
-from Macro.pre_gmsh_ops import pre_gmsh_ops
+from cataSTA6.pre_gmsh_ops import pre_gmsh_ops
PRE_GMSH=MACRO(nom="PRE_GMSH",op=pre_gmsh_ops,docu="U7.01.01-f",
UIinfo={"groupes":("Gestion du travail",)},
--- /dev/null
+# -*- coding: utf-8 -*-
+#@ MODIF pre_gmsh_ops Macro DATE 11/06/2002 AUTEUR DURAND C.DURAND
+# 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.
+# ======================================================================
+
+def pre_gmsh_ops(self,UNITE_MAILLAGE,UNITE_GMSH,MODI_QUAD,**args):
+ """
+ Ecriture de la macro PRE_GMSH
+ """
+ import os
+ from Macro.ajout_quad_gmsh import ajout_quad_gmsh
+ ier=0
+
+ PRE_GMSH_LECT =self.get_cmd('PRE_GMSH_LECT')
+
+ # La macro compte pour 1 dans la numerotation des commandes
+ self.icmd=1
+
+ if MODI_QUAD=='OUI':
+ cur_dir=os.getcwd()
+ unit = str(UNITE_GMSH)
+ nomFichierGmsh = cur_dir+'/fort.'+unit
+ nomFichierMail = cur_dir+'/sortie'
+
+# récupération du fichier .msh complet mis dans la string 'texte'
+
+ fproc=open(nomFichierGmsh,'r')
+ texte=fproc.read()
+ fproc.close()
+
+ resu=ajout_quad_gmsh(texte)
+ if not resu:
+ ier=ier+1
+ self.cr.fatal("Erreur dans la methode python de transformation mailles lineaires-quadratiques")
+ return ier
+
+ fsort=open(nomFichierMail,'w')
+ fsort.write(resu)
+ fsort.close()
+ os.system('cp '+nomFichierMail+' '+nomFichierGmsh)
+
+ PRE_GMSH_LECT(UNITE_MAILLAGE = UNITE_MAILLAGE,
+ UNITE_GMSH = UNITE_GMSH )
+
+ return ier
+