From: pascale.noyret Date: Wed, 21 Jul 2021 15:32:31 +0000 (+0200) Subject: fin du menage X-Git-Tag: livraison11Oct21~16 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=077439ef6c2658c74d473ce67113108334b450ed;p=tools%2Feficas.git fin du menage --- diff --git a/MED/CataAZ.py b/MED/CataAZ.py deleted file mode 100755 index b6e6494e..00000000 --- a/MED/CataAZ.py +++ /dev/null @@ -1,210 +0,0 @@ -# coding: utf-8 -import types -from Accas import * - -class grno(GEOM): - """ - Classe servant à définir le nom d'un groupe de noeuds dans le fichier de commande - En clair : un chaine de longueur 24. - """ - def __convert__(cls,valeur): - """ - Fonction de verification de la longueur de la chaine - """ - if isinstance(valeur, (str,unicode)) and len(valeur.strip()) <= 24: - return valeur.strip() - raise ValueError(_(u'On attend une chaine de caractères (de longueur <= 24).')) - __convert__ = classmethod(__convert__) - -class grma(GEOM): - """ - Classe servant à définir le nom d'un groupe de mailles dans le fichier de commande - En clair : un chaine de longueur 24. - """ - def __convert__(cls,valeur): - """ - Fonction de verification de la longueur de la chaine - """ - if isinstance(valeur, (str,unicode)) and len(valeur.strip()) <= 24: - return valeur.strip() - raise ValueError(_(u'On attend une chaine de caractères (de longueur <= 24).')) - __convert__ = classmethod(__convert__) - - -class Tuple: - def __init__(self,ntuple): - self.ntuple=ntuple - - def __convert__(self,valeur): - if type(valeur) == types.StringType: return None - if len(valeur) != self.ntuple: return None - return valeur - - def info(self): - return "Tuple de %s elements" % self.ntuple - - __repr__=info - __str__=info - -class ObjetUtilisateur(ASSD): pass - - -JdC = JDC_CATA(code='PATTERNS', - execmodul=None, - ) - - -EXAMPLE = PROC (nom = 'EXAMPLE', - op=None, - - TITRE = SIMP(statut ='o', typ = 'TXM', defaut = 'Mon Etude',), - TITRE2 = SIMP(statut ='f', typ = 'TXM', ), -) -CREEOBJET = OPER (nom="CREEOBJET", - op=None, - sd_prod=ObjetUtilisateur, - UIinfo={"groupes":("Group1",)}, - - TITLE = SIMP(statut ='o', typ = 'TXM', defaut = '',), - RB1 = SIMP(statut ='o', typ = 'I', into = [1,2,3],), - RB2 = SIMP(statut ='o', typ = 'I', into = [1,2,3,4,5,6,],), - CB = SIMP(statut ='o', typ = 'I', into = [1,2,3,4,5,6,7,8,9],), - MBool = SIMP(statut ='o', typ = bool,), - MFile = SIMP(statut ='o', typ = ('Fichier','All Files (*)')), - MDir = SIMP(statut ='o', typ = 'Repertoire'), - Reel1 = SIMP(statut ='o', typ = 'R'), - Compl = SIMP(statut ='o', typ = 'C'), - Tuple2 = SIMP(statut ='o', typ = Tuple(2), validators=VerifTypeTuple(('R','R'))), - Tuple3 = SIMP(statut ='o', typ = Tuple(3), validators=VerifTypeTuple(('R','R','R'))), - InSalome = SIMP(statut ='o', typ = SalomeEntry), - - LTITLE = SIMP(statut ='o', typ = 'TXM', max='**', defaut = '',), - LRB2 = SIMP(statut ='o', typ = 'I', max = '**', into = [1,2,3,4,5,6,],), - LCB = SIMP(statut ='o', typ = 'I', max = '**', homo="SansOrdreNiDoublon", into = [1,2,3,4,5,6,7,8,9],), - LReel1 = SIMP(statut ='o', typ = 'R', max = "**"), - LCompl = SIMP(statut ='o', typ = 'C', max = "**"), - LTuple2 = SIMP(statut ='o', typ = Tuple(2), validators=VerifTypeTuple(('R','R')), max = "**"), - LTuple3 = SIMP(statut ='o', typ = Tuple(3), validators=VerifTypeTuple(('R','R','R')), max = "**"), - LInSalome = SIMP(statut ='o', typ = SalomeEntry, max="**"), - - LREEL = SIMP(statut ='f', typ = 'R', max='**', defaut = '',), -) - -UTILISEOBJET = PROC (nom="UTILISEOBJET", - op=None, - UIinfo={"groupes":("Group1",)}, - Obj = SIMP (statut ='o', typ = ObjetUtilisateur,) -) - -ESSAI_FACT=OPER(nom="ESSAI_FACT", - sd_prod=ObjetUtilisateur, - op=None, - fr="Affectation de caractéristiques à des éléments de structure", - regles = (AU_MOINS_UN('Poutre','Barre'), - EXCLUS('Discret','Discret_2D'),), - Info = SIMP(statut='f',typ='I', defaut= 1 ,into=(1,2) ), - Verif = SIMP(statut='f',typ='TXM',validators=NoRepeat(),max='**',into=("Maille","Noeud") ), -# -# ============================================================================== - Poutre = FACT(statut= 'f',max= '**', - Section = SIMP(statut= 'o',typ= 'TXM' ,into= ("GENERALE","RECTANGLE","CERCLE") ), - - b_generale = BLOC(condition = " Section == 'GENERALE'", - regles = (UN_PARMI('Maille','GroupeMailles'),), - Maille = SIMP(statut= 'f',typ= 'TXM' ,validators= NoRepeat(),max= '**'), - GroupeMailles = SIMP(statut= 'f',typ= grma,validators= NoRepeat(),max= '**'), - - Vari = SIMP(statut= 'f',typ= 'TXM',into= ("CONSTANT","HOMOTHETIQUE"),defaut= "CONSTANT"), - - b_constant = BLOC(condition = "Vari == 'CONSTANT'", - regles = (PRESENT_ABSENT('Table','Cara'), - PRESENT_PRESENT('Table','Nom'), - PRESENT_PRESENT('Cara','Valeur'),), - Table = SIMP(statut= 'f',typ='TXM'), - Nom = SIMP(statut= 'f',typ= 'TXM'), - Cara = SIMP(statut= 'o',typ= 'TXM',min= 4 ,max= 5, - fr= "A,IY,IZ,JX sont des paramètres obligatoires", - validators= [NoRepeat(), Compulsory(['A','IY','IZ','JX'])], - into= ("A","IY","IZ","AY","AZ","EY","EZ","JX","RY","RZ","RT","JG","IYR2","IZR2","AI") ), - Valeur = SIMP(statut= 'f',typ= 'R',min= 4 ,max= 15), - ), - ), - b_rectangle = BLOC(condition = "Section == 'RECTANGLE'", - regles = (UN_PARMI('Maille','GroupeMailles'),), - Maille = SIMP(statut= 'f',typ= 'TXM' ,validators= NoRepeat(),max= '**'), - GroupeMailles = SIMP(statut= 'f',typ= grma,validators= NoRepeat(),max= '**'), - Vari = SIMP(statut= 'f',typ= 'TXM',into= ("CONSTANT","HOMOTHETIQUE","AFFINE"),defaut= "CONSTANT"), - b_constant = BLOC(condition = "Vari == 'CONSTANT'", - Cara = SIMP(statut= 'o',typ= 'TXM',min= 1 ,max= 4, - validators = [NoRepeat(), - OrVal( [AndVal( [Compulsory(['H']),Absent(['HY','HZ','EPY','EPZ'])] ), - AndVal( [Compulsory(['HY','HZ']),Together(['EPY','EPZ']),Absent(['H','EP'])] )] )], - into= ("H","EP", "HY","HZ","EPY","EPZ"),), - Valeur = SIMP(statut= 'o',typ= 'R',min= 1 ,max= 4), - ), - - Metrique = SIMP(statut= 'f',typ= 'TXM',defaut= "NON",into= ("OUI","NON") ), - Fcx = SIMP(statut= 'f',typ= 'R'), - Tuyau = SIMP(statut= 'f',typ= 'I',val_max= 10,defaut= 3), - ), - ), -# -# ============================================================================== - Barre = FACT(statut='f',max='**', - regles = (UN_PARMI('Maille','GroupeMailles'),), - Maille = SIMP(statut='f',typ='TXM' ,validators=NoRepeat(),max='**'), - GroupeMailles = SIMP(statut='f',typ=grma,validators=NoRepeat(),max='**'), - Section = SIMP(statut='o',typ='TXM',into=("GENERALE","RECTANGLE","CERCLE") ), - b_generale = BLOC(condition = "Section=='GENERALE'", - regles = (PRESENT_ABSENT('Table','Cara'), - PRESENT_PRESENT('Table','Nom'), - PRESENT_PRESENT('Cara','Valeur')), - Table = SIMP(statut='f',typ='TXM'), - Nom = SIMP(statut='f',typ='TXM',validators=LongStr(1,24) ), - Cara = SIMP(statut='f',typ='TXM',into=("A",) ), - Valeur = SIMP(statut='f',typ='R',min=1,max=1 ), - ), - b_rectangle = BLOC(condition = "Section=='RECTANGLE'", - Cara = SIMP(statut='o',typ='TXM', min=1, max=4, - validators = [NoRepeat(), - OrVal( [AndVal( [Compulsory(['H']),Absent(['HY','HZ','EPY','EPZ'])] ), - AndVal( [Compulsory(['HY','HZ']),Together(['EPY','EPZ']),Absent(['H','EP'])] )] )], - into=("H","EP","HZ","HY","EPY","EPZ"), ), - Valeur = SIMP(statut='o',typ='R',min=1,max=4 ), ), - b_cercle = BLOC(condition = "Section=='CERCLE'", - Cara = SIMP(statut='o',typ='TXM',validators=[NoRepeat(),Compulsory(['R'])],min=1,max=2,into=("R","EP") ), - Valeur = SIMP(statut='o',typ='R',min=1,max=2 ), ), - ), -# -# ============================================================================== - Discret = FACT(statut='f',max='**', - REPERE = SIMP(statut='f',typ='TXM',into=("LOCAL","GLOBAL") ), - AMOR_HYST = SIMP(statut='f',typ='R' ), - SYME = SIMP(statut='f',typ='TXM',defaut="OUI",into=("OUI","NON"),), - b_SYME_OUI = BLOC(condition="SYME=='OUI'", - fr="SYMETRIQUE: Affectation de matrices de rigidité, de masse ou d'amortissement à des mailles ou noeuds", - Cara = SIMP(statut='o',typ='TXM',validators=NoRepeat(),max=1,defaut="None", - 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", - "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", - "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",),), - # Affection des caractéristiques de RIGIDITE/AMORTISSEMENT/MASSE - b_AK_T_D_N = BLOC(condition = "((Cara=='K_T_D_N')or(Cara=='A_T_D_N'))", - fr = "Noeud: 3 valeurs (triangulaire supérieure par colonne)", - regles = (UN_PARMI('Maille','GroupeMailles','Noeud','GROUP_NO'),), - Noeud = SIMP(statut='f',typ='TXM' ,validators=NoRepeat(),max='**'), - GROUP_NO = SIMP(statut='f',typ=grno,validators=NoRepeat(),max='**'), - Maille = SIMP(statut='f',typ='TXM' ,validators=NoRepeat(),max='**'), - GroupeMailles = SIMP(statut='f',typ=grma,validators=NoRepeat(),homo='SansOrdreNiDoublon',max='**'), - Valeur = SIMP(statut='o',typ='R',min=3 ,max=3 ),), - ), - ), -# -# ============================================================================== - Discret_2D = FACT(statut='f',max='**', - REPERE = SIMP(statut='f',typ='TXM',into=("LOCAL","GLOBAL") ), - AMOR_HYST = SIMP(statut='f',typ='R' ), - SYME = SIMP(statut='f',typ='TXM',defaut="OUI",into=("OUI","NON"),), - ), -) - - diff --git a/MED/Elementary_Lists_52996_Cata.py b/MED/Elementary_Lists_52996_Cata.py deleted file mode 100644 index f3cc11c8..00000000 --- a/MED/Elementary_Lists_52996_Cata.py +++ /dev/null @@ -1,86 +0,0 @@ -# coding: utf-8 - -from Accas import * - -#class myMesh(ASSD): pass -class myModel(ASSD): pass - -JdC = JDC_CATA(code='PATTERNS', - execmodul=None, - regles=(#AU_PLUS_UN('DEBUT', 'POURSUITE'), - AU_PLUS_UN('ALL_LISTS'), - #AU_PLUS_UN('FIN'), - A_CLASSER(('DEBUT', 'POURSUITE'), 'FIN') - ) -) - -class grma(): - def __convert__(cls,valeur): - if isinstance(valeur, (str,unicode)) and len(valeur.strip()) <= 24 : #and ("item" in (valeur.strip())) - return valeur.strip() - raise ValueError("Name length does not contain \"test\" and is longer than allowed, 24") - __convert__ = classmethod(__convert__) - -def mySeveral(suffix,num): - out=list() - for i in range(1,num+1): - out.append(suffix+str(i).zfill(2)) - return out - -switch_facultatif=True #change 'o' to 'f' of some widgets in the loop -#empty_defauts=True - -def myBloc(num): - myNum=str(num).zfill(2) - list_item_body="Item_"+myNum+"_" - defauts0=["","",True,"'phenomena_"+myNum+"'",mySeveral(list_item_body,2)] #presence of default values - defauts_mask=[False,False,True,True,True] #switch off defaults of some types - defauts=list() - for id0 in range(len(defauts0)): - if defauts_mask[id0]: - item=", defaut="+str(defauts0[id0]) - else: - item="" - defauts.append(item) - #print defauts - - opt=['o','o','o','o','o'] #initial default obligation of items in FACT groups - #make different widgets optional, one by one: - myLen=len(opt) - if switch_facultatif: - make_f=(num)%myLen - opt[make_f]='f' - #print opt - #if empty_defauts: - # clean_defaut=num%myLen - - myString="BLOC(condition=\"MESH==\'mesh_"+myNum+"'\""+defauts[0]+", AFFE=FACT(statut='"+opt[1]+"'"+defauts[1]+", ALL=SIMP(statut='"+opt[2]+"', typ=bool,ang='ALL "+myNum+" help EN'"+defauts[2]+"),PHENOMENA=SIMP(statut='"+opt[3]+"',typ='TXM',into=mySeveral('phenomena_',"+str(num)+")"+defauts[3]+"), MODELISATION=SIMP(statut='"+opt[4]+"',typ='TXM', min=2,max='**',into=mySeveral('"+list_item_body+"',"+str(num*4)+")"+defauts[4]+", ang='Input "+myNum+" list EN', fr='Input "+myNum+" list FR'),),)" - print myString - return eval(myString) - -ALL_LISTS=OPER(nom="ALL_LISTS",op=18,sd_prod=myModel, - UIinfo={"groupes":("Group1",)}, - ang="Model mesh definition EN", - reentrant='n', - #regles=(AU_MOINS_UN('LIST_O_CHECKTEXT','LIST_F_CHECKTEXT','LIST_O_ANY','LIST_F_ANY')), - - #LIST_O_NOREPEAT_CHECKTEXT=SIMP(statut='o',typ=grma,validators=NoRepeat(),min=3, max='**'), - #LIST_F_NOREPEAT_CHECKTEXT=SIMP(statut='f',typ=grma,validators=NoRepeat(),min=3, max='**'), - #LIST_F_REPEAT_CHECKTEXT=SIMP(statut='f',typ=grma,min=3, max='**'), - #LIST_O_REPEAT_CHECKTEXT=SIMP(statut='o',typ=grma,min=3, max='**'), - - #LIST_F_NOREPEAT_ANYTEXT=SIMP(statut='f',typ='TXM',validators=NoRepeat(),min=3, max='**'), - #LIST_O_NOREPEAT_ANYTEXT=SIMP(statut='o',typ='TXM',min=3,validators=NoRepeat(), max='**'), - #LIST_O_REPEAT_ANYTEXT=SIMP(statut='o',typ='TXM',min=3, max='**'), - #LIST_F_REPEAT_ANYTEXT=SIMP(statut='f',typ='TXM',min=3, max='**'), - - #LIST_O_NOREPEAT_CHECKTEXT_ADD=SIMP(statut='o',typ=grma,validators=NoRepeat(), into=("item01","text01","item02","text02","item03","text03",), min=3, max='**'), - #LIST_F_REPEAT_ANYTEXT_ADD=SIMP(statut='f',typ=grma,validators=NoRepeat(), into=("item01","text01","item02","text02","item03","text03",), min=3, max='**'), - - LIST_O_NOREPEAT_CHECKTEXT_ADD_NODEFAUT=SIMP(statut='o',typ=grma,validators=NoRepeat(), into=("item01","text01","item02","text02","item03","text03","item04","text04",), min=3, max='**'), - #LIST_O_NOREPEAT_CHECKTEXT_ADD_DEFAUT=SIMP(statut='o',typ=grma,validators=NoRepeat(), into=("item01","text01","item02","text02","item03","text03",), defaut=('item01','item02','item03'), min=3, max='**'), -) - -Classement_Commandes_Ds_Arbre=('DEBUT','MESH_TYPES','ALL_LISTS','FIN') - -Ordre_Des_Commandes = ('DEBUT','MESH_TYPES','ALL_LISTS','FIN') diff --git a/MED/Elementary_Lists_53000_Cata.py b/MED/Elementary_Lists_53000_Cata.py deleted file mode 100644 index 0dbba473..00000000 --- a/MED/Elementary_Lists_53000_Cata.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding: utf-8 -from Accas import * - -#class myMesh(ASSD): pass -class myModel(ASSD): pass - -JdC = JDC_CATA(code='PATTERNS', - execmodul=None, - regles=(#AU_PLUS_UN('DEBUT', 'POURSUITE'), - AU_PLUS_UN('ALL_LISTS'), - #AU_PLUS_UN('FIN'), - A_CLASSER(('DEBUT', 'POURSUITE'), 'FIN') - ) -) - - -ALL_LISTS=OPER(nom="ALL_LISTS",op=18,sd_prod=myModel, - UIinfo={"groupes":("Group1",)}, - ang="Model mesh definition EN", - reentrant='n', - LIST_O_NOREPEAT_CHECKTEXT_ADD_DEFAUT=SIMP(statut='o',typ="TXM",validators=NoRepeat(), - into=("item01","text01","item02","text02","item03","text03","item04","text04","item05","text05",), - defaut=('item01','item02','item03'), - homo="SansOrdreNiDoublon", - min=3, max='**'), - - #regles=(AU_MOINS_UN('LIST_O_CHECKTEXT','LIST_F_CHECKTEXT','LIST_O_ANY','LIST_F_ANY')), - - #LIST_O_NOREPEAT_CHECKTEXT=SIMP(statut='o',typ=grma,validators=NoRepeat(),min=3, max='**'), - #LIST_F_NOREPEAT_CHECKTEXT=SIMP(statut='f',typ=grma,validators=NoRepeat(),min=3, max='**'), - #LIST_F_REPEAT_CHECKTEXT=SIMP(statut='f',typ=grma,min=3, max='**'), - #LIST_O_REPEAT_CHECKTEXT=SIMP(statut='o',typ=grma,min=3, max='**'), - - #LIST_F_NOREPEAT_ANYTEXT=SIMP(statut='f',typ='TXM',validators=NoRepeat(),min=3, max='**'), - #LIST_O_NOREPEAT_ANYTEXT=SIMP(statut='o',typ='TXM',min=3,validators=NoRepeat(), max='**'), - #LIST_O_REPEAT_ANYTEXT=SIMP(statut='o',typ='TXM',min=3, max='**'), - #LIST_F_REPEAT_ANYTEXT=SIMP(statut='f',typ='TXM',min=3, max='**'), - - #LIST_O_NOREPEAT_CHECKTEXT_ADD=SIMP(statut='o',typ=grma,validators=NoRepeat(), into=("item01","text01","item02","text02","item03","text03",), min=3, max='**'), - #LIST_F_REPEAT_ANYTEXT_ADD=SIMP(statut='f',typ=grma,validators=NoRepeat(), into=("item01","text01","item02","text02","item03","text03",), min=3, max='**'), - - #LIST_O_NOREPEAT_CHECKTEXT_ADD_NODEFAUT=SIMP(statut='o',typ=grma,validators=NoRepeat(), into=("item01","text01","item02","text02","item03","text03","item04","text04",), min=3, max='**'), - - - #LIST_O_SANSORDRENODOUBLON_CHECKTEXT_DEFAUT=SIMP(statut='o',typ=grma,homo="SansOrdreNiDoublon", into=("item01","text01","item02","text02","item03","text03",), defaut=('item01','item02','item03'), min=3, max='**'), -) - - - -Classement_Commandes_Ds_Arbre=('DEBUT','MESH_TYPES','ALL_LISTS','FIN') - -Ordre_Des_Commandes = ('DEBUT','MESH_TYPES','ALL_LISTS','FIN') diff --git a/MED/Elementary_Lists_53013_Cata.py b/MED/Elementary_Lists_53013_Cata.py deleted file mode 100644 index cf371ff2..00000000 --- a/MED/Elementary_Lists_53013_Cata.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding: utf-8 -from Accas import * - -class myModel(ASSD): pass - -JdC = JDC_CATA(code='PATTERNS', - execmodul=None, - regles=(#AU_PLUS_UN('DEBUT', 'POURSUITE'), - AU_PLUS_UN('ALL_LISTS'), - #AU_PLUS_UN('FIN'), - A_CLASSER(('DEBUT', 'POURSUITE'), 'FIN') - ) -) - -class grma(): - def __convert__(cls,valeur): - if isinstance(valeur, (str,unicode)) and len(valeur.strip()) <= 12 and ("item" in (valeur.strip()).lower()): # - return valeur.strip() - raise ValueError("Name length does not contain \"test\" and is longer than allowed, 12") - __convert__ = classmethod(__convert__) - -def mySeveral(suffix,num): - out=list() - for i in range(1,num+1): - out.append(suffix+str(i).zfill(2)) - return out - -ALL_LISTS=OPER(nom="ALL_LISTS",op=18,sd_prod=myModel, - UIinfo={"groupes":("Group1",)}, - fr="All lists definition FR", - ang="All lists definition EN", - reentrant='n', - #regles=(AU_MOINS_UN('LIST_O_CHECKTEXT','LIST_F_CHECKTEXT','LIST_O_ANY','LIST_F_ANY')), - - L1_LIST_O_NOREPEAT_CHECKTEXT=SIMP(statut='o',typ=grma,validators=NoRepeat(),min=3, max='**', ang='Obligatory, No Repetitions, checked text, EN'), - L2_LIST_F_NOREPEAT_CHECKTEXT=SIMP(statut='f',typ=grma,validators=NoRepeat(),min=3, max='**', ang='Optional, No Repetitions, checked text, EN'), - L3_LIST_F_REPEAT_CHECKTEXT=SIMP(statut='f',typ=grma,min=3, max='**',ang='Optional, Allowed Repetitions, checked text, EN'), - L4_LIST_O_REPEAT_CHECKTEXT=SIMP(statut='o',typ=grma,min=3, max='**',ang='Obligatory, Allowed Repetitions, checked text, EN'), - - L5_LIST_F_NOREPEAT_ANYTEXT=SIMP(statut='f',typ='TXM',validators=NoRepeat(),min=3, max='**',ang='Optional, No Repetitions, any text, EN'), - L6_LIST_O_NOREPEAT_ANYTEXT=SIMP(statut='o',typ='TXM',min=3,validators=NoRepeat(), max='**',ang='Obligatory, No Repetitions, any text, EN'), - L7_LIST_O_REPEAT_ANYTEXT=SIMP(statut='o',typ='TXM',min=3, max='**',ang='Obligatory, Allowed Repetitions, any text, EN'), - L8_LIST_F_REPEAT_ANYTEXT=SIMP(statut='f',typ='TXM',min=3, max='**',ang='Optional, Allowed Repetitions, any text, EN'), - - L9_LIST_O_NOREPEAT_CHECKTEXT_ADD=SIMP(statut='o',typ=grma,validators=NoRepeat(), into=("item01","text01","item02","text02","item03","text03",), min=3, max='**',ang='With spare list, Obligatory, No Repetitions, checked text, EN',), - L10_LIST_F_REPEAT_ANYTEXT_ADD=SIMP(statut='f',typ='TXM', into=("item01","text01","item02","text02","item03","text03",), min=3, max='**',ang='With spare list, Optional, Allowed Repetitions, any text, EN'), - L11_LIST_O_REPEAT_CHECKTEXT_ADD_NODEFAUT=SIMP(statut='o',typ=grma, into=("item01","text01","item02","text02","item03","text03","item04","text04"),ang='With spare list, obligatory, No Repetitions, checked text, no default values, EN', min=3, max='**'), - L12_LIST_O_NOREPEAT_CHECKTEXT_ADD_DEFAUT=SIMP(statut='o',typ=grma,validators=NoRepeat(), into=("item01","text01","item02","text02","item03","text03","item04","text04","item05","text05",), defaut=('item01','item02','item03'), min=3, max='**',ang='With spare list, Obligatory, No Repetitions, checked text, with default values EN'), - - L13_LIST_F_SANSORDRENODOUBLON_ANYTEXT_NODEFAUT=SIMP(statut='f',typ='TXM',homo="SansOrdreNiDoublon", into=("item01","text01","item02","text02","item03","text03",), min=3, max='**',ang='With check boxes, Optional, any text, no defaults, EN'), - L14_LIST_O_SANSORDRENODOUBLON_CHECKTEXT_NODEFAUT=SIMP(statut='o',typ=grma,homo="SansOrdreNiDoublon", into=("item01","text01","item02","text02","item03","text03",), min=3, max='**',ang='With check boxes, Obligatory, checked text, EN'), - L15_LIST_O_SANSORDRENODOUBLON_CHECKTEXT_DEFAUT=SIMP(statut='o',typ=grma,homo="SansOrdreNiDoublon", into=("item01","text01","item02","text02","item03","text03","item02","text02","item01","text01",), defaut=('item01','item02','item03'), min=3, max='**', ang='With check boxes, Obligatory, checked text, with default values, EN'), -) - - - -Classement_Commandes_Ds_Arbre=('DEBUT','MESH_TYPES','ALL_LISTS','FIN') - -Ordre_Des_Commandes = ('DEBUT','MESH_TYPES','ALL_LISTS','FIN') diff --git a/MED/Elementary_Lists_53036_Cata.py b/MED/Elementary_Lists_53036_Cata.py deleted file mode 100644 index 5cdc0faa..00000000 --- a/MED/Elementary_Lists_53036_Cata.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding: utf-8 -from Accas import * - -class myModel(ASSD): pass - -JdC = JDC_CATA(code='PATTERNS', - execmodul=None, - regles=(#AU_PLUS_UN('DEBUT', 'POURSUITE'), - AU_PLUS_UN('ALL_LISTS'), - #AU_PLUS_UN('FIN'), - A_CLASSER(('DEBUT', 'POURSUITE'), 'FIN') - ) -) - -class grma(): - def __convert__(cls,valeur): - if isinstance(valeur, (str,unicode)) and len(valeur.strip()) <= 12 and ("item" in (valeur.strip()).lower()): # - return valeur.strip() - raise ValueError("Name length does not contain \"item\" and is longer than allowed, 12") - __convert__ = classmethod(__convert__) - -def mySeveral(suffix,num): - out=list() - for i in range(1,num+1): - out.append(suffix+str(i).zfill(2)) - return out - -ALL_LISTS=OPER(nom="ALL_LISTS",op=18,sd_prod=myModel, - UIinfo={"groupes":("Group1",)}, - fr="All lists definition FR", - ang="All lists definition EN", - reentrant='n', - #regles=(AU_MOINS_UN('LIST_O_CHECKTEXT','LIST_F_CHECKTEXT','LIST_O_ANY','LIST_F_ANY')), - - L1_LIST_O_NOREPEAT_CHECKTEXT=SIMP(statut='o',typ=grma,validators=NoRepeat(),min=3, max='**', ang='Obligatory, No Repetitions, checked text, EN'), - L2_LIST_F_NOREPEAT_CHECKTEXT=SIMP(statut='f',typ=grma,validators=NoRepeat(),min=3, max='**', ang='Optional, No Repetitions, checked text, EN'), - L3_LIST_F_REPEAT_CHECKTEXT=SIMP(statut='f',typ=grma,min=3, max='**',ang='Optional, Allowed Repetitions, checked text, EN'), - L4_LIST_O_REPEAT_CHECKTEXT=SIMP(statut='o',typ=grma,min=3, max='**',ang='Obligatory, Allowed Repetitions, checked text, EN'), - - L5_LIST_F_NOREPEAT_ANYTEXT=SIMP(statut='f',typ='TXM',validators=NoRepeat(),min=3, max='**',ang='Optional, No Repetitions, any text, EN'), - L6_LIST_O_NOREPEAT_ANYTEXT=SIMP(statut='o',typ='TXM',min=3,validators=NoRepeat(), max='**',ang='Obligatory, No Repetitions, any text, EN'), - L7_LIST_O_REPEAT_ANYTEXT=SIMP(statut='o',typ='TXM',min=3, max='**',ang='Obligatory, Allowed Repetitions, any text, EN'), - L8_LIST_F_REPEAT_ANYTEXT=SIMP(statut='f',typ='TXM',min=3, max='**',ang='Optional, Allowed Repetitions, any text, EN'), - - L9_LIST_O_NOREPEAT_CHECKTEXT_ADD=SIMP(statut='o',typ=grma,validators=NoRepeat(), into=("item01","text01","item02","text02","item03","text03",), min=3, max='**',ang='With spare list, Obligatory, No Repetitions, checked text, EN',), - L10_LIST_F_REPEAT_ANYTEXT_ADD=SIMP(statut='f',typ='TXM', into=("item01","text01","item02","text02","item03","text03",), min=3, max='**',ang='With spare list, Optional, Allowed Repetitions, any text, EN'), - L11_LIST_O_REPEAT_CHECKTEXT_ADD_NODEFAUT=SIMP(statut='o',typ=grma, into=("item01","text01","item02","text02","item03","text03","item04","text04"),ang='With spare list, obligatory, No Repetitions, checked text, no default values, EN', min=3, max='**'), - L12_LIST_O_NOREPEAT_CHECKTEXT_ADD_DEFAUT=SIMP(statut='o',typ=grma,validators=NoRepeat(), into=("item01","text01","item02","text02","item03","text03","item04","text04","item05","text05",), defaut=('item01','item02','item03'), min=3, max='**',ang='With spare list, Obligatory, No Repetitions, checked text, with default values EN'), - - L13_LIST_F_SANSORDRENODOUBLON_ANYTEXT_NODEFAUT=SIMP(statut='f',typ='TXM',homo="SansOrdreNiDoublon", into=("item01","text01","item02","text02","item03","text03",), min=3, max='**',ang='With check boxes, Optional, any text, no defaults, EN'), - L14_LIST_O_SANSORDRENODOUBLON_CHECKTEXT_NODEFAUT=SIMP(statut='o',typ=grma,homo="SansOrdreNiDoublon", into=("item01","text01","item02","text02","item03","text03",), min=3, max='**',ang='With check boxes, Obligatory, checked text, EN'), - L15_LIST_O_SANSORDRENODOUBLON_CHECKTEXT_NOREPEAT_DEFAUT=SIMP(statut='o',typ=grma,homo="SansOrdreNiDoublon", into=("item01","text01","item02","text02","item03","text03","item03","text03","item02","text02","item01","text01",), defaut=('item01','item02','item03'), min=3, max='**', ang='With check boxes, Obligatory, checked text, with default values, EN'), #validators=NoRepeat(), -) - - - -Classement_Commandes_Ds_Arbre=('DEBUT','MESH_TYPES','ALL_LISTS','FIN') - -Ordre_Des_Commandes = ('DEBUT','MESH_TYPES','ALL_LISTS','FIN') diff --git a/MED/Elementary_Lists_Cata.py b/MED/Elementary_Lists_Cata.py deleted file mode 100755 index 92d20b35..00000000 --- a/MED/Elementary_Lists_Cata.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding: utf-8 -from Accas import * - -class myModel(ASSD): pass - -JdC = JDC_CATA(code='PATTERNS', - execmodul=None, - regles=(#AU_PLUS_UN('DEBUT', 'POURSUITE'), - AU_PLUS_UN('ALL_LISTS'), - #AU_PLUS_UN('FIN'), - A_CLASSER(('DEBUT', 'POURSUITE'), 'FIN') - ) -) - -class grma(): - def __convert__(cls,valeur): - if isinstance(valeur, (str,unicode)) and len(valeur.strip()) <= 12 and ("item" in (valeur.strip()).lower()): # - return valeur.strip() - raise ValueError("Name length does not contain \"test\" and is longer than allowed, 12") - __convert__ = classmethod(__convert__) - -def mySeveral(suffix,num): - out=list() - for i in range(1,num+1): - out.append(suffix+str(i).zfill(2)) - return out - -ALL_LISTS=OPER(nom="ALL_LISTS",op=18,sd_prod=myModel, - UIinfo={"groupes":("Group1",)}, - fr="All lists definition FR", - ang="All lists definition EN", - reentrant='n', - #regles=(AU_MOINS_UN('LIST_O_CHECKTEXT','LIST_F_CHECKTEXT','LIST_O_ANY','LIST_F_ANY')), - - L1_LIST_O_NOREPEAT_CHECKTEXT=SIMP(statut='o',typ=grma,validators=NoRepeat(),min=3, max='**', ang='Obligatory, No Repetitions, checked text, EN'), - L2_LIST_F_NOREPEAT_CHECKTEXT=SIMP(statut='f',typ=grma,validators=NoRepeat(),min=3, max='**', ang='Optional, No Repetitions, checked text, EN'), - L3_LIST_F_REPEAT_CHECKTEXT=SIMP(statut='f',typ=grma,min=3, max='**',ang='Optional, Allowed Repetitions, checked text, EN'), - L4_LIST_O_REPEAT_CHECKTEXT=SIMP(statut='o',typ=grma,min=3, max='**',ang='Obligatory, Allowed Repetitions, checked text, EN'), - - L5_LIST_F_NOREPEAT_ANYTEXT=SIMP(statut='f',typ='TXM',validators=NoRepeat(),min=3, max='**',ang='Optional, No Repetitions, any text, EN'), - L6_LIST_O_NOREPEAT_ANYTEXT=SIMP(statut='o',typ='TXM',min=3,validators=NoRepeat(), max='**',ang='Obligatory, No Repetitions, any text, EN'), - L7_LIST_O_REPEAT_ANYTEXT=SIMP(statut='o',typ='TXM',min=3, max='**',ang='Obligatory, Allowed Repetitions, any text, EN'), - L8_LIST_F_REPEAT_ANYTEXT=SIMP(statut='f',typ='TXM',min=3, max='**',ang='Optional, Allowed Repetitions, any text, EN'), - - L9_LIST_O_NOREPEAT_CHECKTEXT_ADD=SIMP(statut='o',typ=grma,validators=NoRepeat(), into=("item01","text01","item02","text02","item03","text03",), min=3, max='**',ang='With spare list, Obligatory, No Repetitions, checked text, EN',), - L10_LIST_F_REPEAT_ANYTEXT_ADD=SIMP(statut='f',typ='TXM', into=("item01","text01","item02","text02","item03","text03",), min=3, max='**',ang='With spare list, Optional, Allowed Repetitions, any text, EN'), - L11_LIST_O_REPEAT_CHECKTEXT_ADD_NODEFAUT=SIMP(statut='o',typ=grma, into=("item01","text01","item02","text02","item03","text03","item04","text04"),ang='With spare list, obligatory, No Repetitions, checked text, no default values, EN', min=3, max='**'), - L12_LIST_O_NOREPEAT_CHECKTEXT_ADD_DEFAUT=SIMP(statut='o',typ=grma,validators=NoRepeat(), into=("item01","text01","item02","text02","item03","text03","item04","text04","item05","text05",), defaut=('item01','item02','item03'), min=3, max='**',ang='With spare list, Obligatory, No Repetitions, checked text, with default values EN'), - - L13_LIST_F_SANSORDRENODOUBLON_ANYTEXT_NODEFAUT=SIMP(statut='f',typ='TXM',homo="SansOrdreNiDoublon", into=("item01","text01","item02","text02","item03","text03",), min=3, max='**',ang='With check boxes, Optional, any text, no defaults, EN'), - L14_LIST_O_SANSORDRENODOUBLON_CHECKTEXT_NODEFAUT=SIMP(statut='o',typ=grma,homo="SansOrdreNiDoublon", into=("item01","text01","item02","text02","item03","text03",), min=3, max='**',ang='With check boxes, Obligatory, checked text, EN'), - L15_LIST_O_SANSORDRENODOUBLON_CHECKTEXT_DEFAUT=SIMP(statut='o',typ=grma,homo="SansOrdreNiDoublon", into=("item01","text01","item02","text02","item03","text03",), defaut=('item01','item02','item03'), min=3, max='**', ang='With check boxes, Obligatory, checked text, with default values, EN'), -) - - - -Classement_Commandes_Ds_Arbre=('DEBUT','MESH_TYPES','ALL_LISTS','FIN') - -Ordre_Des_Commandes = ('DEBUT','MESH_TYPES','ALL_LISTS','FIN') diff --git a/MED/Global_Condition_Cata.py b/MED/Global_Condition_Cata.py deleted file mode 100755 index 02396340..00000000 --- a/MED/Global_Condition_Cata.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 -from Accas import * -#class myModel(ASSD): pass - -JdC = JDC_CATA(code='GLOB_COND', - execmodul=None, - regles=(AU_PLUS_UN('TYPES',), - AU_PLUS_UN('INITS',), - AU_PLUS_UN('DATAS',), - #A_CLASSER('TYPES','INITS','DATAS') - ) -); - -TYPES=PROC(nom='TYPES',op=None,UIinfo={"groupes":("Global_Workflow",)}, #sd_prod=myModel, - MODE=SIMP( - typ='TXM', - statut='o', - position='global_jdc', - into=("MANUAL","AUTOMATIC","MIXED"), - defaut="AUTOMATIC", - ), -); - -liste_condition=('INITS', 'DATAS') - -INITS=PROC(nom='INITS',op=None,UIinfo={"groupes":("INI_param",)}, - ini_manual=BLOC(condition="MODE == 'MANUAL'", - Informer=SIMP(statut='o',typ='TXM', defaut="INITS MANUAL"), - ), - ini_auto=BLOC(condition="MODE == 'AUTOMATIC'", - Informer=SIMP(statut='o', typ='TXM', defaut="INITS AUTOMATIC",), - ), - ini_mixed=BLOC(condition="MODE == 'MIXED'", - Informer=SIMP(statut='o',typ='TXM', defaut="INITS MIXED",), - ), -); -DATAS=PROC(nom='DATAS',op=None,UIinfo={"groupes":("DATAS",)}, - data_manual=BLOC(condition="MODE == 'MANUAL'", - Informer=SIMP(statut='o',typ='TXM', defaut="DATAS MANUAL", - ), - ), - data_auto=BLOC(condition="MODE == 'AUTOMATIC'", - Informer=SIMP(statut='o', typ='TXM', defaut="DATAS AUTOMATIC", - ), - ), - data_mixed=BLOC(condition="MODE == 'MIXED'", - Informer=SIMP(statut='o',typ='TXM', defaut="DATAS MIXED", - ), - ), -); - -Classement_Commandes_Ds_Arbre=('TYPES','INITS','DATAS') -Ordre_Des_Commandes = ('TYPES','INITS','DATAS') diff --git a/MED/Many_Concepts_52983_Cata.py b/MED/Many_Concepts_52983_Cata.py deleted file mode 100644 index 70f099ac..00000000 --- a/MED/Many_Concepts_52983_Cata.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -from Accas import * - -#class myMesh(ASSD): pass -class myModel(ASSD): pass - -JdC = JDC_CATA(code='PATTERNS', - execmodul=None, - regles=(UN_PARMI('DEBUT', 'POURSUITE'), - AU_MOINS_UN('FIN'), - A_CLASSER(('DEBUT', 'POURSUITE'), 'FIN'))) - -DEBUT=PROC(nom="DEBUT", op=68, repetable='n', UIinfo={"groupes":("Group1",)}, ang="Debut Eng help", - PAR_LOT=SIMP(ang="Debut Par Lot help En",statut='o',typ=bool, defaut=True), -) -AFFE_MODELE=OPER(nom="AFFE_MODELE",op=None,sd_prod=myModel, - UIinfo={"groupes":("Group1",)}, - ang="Model mesh definition EN", - MESH=SIMP(statut='o',typ='TXM',into=("mesh_01","mesh_02","mesh_03","mesh_04",) , defaut="mesh_01"), - #reentrant='n', - #regles=(AU_MOINS_UN('AFFE','AFFE_SOUS_STRUC'),UN_PARMI('MAILLAGE','GRILLE')), - - - block_mesh_01=BLOC(condition="MESH=='mesh_01'", - AFFE=FACT(statut='o', - ALL=SIMP(statut='o', typ=bool,ang='ALL 01 help EN', defaut=True), - PHENOMENA=SIMP(statut='o',typ='TXM',into=('phenomena_01','phenomena_02',), defaut='phenomena_01'), - #MODELISATION=SIMP(statut='o',typ='TXM', min=2,max='**', into=("mesh_01","mesh_02","mesh_03","mesh_04",) ,ang='Input 01 list EN', fr='Input 01 list FR'), - MODELISATION=SIMP(statut='o',typ='TXM', min=2,max='**', into=('Item_01_01','Item_01_02',) ,ang='Input 01 list EN', fr='Input 01 list FR'), - ), - ), -) -FIN=PROC(nom="FIN",op=9999,repetable='n',ang="Finish help EN",UIinfo={"groupes":("Group1",)}, - FORMAT_HDF =SIMP(ang="Save HDF EN",statut='f',typ='TXM',defaut="NON",into=("OUI","NON",) ), -) - -Classement_Commandes_Ds_Arbre=('DEBUT','MESH','AFFE_MODELE','FIN') -Ordre_Des_Commandes = ('DEBUT','MESH','AFFE_MODELE','FIN') diff --git a/MED/Many_Concepts_52988_Cata.py b/MED/Many_Concepts_52988_Cata.py deleted file mode 100644 index 52d4f10f..00000000 --- a/MED/Many_Concepts_52988_Cata.py +++ /dev/null @@ -1,76 +0,0 @@ -# coding: utf-8 - -from Accas import * - -class myMesh(ASSD): pass -class myModel(ASSD): pass - -JdC = JDC_CATA(code='PATTERNS', - execmodul=None, - regles=(AU_PLUS_UN('DEBUT', 'POURSUITE'), - AU_PLUS_UN('AFFE_MODELE'), - AU_PLUS_UN('FIN'), - A_CLASSER(('DEBUT', 'POURSUITE'), 'FIN'))) - -def mySeveral(suffix,num): - out=list() - for i in range(1,num+1): - out.append(suffix+str(i).zfill(2)) - return out - -switch_facultatif=True #change 'o' to 'f' of some widgets in the loop -empty_defauts=True - -def myBloc(num): - myNum=str(num).zfill(2) - list_item_body="Item_"+myNum+"_" - defauts0=["","",True,"'phenomena_"+myNum+"'",mySeveral(list_item_body,2)] #presence of default values - defauts_mask=[False,False,True,True,True] #switch off defaults of some types - defauts=list() - for id0 in range(len(defauts0)): - if defauts_mask[id0]: - item=", defaut="+str(defauts0[id0]) - else: - item="" - defauts.append(item) - #print defauts - - opt=['o','o','o','o','o'] #initial default obligation of items in FACT groups - #make some widgets optional: - myLen=len(opt) - if switch_facultatif: - make_f=(num)%myLen - opt[make_f]='f' - #print opt - if empty_defauts: - clean_defaut=num%myLen - - myString="BLOC(condition=\"MESH==\'mesh_"+myNum+"'\""+defauts[0]+", AFFE=FACT(statut='"+opt[1]+"'"+defauts[1]+", ALL=SIMP(statut='"+opt[2]+"', typ=bool,ang='ALL "+myNum+" help EN'"+defauts[2]+"),PHENOMENA=SIMP(statut='"+opt[3]+"',typ='TXM',into=mySeveral('phenomena_',"+str(num)+")"+defauts[3]+"), MODELISATION=SIMP(statut='"+opt[4]+"',typ='TXM', min=2,max='**',into=mySeveral('"+list_item_body+"',"+str(num*4)+")"+defauts[4]+", ang='Input "+myNum+" list EN', fr='Input "+myNum+" list FR'),),)" - print myString - return eval(myString) - -DEBUT=PROC(nom="DEBUT", op=10, repetable='n', UIinfo={"groupes":("Group1",)}, ang="Debut Eng help", - PAR_LOT=SIMP(ang="Debut Par Lot help En",statut='o',typ=bool, defaut=True), -); - -AFFE_MODELE=OPER(nom="AFFE_MODELE",op=18,sd_prod=myModel, - UIinfo={"groupes":("Group1",)}, - ang="Model mesh definition EN", - reentrant='n', - regles=(AU_MOINS_UN('APPROVED')), - MESH=SIMP(statut='o',typ='TXM',into=mySeveral("mesh_",4) ,defaut="mesh_01"), - APPROVED=SIMP(statut="o", typ=bool), - block_mesh_01=myBloc(1), - block_mesh_02=myBloc(2), - block_mesh_03=myBloc(3), - block_mesh_04=myBloc(4), -) - - -FIN=PROC(nom="FIN",op=9999,repetable='n',ang="Finish help EN",UIinfo={"groupes":("Group1",)}, - FORMAT_HDF =SIMP(ang="Save HDF EN",statut='f',typ='TXM',defaut="NON",into=("OUI","NON",) ), -); - -Classement_Commandes_Ds_Arbre=('DEBUT','MESH_TYPES','AFFE_MODELE','FIN') - -Ordre_Des_Commandes = ('DEBUT','MESH_TYPES','AFFE_MODELE','FIN') diff --git a/MED/Many_Concepts_52989_Cata.py b/MED/Many_Concepts_52989_Cata.py deleted file mode 100644 index 930d9e89..00000000 --- a/MED/Many_Concepts_52989_Cata.py +++ /dev/null @@ -1,77 +0,0 @@ -# coding: utf-8 - -from Accas import * - -#class myMesh(ASSD): pass -class myModel(ASSD): pass - -JdC = JDC_CATA(code='PATTERNS', - execmodul=None, - regles=(AU_PLUS_UN('DEBUT', 'POURSUITE'), - AU_PLUS_UN('AFFE_MODELE'), - AU_PLUS_UN('FIN'), - A_CLASSER(('DEBUT', 'POURSUITE'), 'FIN'))) - -def mySeveral(suffix,num): - out=list() - for i in range(1,num+1): - out.append(suffix+str(i).zfill(2)) - return out - -switch_facultatif=True #change 'o' to 'f' of some widgets in the loop -#empty_defauts=True - -def myBloc(num): - myNum=str(num).zfill(2) - list_item_body="Item_"+myNum+"_" - defauts0=["","",True,"'phenomena_"+myNum+"'",mySeveral(list_item_body,2)] #presence of default values - defauts_mask=[False,False,True,True,True] #switch off defaults of some types - defauts=list() - for id0 in range(len(defauts0)): - if defauts_mask[id0]: - item=", defaut="+str(defauts0[id0]) - else: - item="" - defauts.append(item) - #print defauts - - opt=['o','o','o','o','o'] #initial default obligation of items in FACT groups - #make different widgets optional, one by one: - myLen=len(opt) - if switch_facultatif: - make_f=(num)%myLen - opt[make_f]='f' - #print opt - #if empty_defauts: - # clean_defaut=num%myLen - - myString="BLOC(condition=\"MESH==\'mesh_"+myNum+"'\""+defauts[0]+", AFFE=FACT(statut='"+opt[1]+"'"+defauts[1]+", ALL=SIMP(statut='"+opt[2]+"', typ=bool,ang='ALL "+myNum+" help EN'"+defauts[2]+"),PHENOMENA=SIMP(statut='"+opt[3]+"',typ='TXM',into=mySeveral('phenomena_',"+str(num)+")"+defauts[3]+"), MODELISATION=SIMP(statut='"+opt[4]+"',typ='TXM', min=2,max='**',into=mySeveral('"+list_item_body+"',"+str(num*4)+")"+defauts[4]+", ang='Input "+myNum+" list EN', fr='Input "+myNum+" list FR'),),)" - print myString - return eval(myString) - -DEBUT=PROC(nom="DEBUT", op=10, repetable='n', UIinfo={"groupes":("Group1",)}, ang="Debut Eng help", - PAR_LOT=SIMP(ang="Debut Par Lot help En",statut='o',typ=bool, defaut=True), -); - -AFFE_MODELE=OPER(nom="AFFE_MODELE",op=18,sd_prod=myModel, - UIinfo={"groupes":("Group1",)}, - ang="Model mesh definition EN", - reentrant='n', - regles=(AU_MOINS_UN('APPROVED')), - MESH=SIMP(statut='o',typ='TXM',into=mySeveral("mesh_",4) ,defaut="mesh_01"), - APPROVED=SIMP(statut="f", typ=bool), # presence of this item will validate the whole group - PAR_LOT=SIMP(ang="Debut Par Lot help En",statut='o',typ='I', defaut=True), - block_mesh_01=myBloc(1), - block_mesh_02=myBloc(2), - block_mesh_03=myBloc(3), - block_mesh_04=myBloc(4), -) - - -FIN=PROC(nom="FIN",op=9999,repetable='n',ang="Finish help EN",UIinfo={"groupes":("Group1",)}, - FORMAT_HDF =SIMP(ang="Save HDF EN",statut='f',typ='TXM',defaut="NON",into=("OUI","NON",) ), -); - -Classement_Commandes_Ds_Arbre=('DEBUT','MESH_TYPES','AFFE_MODELE','FIN') - -Ordre_Des_Commandes = ('DEBUT','MESH_TYPES','AFFE_MODELE','FIN') diff --git a/MED/Many_Concepts_52992_Cata.py b/MED/Many_Concepts_52992_Cata.py deleted file mode 100644 index 13145b96..00000000 --- a/MED/Many_Concepts_52992_Cata.py +++ /dev/null @@ -1,76 +0,0 @@ -# coding: utf-8 - -from Accas import * - -#class myMesh(ASSD): pass -class myModel(ASSD): pass - -JdC = JDC_CATA(code='PATTERNS', - execmodul=None, - regles=(AU_PLUS_UN('DEBUT', 'POURSUITE'), - AU_PLUS_UN('AFFE_MODELE'), - AU_PLUS_UN('FIN'), - A_CLASSER(('DEBUT', 'POURSUITE'), 'FIN'))) - -def mySeveral(suffix,num): - out=list() - for i in range(1,num+1): - out.append(suffix+str(i).zfill(2)) - return out - -switch_facultatif=True #change 'o' to 'f' of some widgets in the loop -#empty_defauts=True - -def myBloc(num): - myNum=str(num).zfill(2) - list_item_body="Item_"+myNum+"_" - defauts0=["","",True,"'phenomena_"+myNum+"'",mySeveral(list_item_body,2)] #presence of default values - defauts_mask=[False,False,True,True,False] #switch off defaults of some types - defauts=list() - for id0 in range(len(defauts0)): - if defauts_mask[id0]: - item=", defaut="+str(defauts0[id0]) - else: - item="" - defauts.append(item) - #print defauts - - opt=['o','o','o','o','o'] #initial default obligation of items in FACT groups - #make different widgets optional, one by one: - myLen=len(opt) - if switch_facultatif: - make_f=(num)%myLen - opt[make_f]='f' - #print opt - #if empty_defauts: - # clean_defaut=num%myLen - - myString="BLOC(condition=\"MESH==\'mesh_"+myNum+"'\""+defauts[0]+", AFFE=FACT(statut='"+opt[1]+"'"+defauts[1]+", ALL=SIMP(statut='"+opt[2]+"', typ=bool,ang='ALL "+myNum+" help EN'"+defauts[2]+"),PHENOMENA=SIMP(statut='"+opt[3]+"',typ='TXM',into=mySeveral('phenomena_',"+str(num)+")"+defauts[3]+"), MODELISATION=SIMP(statut='"+opt[4]+"',typ='TXM', min=4,max='**',into=mySeveral('"+list_item_body+"',"+str(num*4)+")"+defauts[4]+", ang='Input "+myNum+" list EN', fr='Input "+myNum+" list FR'),),)" - print myString - return eval(myString) - -DEBUT=PROC(nom="DEBUT", op=10, repetable='n', UIinfo={"groupes":("Group1",)}, ang="Debut Eng help", - PAR_LOT=SIMP(ang="Debut Par Lot help En",statut='o',typ=bool, defaut=True), -); - -AFFE_MODELE=OPER(nom="AFFE_MODELE",op=18,sd_prod=myModel, - UIinfo={"groupes":("Group1",)}, - ang="Model mesh definition EN", - reentrant='n', - regles=(AU_MOINS_UN('APPROVED')), - MESH=SIMP(statut='o',typ='TXM',into=mySeveral("mesh_",4) ,defaut="mesh_01"), - APPROVED=SIMP(statut="f", typ=bool), # presence of this item will validate the whole group - block_mesh_01=myBloc(1), - block_mesh_02=myBloc(2), - block_mesh_03=myBloc(3), - block_mesh_04=myBloc(4), -) - - -FIN=PROC(nom="FIN",op=9999,repetable='n',ang="Finish help EN",UIinfo={"groupes":("Group1",)}, - FORMAT_HDF =SIMP(ang="Save HDF EN",statut='f',typ='TXM',defaut="NON",into=("OUI","NON",) ), -); - -Classement_Commandes_Ds_Arbre=('DEBUT','MESH_TYPES','AFFE_MODELE','FIN') - -Ordre_Des_Commandes = ('DEBUT','MESH_TYPES','AFFE_MODELE','FIN') diff --git a/MED/Matrix_Cata.py b/MED/Matrix_Cata.py deleted file mode 100644 index 268a77bf..00000000 --- a/MED/Matrix_Cata.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding: utf-8 -from Accas import * - -class loi ( ASSD ) : pass -class variable ( ASSD ) : pass - -class Matrice: - def __init__(self,nbLigs=None,nbCols=None,methodeCalculTaille=None,formatSortie="ligne",valSup=None,valMin=None,structure=None): - self.nbLigs=nbLigs - self.nbCols=nbCols - self.methodeCalculTaille=methodeCalculTaille - self.formatSortie=formatSortie - self.valSup=valSup - self.valMin=valMin - self.structure=structure - - def __convert__(self,valeur): - # Attention ne verifie pas grand chose - if type(valeur) != types.ListType : - return None - return valeur - - def info(self): - return "Matrice %s x %s" % (self.nbLigs, self.nbCols) - - __repr__=info - __str__=info - - - -class myModel(ASSD): pass - -JdC = JDC_CATA(code='PATTERNS', - execmodul=None, - regles=(AU_MOINS_UN ( 'CORRELATION' ), - ) -) - -DETERMINISTICVARIABLE = OPER ( nom = "DETERMINISTICVARIABLE", - sd_prod = variable, - op = None, - fr = "Variable deterministe", - ang = "Deterministic variable", - - N = SIMP ( statut = 'o', typ = "TXM", fr = "Nom", ang = "Name", defaut = "Var1" ), - T = SIMP ( statut = 'o', defaut = "in", into = ( "in" , "out", ), typ = "TXM", fr = "Type", ang = "Type" ), - R = SIMP ( statut = 'o', defaut = 0, typ = "I", fr = "Rang", ang = "Rank" ), -) - -DISTRIBUTION = OPER ( nom = "DISTRIBUTION", - sd_prod = loi, - op = 68, - fr = "Definitions des lois marginales utilisees par les variables d'entree", - - R = SIMP ( statut = "o", typ = "R", max = 1, val_min = 0., fr = "Parametre R de la loi | R > 0", ang = "R parameter | R > 0", defaut = 0.5 ), - # T > R - T = SIMP ( statut = "o", typ = "R", max = 1, val_min = 0., fr = "Parametre T de la loi | T > R", ang = "T parameter | T > R", defaut = 0.7 ), - A = SIMP ( statut = "o", typ = "R", max = 1, fr = "Borne inferieure du support de la loi", ang = "Support lower bound", defaut = 0.1 ), - # B > A - B = SIMP ( statut = "o", typ = "R", max = 1, fr = "Borne superieure du support de la loi", ang = "Support upper bound", defaut = 0.3 ), -) - -VARIABLE = PROC ( nom = "VARIABLE", - op = None, - docu = "", - fr = "Variable probabiliste", - ang = "Probabilistic variable", - - ModelVariable = SIMP ( statut = "o", typ = ( variable, ), fr = "Variable d'entrée du modèle", ang = "Input variable of the model" ), - Distribution = SIMP ( statut = "o", typ = ( loi, ), fr = "Modélisation probabiliste", ang = "Probabilistic modelisation" ), -) - -CORRELATION = PROC ( nom = 'CORRELATION', - op = None, - docu = "", - fr = "Correlation entre variables", - ang = "Variable correlation", - - CorrelationMatrix = SIMP ( statut = "o", typ = Matrice(nbLigs=None, - nbCols=None, - methodeCalculTaille='NbDeVariables', - valSup=1, - valMin=-1, - structure="symetrique"), - fr = "Matrice de correlation entre les variables d'entree", - ang = "Correlation matrix for input variables" ), -) diff --git a/MED/Nested_Cond_52945_Cata.py b/MED/Nested_Cond_52945_Cata.py deleted file mode 100644 index 9d3b119d..00000000 --- a/MED/Nested_Cond_52945_Cata.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding: utf-8 - -from Accas import * - -class loi(): pass - -JdC = JDC_CATA (code = 'PATTERNS', - execmodul = None, - ) -use_and=False #switch off second condition about MAX_ROWS while it does not work for blocks greater than 2 -def cond2(myMax=False): - if use_and: - if myMax: - out= " and MAX_ROWS>="+str(myMax) - else: - out="" - else: - out="" - print out - return out - -PROC_01 = PROC(nom = "PROC_01",op = None, ang="Help for PROC_01 EN", - MAX_ROWS=SIMP(statut='o',typ='I',val_min=1,val_max=8, defaut=8), - PROCGROUP1=SIMP(statut='o',typ='TXM',into=("1A","2A","add new row",)), - wideblock1=BLOC(condition='PROCGROUP1=="add new row"'+cond2(1), - PROCGROUP2=SIMP(statut='o',typ='TXM',into=("1A","add new row","3A",)), - wideblock2=BLOC(condition='PROCGROUP2=="add new row"'+cond2(2), - PROCGROUP3=SIMP(statut='o',typ='TXM',into=("1","2","add new row",)), - PROCGROUP689=SIMP(statut='o',typ='TXM',), - wideblock3=BLOC(condition='PROCGROUP3=="add new row"'+cond2(3), - PROCGROUP4=SIMP(statut='o',typ='TXM',into=("1","add new row","3",)), - wideblock4=BLOC(condition='PROCGROUP4=="add new row"'+cond2(4), - PROCGROUP5=SIMP(statut='o',typ='TXM',into=("add new row","2","3",)), - wideblock5=BLOC(condition='PROCGROUP5=="add new row"'+cond2(5), - PROCGROUP6=SIMP(statut='o',typ='TXM',into=("1","2","add new row",)), - wideblock6=BLOC(condition='PROCGROUP6=="add new row"'+cond2(6), - PROCGROUP7=SIMP(statut='o',typ='TXM',into=("1","add new row","3",)), - wideblock7=BLOC(condition='PROCGROUP7=="add new row"'+cond2(7), - PROCGROUP8=SIMP(statut='o',typ='TXM',into=("add new row","2","3",)), - wideblock8=BLOC(condition='PROCGROUP8=="add new row"'+cond2(8), - ) - ) - ) - ) - ) - ) - ) - ) -) - -#LEV1 = OPER( nom = "LEV1", -# sd_prod=loi, -# op=68, -# fr='LEV1 FR', -# Boolean01=SIMP( statut = 'o',typ = bool, defaut=True, fr = 'Bool mandatory FR', ang = 'Bool mandatory EN'), -# SelectedItem=SIMP(statut = 'o',typ = 'TXM', into=["01_01","01_02","01_03","01_04"], fr="FR"), -#) - -Classement_Commandes_Ds_Arbre=('PROC_01',) - -Ordre_Des_Commandes = ('PROC_01',) diff --git a/MED/Nested_Cond_52946_Cata.py b/MED/Nested_Cond_52946_Cata.py deleted file mode 100644 index fef5edf0..00000000 --- a/MED/Nested_Cond_52946_Cata.py +++ /dev/null @@ -1,62 +0,0 @@ -# coding: utf-8 - -from Accas import * - -class loi(): pass - -JdC = JDC_CATA (code = 'PATTERNS', - execmodul = None, - ) -use_and=True #switch off second condition about MAX_ROWS while it does not work for blocks greater than 2 -def cond2(myMax=False): - if use_and: - if myMax: - out= " and MAX_ROWS>="+str(myMax) - else: - out="" - else: - out="" - print out - return out - -PROC_01 = PROC(nom = "PROC_01",op = None, ang="Help for PROC_01 EN", - MAX_ROWS=SIMP(statut='o',typ='I',val_min=1,val_max=8, defaut=8), - PROCGROUP1=SIMP(statut='o',typ='TXM',into=("1","2","add new row",)), - wideblock1=BLOC(condition='PROCGROUP1=="add new row"'+cond2(1), - PROCGROUP2=SIMP(statut='o',typ='TXM',into=("1","add new row","3",)), - #wideblock2=BLOC(condition='PROCGROUP2=="add new row"', - wideblock2=BLOC(condition='MAX_ROWS == 8', - #wideblock2=BLOC(condition='PROCGROUP2=="add new row" and (MAX_ROWS > 2)', - PROCGROUP3=SIMP(statut='o',typ='TXM',into=("1","2","add new row",)), - wideblock3=BLOC(condition='PROCGROUP3=="add new row"'+cond2(3), - PROCGROUP4=SIMP(statut='o',typ='TXM',into=("1","add new row","3",)), - wideblock4=BLOC(condition='PROCGROUP4=="add new row"'+cond2(4), - PROCGROUP5=SIMP(statut='o',typ='TXM',into=("add new row","2","3",)), - wideblock5=BLOC(condition='PROCGROUP5=="add new row"'+cond2(5), - PROCGROUP6=SIMP(statut='o',typ='TXM',into=("1","2","add new row",)), - wideblock6=BLOC(condition='PROCGROUP6=="add new row"'+cond2(6), - PROCGROUP7=SIMP(statut='o',typ='TXM',into=("1","add new row","3",)), - wideblock7=BLOC(condition='PROCGROUP7=="add new row"'+cond2(7), - PROCGROUP8=SIMP(statut='o',typ='TXM',into=("add new row","2","3",)), - wideblock8=BLOC(condition='PROCGROUP8=="add new row"'+cond2(8), - ) - ) - ) - ) - ) - ) - ) - ) -) - -#LEV1 = OPER( nom = "LEV1", -# sd_prod=loi, -# op=68, -# fr='LEV1 FR', -# Boolean01=SIMP( statut = 'o',typ = bool, defaut=True, fr = 'Bool mandatory FR', ang = 'Bool mandatory EN'), -# SelectedItem=SIMP(statut = 'o',typ = 'TXM', into=["01_01","01_02","01_03","01_04"], fr="FR"), -#) - -Classement_Commandes_Ds_Arbre=('PROC_01',) - -Ordre_Des_Commandes = ('PROC_01',) diff --git a/MED/Nested_Cond_52947_Cata.py b/MED/Nested_Cond_52947_Cata.py deleted file mode 100644 index bf3be39e..00000000 --- a/MED/Nested_Cond_52947_Cata.py +++ /dev/null @@ -1,17 +0,0 @@ -# coding: utf-8 - -from Accas import * - -class loi(): pass - -JdC = JDC_CATA (code = 'PATTERNS', - execmodul = None, - ) - -PROC_01 = PROC(nom = "PROC_01",op = None, ang="Help for PROC_01 EN", - PROCGROUP1=SIMP(statut='o',typ='TXM',into=("a1","a2","a3",)), -) - -Classement_Commandes_Ds_Arbre=('PROC_01',) - -Ordre_Des_Commandes = ('PROC_01',) diff --git a/MED/Nested_Cond_52948_Cata.py b/MED/Nested_Cond_52948_Cata.py deleted file mode 100644 index 81f216f8..00000000 --- a/MED/Nested_Cond_52948_Cata.py +++ /dev/null @@ -1,21 +0,0 @@ -# coding: utf-8 - -from Accas import * - -class loi(ASSD): pass - -JdC = JDC_CATA (code = 'PATTERNS', - execmodul = None, - ) - -PER_01 = OPER( nom = "PER_01", - sd_prod=loi, - op=68, - fr='LEV1 FR', - Boolean01=SIMP( statut = 'o',typ = bool, defaut=True, fr = 'Bool mandatory FR', ang = 'Bool mandatory EN'), - SelectedItem=SIMP(statut = 'o',typ = 'TXM', into=["01_01","01_02","01_03","01_04"], fr="FR"), -) - -#Classement_Commandes_Ds_Arbre=('OPER_01',) - -#Ordre_Des_Commandes = ('OPER_01',) diff --git a/MED/Nested_Cond_52949_Cata.py b/MED/Nested_Cond_52949_Cata.py deleted file mode 100644 index d09011a3..00000000 --- a/MED/Nested_Cond_52949_Cata.py +++ /dev/null @@ -1,19 +0,0 @@ -# coding: utf-8 - -from Accas import * - -JdC = JDC_CATA (code = 'PATTERNS', - execmodul = None, - ) - -PROC_01 = PROC(nom = "PROC_01",op = None, ang="Help for PROC_01 EN", - MAX_ROWS=SIMP(statut='o',typ='I',val_min=1,val_max=8, defaut=8), - PROCGROUP1=SIMP(statut='o',typ='TXM',into=("1","2","add new row",)), - wideblock1=BLOC(condition='PROCGROUP1 in "add new row"', - PROCGROUP2=SIMP(statut='o',typ='TXM',into=("1","add new row","3",)), - ) -) - -Classement_Commandes_Ds_Arbre=('PROC_01',) - -Ordre_Des_Commandes = ('PROC_01',) diff --git a/MED/Nested_Cond_52952_Cata.py b/MED/Nested_Cond_52952_Cata.py deleted file mode 100644 index 47a8d7c5..00000000 --- a/MED/Nested_Cond_52952_Cata.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding: utf-8 - -from Accas import * - -class loi(): pass - -JdC = JDC_CATA (code = 'PATTERNS', - execmodul = None, - ) -use_and=False #switch off second condition about MAX_ROWS while it does not work for blocks greater than 2 -def cond2(myMax=False): - if use_and: - if myMax: - out= " and MAX_ROWS>="+str(myMax) - else: - out="" - else: - out="" - #print out - return out - -PROC_01 = PROC(nom = "PROC_01",op = None, ang="Help for PROC_01 EN", - MAX_ROWS=SIMP(statut='o',typ='I',val_min=1,val_max=8, defaut=8), - PROCGROUP1=SIMP(statut='o',typ='TXM',into=("1","2","add new row",)), - wideblock1=BLOC(condition='PROCGROUP1=="add new row"'+cond2(1), - PROCGROUP2=SIMP(statut='o',typ='TXM',into=("1","add new row","3",)), - wideblock2=BLOC(condition='PROCGROUP2=="add new row"'+cond2(2), - PROCGROUP3=SIMP(statut='o',typ='TXM',into=("1","2","add new row",)), - wideblock3=BLOC(condition='PROCGROUP3=="add new row"'+cond2(3), - PROCGROUP4=SIMP(statut='o',typ='TXM',into=("1","add new row","3",)), - wideblock4=BLOC(condition='PROCGROUP4=="add new row"'+cond2(4), - PROCGROUP5=SIMP(statut='o',typ='TXM',into=("add new row","2","3",)), - wideblock5=BLOC(condition='PROCGROUP5=="add new row"'+cond2(5), - PROCGROUP6=SIMP(statut='o',typ='TXM',into=("1","2","add new row",)), - wideblock6=BLOC(condition='PROCGROUP6=="add new row"'+cond2(6), - PROCGROUP7=SIMP(statut='o',typ='TXM',into=("1","add new row","3",)), - wideblock7=BLOC(condition='PROCGROUP7=="add new row"'+cond2(7), - PROCGROUP8=SIMP(statut='o',typ='TXM',into=("add new row","2","3",)), - wideblock8=BLOC(condition='PROCGROUP8=="add new row"'+cond2(8), - ) - ) - ) - ) - ) - ) - ) - ) -) - -#LEV1 = OPER( nom = "LEV1", -# sd_prod=loi, -# op=68, -# fr='LEV1 FR', -# Boolean01=SIMP( statut = 'o',typ = bool, defaut=True, fr = 'Bool mandatory FR', ang = 'Bool mandatory EN'), -# SelectedItem=SIMP(statut = 'o',typ = 'TXM', into=["01_01","01_02","01_03","01_04"], fr="FR"), -#) - -Classement_Commandes_Ds_Arbre=('PROC_01',) - -Ordre_Des_Commandes = ('PROC_01',) diff --git a/MED/Separate_Blocks_52958_Cata.py b/MED/Separate_Blocks_52958_Cata.py deleted file mode 100644 index 1327a3fb..00000000 --- a/MED/Separate_Blocks_52958_Cata.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding: utf-8 - -from Accas import * - -JdC = JDC_CATA (code = 'PATTERNS', - execmodul = None, - ) -def several(suffix,num): - out=list() - for i in range(1,num+1): - out.append(suffix+str(i).zfill(2)) - return out - -NUMERICAL_PARAMETERS=PROC(nom = "NUMERICAL_PARAMETERS", op=None, ang="Help for NUMERICAL_PARAMETERS, English version", - #Equations=SIMP(statut = 'o',typ = 'TXM',into=("EF","VF","BS"),defaut="EF"), - Solver_definition=FACT(statut = 'o', - Solver = SIMP(statut = 'o',typ = 'TXM', into=several("Solver_",12), defaut="Solver_06"), - ) -) -PASCALE=PROC(nom = "PASCALE", op=None, ang="Help for NUMERICAL_PARAMETERS, English version", - Equations=SIMP(statut = 'o',typ = 'TXM',into=("EF","VF","BS"),defaut="EF"), - Solver_definition=FACT(statut = 'o', - Solver = SIMP(statut = 'o',typ = 'TXM', into=several("Solver_",12), defaut="Solver_06"), - ) -) - -Classement_Commandes_Ds_Arbre=('NUMERICAL_PARAMETERS',) - -Ordre_Des_Commandes = ('NUMERICAL_PARAMETERS',) diff --git a/MED/Separate_Blocks_52963_Cata.py b/MED/Separate_Blocks_52963_Cata.py deleted file mode 100644 index c115196f..00000000 --- a/MED/Separate_Blocks_52963_Cata.py +++ /dev/null @@ -1,40 +0,0 @@ -# coding: utf-8 - -from Accas import * - -JdC = JDC_CATA (code = 'PATTERNS', - execmodul = None, - ) -def mySeveral(suffix,num): - out=list() - for i in range(1,num+1): - out.append(suffix+str(i).zfill(2)) - return out - -def myFact(num): - myNum=str(num).zfill(2) - list_item_body="Item_"+myNum+"_" - myString="FACT(statut = 'f', List_"+myNum+" = SIMP(statut = 'o',typ = 'TXM', into=mySeveral('"+list_item_body+"',12), defaut='"+list_item_body+myNum+"'),Real_"+myNum+" = SIMP(statut = 'o',typ = 'R', defaut = "+str(num/100.)+", ang='Real "+myNum+" help EN'),Integer_"+myNum+" = SIMP(statut = 'o',typ = 'I', defaut = "+str(100+num)+",ang='Max_Iter "+myNum+" help EN'))" - print myString - return eval(myString) - - -PROC_01=PROC(nom = "PROC_01", op=None, ang="Help for PROC_01, English version",fr="Help for PROC_01, French version", docu="", - Radio_01=SIMP(statut = 'f',typ = 'TXM',into=("EF","VF","BS"),defaut="EF"), - FACT_01=myFact(1), - FACT_02=myFact(2), - FACT_03=myFact(3), - FACT_04=myFact(4), - FACT_05=myFact(5), - FACT_06=myFact(6), - FACT_07=myFact(7), - FACT_08=myFact(8), - FACT_09=myFact(9), - FACT_10=myFact(10), - FACT_11=myFact(11), - FACT_12=myFact(12), -) - -Classement_Commandes_Ds_Arbre=('PROC_01',) - -Ordre_Des_Commandes = ('PROC_01',) diff --git a/MED/Separate_Blocks_52966_Cata.py b/MED/Separate_Blocks_52966_Cata.py deleted file mode 100644 index baef1eb1..00000000 --- a/MED/Separate_Blocks_52966_Cata.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding: utf-8 - -from Accas import * - -JdC = JDC_CATA (code = 'PATTERNS', - execmodul = None, - ) -def mySeveral(suffix,num): - out=list() - for i in range(1,num+1): - out.append(suffix+str(i).zfill(2)) - return out - -switch_facultatif=False #change 'o' to 'f' of some widgets in the loop - -def myFact(num): - opt=['o','f','o','o'] - if switch_facultatif: - myLen=len(opt) - make_f=(num-1)%myLen - opt[make_f]='f' - #print opt - myNum=str(num).zfill(2) - list_item_body="Item_"+myNum+"_" - myString="FACT(statut = '"+opt[0]+"', List_"+myNum+" = SIMP(statut = '"+opt[1]+"',typ = 'TXM', into=mySeveral('"+list_item_body+"',12), defaut='"+list_item_body+myNum+"'),Real_"+myNum+" = SIMP(statut = '"+opt[2]+"',typ = 'R', defaut = "+str(num/100.)+", ang='Real "+myNum+" help EN'),Integer_"+myNum+" = SIMP(statut = '"+opt[3]+"',typ = 'I', defaut = "+str(100+num)+",ang='Max_Iter "+myNum+" help EN'))" - print myString - return eval(myString) - - -PROC_01=PROC(nom = "PROC_01", op=None, ang="Help for PROC_01, English version",fr="Help for PROC_01, French version", docu="", - Radio_01=SIMP(statut = 'o',typ = 'TXM',into=("EF","VF","BS"),defaut="EF"), - FACT_01=myFact(1), - FACT_02=myFact(2), - FACT_03=myFact(3), - FACT_04=myFact(4), - FACT_05=myFact(5), - FACT_06=myFact(6), - FACT_07=myFact(7), - FACT_08=myFact(8), - FACT_09=myFact(9), - FACT_10=myFact(10), - FACT_11=myFact(11), - FACT_12=myFact(12), -) - -Classement_Commandes_Ds_Arbre=('PROC_01',) - -Ordre_Des_Commandes = ('PROC_01',) diff --git a/MED/Separate_Blocks_52972_Cata.py b/MED/Separate_Blocks_52972_Cata.py deleted file mode 100644 index 88927e49..00000000 --- a/MED/Separate_Blocks_52972_Cata.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding: utf-8 - -from Accas import * - -JdC = JDC_CATA (code = 'PATTERNS', - execmodul = None, - ) -def mySeveral(suffix,num): - out=list() - for i in range(1,num+1): - out.append(suffix+str(i).zfill(2)) - return out - -switch_facultatif=True #change 'o' to 'f' of some widgets in the loop -empty_defauts=True - -def myFact(num): - myNum=str(num).zfill(2) - list_item_body="Item_"+myNum+"_" - - defauts0=["","'"+list_item_body+myNum+"'", str(num/100.), str(100+num), "'Text_"+myNum+"'" ] #presence of default values - defauts_mask=[False,True,True,False,True] #switch off defaults of some types - defauts=list() - for id0 in range(len(defauts0)): - if defauts_mask[id0]: - item=", defaut="+defauts0[id0] - else: - item="" - defauts.append(item) - print defauts - - opt=['o','o','o','o','o'] #initial default obligation of items in FACT groups - #make some widgets optional: - myLen=len(opt) - if switch_facultatif: - make_f=(num)%myLen - opt[make_f]='f' - #print opt - if empty_defauts: - clean_defaut=num%myLen - - - myString="FACT(statut = '"+opt[0]+"', List_"+myNum+" = SIMP(statut = '"+opt[1]+"',typ = 'TXM', into=mySeveral('"+list_item_body+"',12)"+defauts[1]+"),Real_"+myNum+" = SIMP(statut = '"+opt[2]+"',typ = 'R'"+defauts[2]+", ang='Real "+myNum+" help EN'),Integer_"+myNum+" = SIMP(statut = '"+opt[3]+"',typ = 'I'"+defauts[3]+",ang='Integer "+myNum+" help EN'),Text_"+myNum+" = SIMP(statut = '"+opt[4]+"',typ = 'TXM'"+defauts[4]+",ang='Text "+myNum+" help EN'))" - print myString - return eval(myString) - - -PROC_01=PROC(nom = "PROC_01", op=None, ang="Help for PROC_01, English version",fr="Help for PROC_01, French version", docu="", - Radio_01=SIMP(statut = 'o',typ = 'TXM',into=("EF","VF","BS"),defaut="EF"), - FACT_01=myFact(1), - FACT_02=myFact(2), - FACT_03=myFact(3), - FACT_04=myFact(4), - FACT_05=myFact(5), - #FACT_06=myFact(6), - #FACT_07=myFact(7), - #FACT_08=myFact(8), - #FACT_09=myFact(9), - #FACT_10=myFact(10), - #FACT_11=myFact(11), - #FACT_12=myFact(12), -) - -Classement_Commandes_Ds_Arbre=('PROC_01',) - -Ordre_Des_Commandes = ('PROC_01',) diff --git a/MED/Separate_Blocks_52975_Cata.py b/MED/Separate_Blocks_52975_Cata.py deleted file mode 100644 index 88927e49..00000000 --- a/MED/Separate_Blocks_52975_Cata.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding: utf-8 - -from Accas import * - -JdC = JDC_CATA (code = 'PATTERNS', - execmodul = None, - ) -def mySeveral(suffix,num): - out=list() - for i in range(1,num+1): - out.append(suffix+str(i).zfill(2)) - return out - -switch_facultatif=True #change 'o' to 'f' of some widgets in the loop -empty_defauts=True - -def myFact(num): - myNum=str(num).zfill(2) - list_item_body="Item_"+myNum+"_" - - defauts0=["","'"+list_item_body+myNum+"'", str(num/100.), str(100+num), "'Text_"+myNum+"'" ] #presence of default values - defauts_mask=[False,True,True,False,True] #switch off defaults of some types - defauts=list() - for id0 in range(len(defauts0)): - if defauts_mask[id0]: - item=", defaut="+defauts0[id0] - else: - item="" - defauts.append(item) - print defauts - - opt=['o','o','o','o','o'] #initial default obligation of items in FACT groups - #make some widgets optional: - myLen=len(opt) - if switch_facultatif: - make_f=(num)%myLen - opt[make_f]='f' - #print opt - if empty_defauts: - clean_defaut=num%myLen - - - myString="FACT(statut = '"+opt[0]+"', List_"+myNum+" = SIMP(statut = '"+opt[1]+"',typ = 'TXM', into=mySeveral('"+list_item_body+"',12)"+defauts[1]+"),Real_"+myNum+" = SIMP(statut = '"+opt[2]+"',typ = 'R'"+defauts[2]+", ang='Real "+myNum+" help EN'),Integer_"+myNum+" = SIMP(statut = '"+opt[3]+"',typ = 'I'"+defauts[3]+",ang='Integer "+myNum+" help EN'),Text_"+myNum+" = SIMP(statut = '"+opt[4]+"',typ = 'TXM'"+defauts[4]+",ang='Text "+myNum+" help EN'))" - print myString - return eval(myString) - - -PROC_01=PROC(nom = "PROC_01", op=None, ang="Help for PROC_01, English version",fr="Help for PROC_01, French version", docu="", - Radio_01=SIMP(statut = 'o',typ = 'TXM',into=("EF","VF","BS"),defaut="EF"), - FACT_01=myFact(1), - FACT_02=myFact(2), - FACT_03=myFact(3), - FACT_04=myFact(4), - FACT_05=myFact(5), - #FACT_06=myFact(6), - #FACT_07=myFact(7), - #FACT_08=myFact(8), - #FACT_09=myFact(9), - #FACT_10=myFact(10), - #FACT_11=myFact(11), - #FACT_12=myFact(12), -) - -Classement_Commandes_Ds_Arbre=('PROC_01',) - -Ordre_Des_Commandes = ('PROC_01',) diff --git a/MED/a b/MED/a deleted file mode 100644 index 0018d1d5..00000000 --- a/MED/a +++ /dev/null @@ -1,110 +0,0 @@ -ESSAI_FACT=OPER(nom="ESSAI_FACT", - sd_prod=ObjetUtilisateur, - op=None, - fr=tr("Affectation de caractéristiques à des éléments de structure"), - regles = (AU_MOINS_UN('Poutre','Barre'), - EXCLUS('Discret','Discret_2D'),), - Info = SIMP(statut='f',typ='I', defaut= 1 ,into=(1,2) ), - Verif = SIMP(statut='f',typ='TXM',validators=NoRepeat(),max='**',into=("Maille","Noeud") ), -# -# ============================================================================== - Poutre = FACT(statut= 'f',max= '**', - Section = SIMP(statut= 'o',typ= 'TXM' ,into= ("GENERALE","RECTANGLE","CERCLE") ), - - b_generale = BLOC(condition = " Section == 'GENERALE'", - regles = (UN_PARMI('Maille','GroupeMailles'),), - Maille = SIMP(statut= 'f',typ= ma ,validators= NoRepeat(),max= '**'), - GroupeMailles = SIMP(statut= 'f',typ= grma,validators= NoRepeat(),max= '**'), - - Vari = SIMP(statut= 'f',typ= 'TXM',into= ("CONSTANT","HOMOTHETIQUE"),defaut= "CONSTANT"), - - b_constant = BLOC(condition = "Vari == 'CONSTANT'", - regles = (PRESENT_ABSENT('Table','Cara'), - PRESENT_PRESENT('Table','Nom'), - PRESENT_PRESENT('Cara','Valeur'),), - Table = SIMP(statut= 'f',typ='TXM'), - Nom = SIMP(statut= 'f',typ= 'TXM'), - Cara = SIMP(statut= 'o',typ= 'TXM',min= 4 ,max= 5, - fr= tr("A,IY,IZ,JX sont des paramètres obligatoires"), - validators= [NoRepeat(), Compulsory(['A','IY','IZ','JX'])], - into= ("A","IY","IZ","AY","AZ","EY","EZ","JX","RY","RZ","RT","JG","IYR2","IZR2","AI") ), - Valeur = SIMP(statut= 'f',typ= 'R',min= 4 ,max= 15), - ), - ), - b_rectangle = BLOC(condition = "Section == 'RECTANGLE'", - regles = (UN_PARMI('Maille','GroupeMailles'),), - Maille = SIMP(statut= 'f',typ= ma ,validators= NoRepeat(),max= '**'), - GroupeMailles = SIMP(statut= 'f',typ= grma,validators= NoRepeat(),max= '**'), - Vari = SIMP(statut= 'f',typ= 'TXM',into= ("CONSTANT","HOMOTHETIQUE","AFFINE"),defaut= "CONSTANT"), - b_constant = BLOC(condition = "Vari == 'CONSTANT'", - Cara = SIMP(statut= 'o',typ= 'TXM',min= 1 ,max= 4, - validators = [NoRepeat(), - OrVal( [AndVal( [Compulsory(['H']),Absent(['HY','HZ','EPY','EPZ'])] ), - AndVal( [Compulsory(['HY','HZ']),Together(['EPY','EPZ']),Absent(['H','EP'])] )] )], - into= ("H","EP", "HY","HZ","EPY","EPZ"),), - Valeur = SIMP(statut= 'o',typ= 'R',min= 1 ,max= 4), - ), - - Metrique = SIMP(statut= 'f',typ= 'TXM',defaut= "NON",into= ("OUI","NON") ), - Fcx = SIMP(statut= 'f',typ= 'R'), - Tuyau = SIMP(statut= 'f',typ= 'I',val_max= 10,defaut= 3), - ), - ), -# -# ============================================================================== - Barre = FACT(statut='f',max='**', - regles = (UN_PARMI('Maille','GroupeMailles'),), - Maille = SIMP(statut='f',typ=ma ,validators=NoRepeat(),max='**'), - GroupeMailles = SIMP(statut='f',typ=grma,validators=NoRepeat(),max='**'), - Section = SIMP(statut='o',typ='TXM',into=("GENERALE","RECTANGLE","CERCLE") ), - b_generale = BLOC(condition = "Section=='GENERALE'", - regles = (PRESENT_ABSENT('Table','Cara'), - PRESENT_PRESENT('Table','Nom'), - PRESENT_PRESENT('Cara','Valeur')), - Table = SIMP(statut='f',typ=table_sdaster), - Nom = SIMP(statut='f',typ='TXM',validators=LongStr(1,24) ), - Cara = SIMP(statut='f',typ='TXM',into=("A",) ), - Valeur = SIMP(statut='f',typ='R',min=1,max=1 ), - ), - b_rectangle = BLOC(condition = "Section=='RECTANGLE'", - Cara = SIMP(statut='o',typ='TXM', min=1, max=4, - validators = [NoRepeat(), - OrVal( [AndVal( [Compulsory(['H']),Absent(['HY','HZ','EPY','EPZ'])] ), - AndVal( [Compulsory(['HY','HZ']),Together(['EPY','EPZ']),Absent(['H','EP'])] )] )], - into=("H","EP","HZ","HY","EPY","EPZ"), ), - Valeur = SIMP(statut='o',typ='R',min=1,max=4 ), ), - b_cercle = BLOC(condition = "Section=='CERCLE'", - Cara = SIMP(statut='o',typ='TXM',validators=[NoRepeat(),Compulsory(['R'])],min=1,max=2,into=("R","EP") ), - Valeur = SIMP(statut='o',typ='R',min=1,max=2 ), ), - ), -# -# ============================================================================== - Discret = FACT(statut='f',max='**', - REPERE = SIMP(statut='f',typ='TXM',into=("LOCAL","GLOBAL") ), - AMOR_HYST = SIMP(statut='f',typ='R' ), - SYME = SIMP(statut='f',typ='TXM',defaut="OUI",into=("OUI","NON"),), - b_SYME_OUI = BLOC(condition="SYME=='OUI'", - fr=tr("SYMETRIQUE: Affectation de matrices de rigidité, de masse ou d'amortissement à des mailles ou noeuds"), - Cara = SIMP(statut='o',typ='TXM',validators=NoRepeat(),max=1,defaut="None", - 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", - "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", - "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",),), - # Affection des caractéristiques de RIGIDITE/AMORTISSEMENT/MASSE - b_AK_T_D_N = BLOC(condition = "((Cara=='K_T_D_N')or(Cara=='A_T_D_N'))", - fr = tr("Noeud: 3 valeurs (triangulaire supérieure par colonne)"), - regles = (UN_PARMI('Maille','GroupeMailles','Noeud','GROUP_NO'),), - Noeud = SIMP(statut='f',typ=no ,validators=NoRepeat(),max='**'), - GROUP_NO = SIMP(statut='f',typ=grno,validators=NoRepeat(),max='**'), - Maille = SIMP(statut='f',typ=ma ,validators=NoRepeat(),max='**'), - GroupeMailles = SIMP(statut='f',typ=grma,validators=NoRepeat(),homo='SansOrdreNiDoublon',max='**'), - Valeur = SIMP(statut='o',typ='R',min=3 ,max=3 ),), - ), - ), -# -# ============================================================================== - Discret_2D = FACT(statut='f',max='**', - REPERE = SIMP(statut='f',typ='TXM',into=("LOCAL","GLOBAL") ), - AMOR_HYST = SIMP(statut='f',typ='R' ), - SYME = SIMP(statut='f',typ='TXM',defaut="OUI",into=("OUI","NON"),), - ), -) diff --git a/MED/cata_diapo.py b/MED/cata_diapo.py deleted file mode 100644 index 0c5268ef..00000000 --- a/MED/cata_diapo.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding: utf-8 - -from Accas import * -class Tuple: - def __init__(self,ntuple): - self.ntuple=ntuple - - def __convert__(self,valeur): - import types - if type(valeur) == types.StringType: - return None - if len(valeur) != self.ntuple: - return None - return valeur - - def info(self): - return "Tuple de %s elements" % self.ntuple - - __repr__=info - __str__=info - - - -class forme ( ASSD ) : pass - -JdC = JDC_CATA (code = 'MED', - execmodul = None, - ) - -FORME_GEOMETRIQUE=OPER(nom='FORME_GEOMETRIQUE',sd_prod =forme ,op=None, - Forme=SIMP(statut="o",typ='TXM',into=[ 'carre', 'cercle', 'triangle' ],defaut='carre'), - bloc_pour_Carre = BLOC (condition = "Forme=='carre'", - Cote=SIMP(statut="o",typ='I'), ) , # fin bloc_pour_carre - bloc_pour_cercle = BLOC (condition ="Forme=='cercle'", - rayon=SIMP(statut="o",typ='I'), ) , # fin bloc_pour_cercle - - DE_NOMBREUSES_WIDGETS= FACT(statut="o", - Stop_Criteria = SIMP(statut = 'o',typ = Tuple(3),validators = VerifTypeTuple(('R','R','R'))), - Fichier_Med = SIMP( statut = 'o', typ = ('Fichier', 'Med Files (*.med);;All Files (*)',),), - ListeDeChoixPlusGrande=SIMP(statut="o",typ='TXM',into=['a','b,','c','d','e','f','g','h'], - homo="SansOrdreNiDoublon",), - Un_Parametre_Facultatif=SIMP(statut="f",typ='TXM') - - ), - Couleur=SIMP(statut = 'f',typ='TXM'), - Matiere=SIMP(statut = 'f',typ='TXM'), -); - diff --git a/MED/cata_med.py b/MED/cata_med.py deleted file mode 100644 index 4640f81e..00000000 --- a/MED/cata_med.py +++ /dev/null @@ -1,29 +0,0 @@ -# coding: utf-8 - -from Accas import * - -JdC = JDC_CATA (code = 'MED', - execmodul = None, - ) -FAS=PROC(nom='FAS',op=None, - FAMILY_MESH_NAME_REF = FACT(statut='o', max='**', - - NAME=SIMP(statut="o",typ='TXM'), - ELEM=FACT(statut="f", max="**", - NUM=SIMP(statut="o",typ='TXM',), - NAME=SIMP(statut="o",typ='TXM',), - ATT=FACT(statut="f", - NBR=SIMP(statut="o", max=1 , typ = 'I'), - DES=SIMP(statut="o", max="**", typ = 'TXM'), - IDE=SIMP(statut="o", max="**", typ = 'I'), - VAL=SIMP(statut="o", max="**", typ = 'I'), - ), - GRO=FACT(statut="f", - NBR=SIMP(statut="o", max=1 , typ = 'I'), - NOM=SIMP(statut="o", max="**", typ='TXM'), - ), - ), - ), -); - - diff --git a/MED/configuration_MED.py b/MED/configuration_MED.py deleted file mode 100644 index 4ab64b85..00000000 --- a/MED/configuration_MED.py +++ /dev/null @@ -1,43 +0,0 @@ -# -*- 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 pour charger les paramètres de configuration d'EFICAS -""" -# Modules Python -from InterfaceQT4 import configuration -import os - - -class CONFIG(configuration.CONFIG_BASE): - - #----------------------------------- - def __init__(self,appli,repIni): - #----------------------------------- - - self.labels_user=['catalogues','lang'] - self.labels_eficas=['lang','rep_cata','catalogues'] - - configuration.CONFIG_BASE.__init__(self,appli,'.Eficas_monCode') - - -def make_config(appli,rep): - return CONFIG(appli,rep) - diff --git a/MED/images/essaiAster.png b/MED/images/essaiAster.png deleted file mode 100644 index d01c5de8..00000000 Binary files a/MED/images/essaiAster.png and /dev/null differ diff --git a/MED/items_integer_space.txt b/MED/items_integer_space.txt deleted file mode 100644 index 8e17136e..00000000 --- a/MED/items_integer_space.txt +++ /dev/null @@ -1,2 +0,0 @@ -"4" "3" "2" "1" -"4" "5" "6" "7" \ No newline at end of file diff --git a/MED/monCode_qtEficas.py b/MED/monCode_qtEficas.py deleted file mode 100755 index b1254f2c..00000000 --- a/MED/monCode_qtEficas.py +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- -# Copyright (C) 2007-2012 EDF R&D -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -# -""" - Ce module sert a lancer EFICAS configure pour Code_Aster -""" -# Modules Python -# Modules Eficas - -import sys,os -sys.path.append(os.path.join(os.path.abspath(os.path.dirname(__file__)),'..')) - -from PyQt4.QtCore import * -import prefs -from InterfaceQT4 import eficas_go -eficas_go.lance_eficas(code=prefs.code) diff --git a/MED/prefs.py b/MED/prefs.py deleted file mode 100644 index 2e9d0a2e..00000000 --- a/MED/prefs.py +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright (C) 2007-2012 EDF R&D -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -# -code="MED" -import sys, os -if os.path.dirname(os.path.abspath(__file__)) not in sys.path : - sys.path.insert(0,os.path.dirname(os.path.abspath(__file__))) diff --git a/MED/prefs_MED.py b/MED/prefs_MED.py deleted file mode 100644 index 220dc3f0..00000000 --- a/MED/prefs_MED.py +++ /dev/null @@ -1,48 +0,0 @@ -# -*- 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. -# -# -# ====================================================================== - -import os,sys -# repIni sert a localiser le fichier editeur.ini -# Obligatoire -repIni=os.path.dirname(os.path.abspath(__file__)) -INSTALLDIR=os.path.join(repIni,'..') -sys.path[:0]=[INSTALLDIR] - - -# lang indique la langue utilisee pour les chaines d'aide : fr ou ang -lang='en' - -# Codage des strings qui accepte les accents (en remplacement de 'ascii') -encoding='iso-8859-1' -docPath=repIni - -# -catalogues=( - #('med','med',os.path.join(repIni,'cata_med.py'),'dico','python'), - ('med','med',os.path.join(repIni,'CataAZ.py'),'python','python'), -) - -simpleClic=True -nombreDeBoutonParLigne = 4 -dicoImages={ -'CREEOBJET' : os.path.join(repIni,'images/essaiAster.png') -} - diff --git a/MED/prefs_monCode.py b/MED/prefs_monCode.py deleted file mode 100644 index b9e513fc..00000000 --- a/MED/prefs_monCode.py +++ /dev/null @@ -1,68 +0,0 @@ -# -*- 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. -# -# -# ====================================================================== - -import os,sys -# repIni sert a localiser le fichier editeur.ini -# Obligatoire -repIni=os.path.dirname(os.path.abspath(__file__)) -INSTALLDIR=os.path.join(repIni,'..') -sys.path[:0]=[INSTALLDIR] - - -# lang indique la langue utilisee pour les chaines d'aide : fr ou ang -lang='en' - -# Codage des strings qui accepte les accents (en remplacement de 'ascii') -encoding='iso-8859-1' -docPath=repIni - -# -catalogues=( - ('monCode','med',os.path.join(repIni,'CataAZ.py'),'python','python'), -# ('monCode','53036',os.path.join(repIni,'Elementary_Lists_53036_Cata.py'),'dico','python'), -# ('monCode','53033',os.path.join(repIni,'Tuples_Cata.py'),'dico','python'), -# ('monCode','53031',os.path.join(repIni,'Tuples_Cata.py'),'dico','python'), -# ('monCode','53030',os.path.join(repIni,'Tuples_Cata.py'),'dico','python'), -# ('monCode','53020',os.path.join(repIni,'Nested_Cond_52945_Cata.py'),'dico','python'), -# ('monCode','53013',os.path.join(repIni,'Elementary_Lists_53013_Cata.py'),'dico','python'), -# ('monCode','53000',os.path.join(repIni,'Elementary_Lists_53030_Cata.py'),'dico','python'), -# ('monCode','52996',os.path.join(repIni,'Elementary_Lists_52996_Cata.py'),'dico','python'), -# ('monCode','52992',os.path.join(repIni,'Many_Concepts_52992_Cata.py'),'dico','python'), -# ('monCode','52989',os.path.join(repIni,'Many_Concepts_52989_Cata.py'),'dico','python'), -# ('monCode','52988',os.path.join(repIni,'Many_Concepts_52988_Cata.py'),'dico','python'), -# ('monCode','52985',os.path.join(repIni,'fin_52985_Cata.py'),'dico','python'), -# ('monCode','52983',os.path.join(repIni,'Many_Concepts_52983_Cata.py'),'dico','python'), -# ('monCode','52975',os.path.join(repIni,'Separate_Blocks_52975_Cata.py'),'dico','python'), -# ('monCode','52972',os.path.join(repIni,'Separate_Blocks_52972_Cata.py'),'dico','python'), -# ('monCode','52958',os.path.join(repIni,'Separate_Blocks_52958_Cata.py'),'dico','python'), -# ('monCode','52952',os.path.join(repIni,'Nested_Cond_52952_Cata.py'),'dico','python'), -# ('monCode','52949',os.path.join(repIni,'Nested_Cond_52949_Cata.py'),'dico','python'), -# ('monCode','52947',os.path.join(repIni,'Nested_Cond_52947_Cata.py'),'dico','python'), -# ('monCode','52946',os.path.join(repIni,'Nested_Cond_52946_Cata.py'),'dico','python'), -# ('monCode','52945',os.path.join(repIni,'Nested_Cond_52945_Cata.py'),'dico','python'), -# ('monCode','Global',os.path.join(repIni,'Global_Condition_Cata.py'),'dico','python'), -## resolu ('monCode','52948',os.path.join(repIni,'Nested_Cond_52948_Cata.py'),'dico','python'), -# pb d afffichage des optionnels ('monCode','52963',os.path.join(repIni,'Separate_Blocks_52963_Cata.py'),'dico','python'), -# pb d afffichage des optionnels ('monCode','52966',os.path.join(repIni,'Separate_Blocks_52966_Cata.py'),'dico','python'), - -# ('monCode','test',os.path.join(repIni,'monCode_Cata1.py'),'dico','python'), -) - diff --git a/MED/properties.py b/MED/properties.py deleted file mode 100644 index 1d328a46..00000000 --- a/MED/properties.py +++ /dev/null @@ -1,24 +0,0 @@ -#@ MODIF properties Accas DATE 11/06/2008 AUTEUR aster M.ADMINISTRATEUR -# RESPONSABLE D6BHHHH J-P.LEFEBVRE -# ====================================================================== -# COPYRIGHT (C) 1991 - 2001 EDF R&D WWW.CODE-ASTER.ORG -# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY -# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY -# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR -# (AT YOUR OPTION) ANY LATER VERSION. -# -# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT -# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF -# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU -# GENERAL PUBLIC LICENSE FOR MORE DETAILS. -# -# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE -# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, -# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. -# ====================================================================== -# IDENTIFICATION DU GESTIONNAIRE DE COMMANDE ACCAS A PARTIR -# DE LA VERSION DU CODE_ASTER ASSOCIE -#---------------------------------------------------------------------- -version = "1.2" -date = "25/05/2010" -exploit = False diff --git a/MED/qtEficas_AZ.py b/MED/qtEficas_AZ.py deleted file mode 100755 index f49b9bcb..00000000 --- a/MED/qtEficas_AZ.py +++ /dev/null @@ -1,32 +0,0 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- -# Copyright (C) 2007-2012 EDF R&D -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -# -""" - Ce module sert a lancer EFICAS configure pour Code_Aster -""" -# Modules Python -# Modules Eficas - -import sys,os -sys.path.append(os.path.join(os.path.abspath(os.path.dirname(__file__)),'..')) - -import prefs -from InterfaceQT4 import eficas_go -eficas_go.lance_eficas(code=prefs.code) diff --git a/MED/qtEficas_Med.py b/MED/qtEficas_Med.py deleted file mode 100755 index f49b9bcb..00000000 --- a/MED/qtEficas_Med.py +++ /dev/null @@ -1,32 +0,0 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- -# Copyright (C) 2007-2012 EDF R&D -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -# -""" - Ce module sert a lancer EFICAS configure pour Code_Aster -""" -# Modules Python -# Modules Eficas - -import sys,os -sys.path.append(os.path.join(os.path.abspath(os.path.dirname(__file__)),'..')) - -import prefs -from InterfaceQT4 import eficas_go -eficas_go.lance_eficas(code=prefs.code) diff --git a/MED/typescript b/MED/typescript deleted file mode 100644 index f070be17..00000000 --- a/MED/typescript +++ /dev/null @@ -1,34 +0,0 @@ -Le script a débuté sur mar. 29 nov. 2016 15:37:06 CET -]0;A96028@dsp0780471: ~/QT5GitEficasTravail/eficas/monCodeA96028@dsp0780471:~/QT5GitEficasTravail/eficas/monCode$ ./qtEficas_Med.py /tmp/a.commoo.comm -eficas_en /home/A96028/QT5GitEficasTravail/eficas/monCode/../Extensions/../UiQT4 -() -{'typ': 'TXM', 'statut': 'o'} -() -{'typ': 'TXM', 'statut': 'o'} -() -{'typ': 'TXM', 'statut': 'o'} -() -{'max': 1, 'typ': 'I', 'statut': 'o'} -() -{'max': '**', 'typ': 'TXM', 'statut': 'o'} -() -{'max': '**', 'typ': 'I', 'statut': 'o'} -() -{'max': '**', 'typ': 'I', 'statut': 'o'} -() -{'NBR': , 'IDE': , 'DES': , 'VAL': , 'statut': 'f'} -() -{'max': 1, 'typ': 'I', 'statut': 'o'} -() -{'max': '**', 'typ': 'TXM', 'statut': 'o'} -() -{'NOM': , 'NBR': , 'statut': 'f'} -() -{'NAME': , 'statut': 'f', 'max': '**', 'ATT': , 'NUM': , 'GRO': } -() -{'NAME': , 'ELEM': , 'statut': 'o'} -() -{'nom': 'FAS', 'FAMILY_MESH_NAME_REF': , 'op': None} -]0;A96028@dsp0780471: ~/QT5GitEficasTravail/eficas/monCodeA96028@dsp0780471:~/QT5GitEficasTravail/eficas/monCode$ exit - -Script terminé sur mar. 29 nov. 2016 15:37:13 CET diff --git a/OldCodes/MED/monCode_qtEficas.py b/OldCodes/MED/monCode_qtEficas.py index 7f9a6e2c..b1254f2c 100755 --- a/OldCodes/MED/monCode_qtEficas.py +++ b/OldCodes/MED/monCode_qtEficas.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -# Copyright (C) 2007-2021 EDF R&D +# Copyright (C) 2007-2012 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/OldCodes/MED/prefs.py b/OldCodes/MED/prefs.py index 768415d5..2e9d0a2e 100644 --- a/OldCodes/MED/prefs.py +++ b/OldCodes/MED/prefs.py @@ -1,4 +1,4 @@ -# Copyright (C) 2007-2021 EDF R&D +# Copyright (C) 2007-2012 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/OldCodes/MED/qtEficas_AZ.py b/OldCodes/MED/qtEficas_AZ.py index 336afdff..f49b9bcb 100755 --- a/OldCodes/MED/qtEficas_AZ.py +++ b/OldCodes/MED/qtEficas_AZ.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -# Copyright (C) 2007-2021 EDF R&D +# Copyright (C) 2007-2012 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/OldCodes/MED/qtEficas_Med.py b/OldCodes/MED/qtEficas_Med.py index 336afdff..f49b9bcb 100755 --- a/OldCodes/MED/qtEficas_Med.py +++ b/OldCodes/MED/qtEficas_Med.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -# Copyright (C) 2007-2021 EDF R&D +# Copyright (C) 2007-2012 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public diff --git a/OldCodes/Tests/CataAZ.py b/OldCodes/Tests/CataAZ.py new file mode 100755 index 00000000..b6e6494e --- /dev/null +++ b/OldCodes/Tests/CataAZ.py @@ -0,0 +1,210 @@ +# coding: utf-8 +import types +from Accas import * + +class grno(GEOM): + """ + Classe servant à définir le nom d'un groupe de noeuds dans le fichier de commande + En clair : un chaine de longueur 24. + """ + def __convert__(cls,valeur): + """ + Fonction de verification de la longueur de la chaine + """ + if isinstance(valeur, (str,unicode)) and len(valeur.strip()) <= 24: + return valeur.strip() + raise ValueError(_(u'On attend une chaine de caractères (de longueur <= 24).')) + __convert__ = classmethod(__convert__) + +class grma(GEOM): + """ + Classe servant à définir le nom d'un groupe de mailles dans le fichier de commande + En clair : un chaine de longueur 24. + """ + def __convert__(cls,valeur): + """ + Fonction de verification de la longueur de la chaine + """ + if isinstance(valeur, (str,unicode)) and len(valeur.strip()) <= 24: + return valeur.strip() + raise ValueError(_(u'On attend une chaine de caractères (de longueur <= 24).')) + __convert__ = classmethod(__convert__) + + +class Tuple: + def __init__(self,ntuple): + self.ntuple=ntuple + + def __convert__(self,valeur): + if type(valeur) == types.StringType: return None + if len(valeur) != self.ntuple: return None + return valeur + + def info(self): + return "Tuple de %s elements" % self.ntuple + + __repr__=info + __str__=info + +class ObjetUtilisateur(ASSD): pass + + +JdC = JDC_CATA(code='PATTERNS', + execmodul=None, + ) + + +EXAMPLE = PROC (nom = 'EXAMPLE', + op=None, + + TITRE = SIMP(statut ='o', typ = 'TXM', defaut = 'Mon Etude',), + TITRE2 = SIMP(statut ='f', typ = 'TXM', ), +) +CREEOBJET = OPER (nom="CREEOBJET", + op=None, + sd_prod=ObjetUtilisateur, + UIinfo={"groupes":("Group1",)}, + + TITLE = SIMP(statut ='o', typ = 'TXM', defaut = '',), + RB1 = SIMP(statut ='o', typ = 'I', into = [1,2,3],), + RB2 = SIMP(statut ='o', typ = 'I', into = [1,2,3,4,5,6,],), + CB = SIMP(statut ='o', typ = 'I', into = [1,2,3,4,5,6,7,8,9],), + MBool = SIMP(statut ='o', typ = bool,), + MFile = SIMP(statut ='o', typ = ('Fichier','All Files (*)')), + MDir = SIMP(statut ='o', typ = 'Repertoire'), + Reel1 = SIMP(statut ='o', typ = 'R'), + Compl = SIMP(statut ='o', typ = 'C'), + Tuple2 = SIMP(statut ='o', typ = Tuple(2), validators=VerifTypeTuple(('R','R'))), + Tuple3 = SIMP(statut ='o', typ = Tuple(3), validators=VerifTypeTuple(('R','R','R'))), + InSalome = SIMP(statut ='o', typ = SalomeEntry), + + LTITLE = SIMP(statut ='o', typ = 'TXM', max='**', defaut = '',), + LRB2 = SIMP(statut ='o', typ = 'I', max = '**', into = [1,2,3,4,5,6,],), + LCB = SIMP(statut ='o', typ = 'I', max = '**', homo="SansOrdreNiDoublon", into = [1,2,3,4,5,6,7,8,9],), + LReel1 = SIMP(statut ='o', typ = 'R', max = "**"), + LCompl = SIMP(statut ='o', typ = 'C', max = "**"), + LTuple2 = SIMP(statut ='o', typ = Tuple(2), validators=VerifTypeTuple(('R','R')), max = "**"), + LTuple3 = SIMP(statut ='o', typ = Tuple(3), validators=VerifTypeTuple(('R','R','R')), max = "**"), + LInSalome = SIMP(statut ='o', typ = SalomeEntry, max="**"), + + LREEL = SIMP(statut ='f', typ = 'R', max='**', defaut = '',), +) + +UTILISEOBJET = PROC (nom="UTILISEOBJET", + op=None, + UIinfo={"groupes":("Group1",)}, + Obj = SIMP (statut ='o', typ = ObjetUtilisateur,) +) + +ESSAI_FACT=OPER(nom="ESSAI_FACT", + sd_prod=ObjetUtilisateur, + op=None, + fr="Affectation de caractéristiques à des éléments de structure", + regles = (AU_MOINS_UN('Poutre','Barre'), + EXCLUS('Discret','Discret_2D'),), + Info = SIMP(statut='f',typ='I', defaut= 1 ,into=(1,2) ), + Verif = SIMP(statut='f',typ='TXM',validators=NoRepeat(),max='**',into=("Maille","Noeud") ), +# +# ============================================================================== + Poutre = FACT(statut= 'f',max= '**', + Section = SIMP(statut= 'o',typ= 'TXM' ,into= ("GENERALE","RECTANGLE","CERCLE") ), + + b_generale = BLOC(condition = " Section == 'GENERALE'", + regles = (UN_PARMI('Maille','GroupeMailles'),), + Maille = SIMP(statut= 'f',typ= 'TXM' ,validators= NoRepeat(),max= '**'), + GroupeMailles = SIMP(statut= 'f',typ= grma,validators= NoRepeat(),max= '**'), + + Vari = SIMP(statut= 'f',typ= 'TXM',into= ("CONSTANT","HOMOTHETIQUE"),defaut= "CONSTANT"), + + b_constant = BLOC(condition = "Vari == 'CONSTANT'", + regles = (PRESENT_ABSENT('Table','Cara'), + PRESENT_PRESENT('Table','Nom'), + PRESENT_PRESENT('Cara','Valeur'),), + Table = SIMP(statut= 'f',typ='TXM'), + Nom = SIMP(statut= 'f',typ= 'TXM'), + Cara = SIMP(statut= 'o',typ= 'TXM',min= 4 ,max= 5, + fr= "A,IY,IZ,JX sont des paramètres obligatoires", + validators= [NoRepeat(), Compulsory(['A','IY','IZ','JX'])], + into= ("A","IY","IZ","AY","AZ","EY","EZ","JX","RY","RZ","RT","JG","IYR2","IZR2","AI") ), + Valeur = SIMP(statut= 'f',typ= 'R',min= 4 ,max= 15), + ), + ), + b_rectangle = BLOC(condition = "Section == 'RECTANGLE'", + regles = (UN_PARMI('Maille','GroupeMailles'),), + Maille = SIMP(statut= 'f',typ= 'TXM' ,validators= NoRepeat(),max= '**'), + GroupeMailles = SIMP(statut= 'f',typ= grma,validators= NoRepeat(),max= '**'), + Vari = SIMP(statut= 'f',typ= 'TXM',into= ("CONSTANT","HOMOTHETIQUE","AFFINE"),defaut= "CONSTANT"), + b_constant = BLOC(condition = "Vari == 'CONSTANT'", + Cara = SIMP(statut= 'o',typ= 'TXM',min= 1 ,max= 4, + validators = [NoRepeat(), + OrVal( [AndVal( [Compulsory(['H']),Absent(['HY','HZ','EPY','EPZ'])] ), + AndVal( [Compulsory(['HY','HZ']),Together(['EPY','EPZ']),Absent(['H','EP'])] )] )], + into= ("H","EP", "HY","HZ","EPY","EPZ"),), + Valeur = SIMP(statut= 'o',typ= 'R',min= 1 ,max= 4), + ), + + Metrique = SIMP(statut= 'f',typ= 'TXM',defaut= "NON",into= ("OUI","NON") ), + Fcx = SIMP(statut= 'f',typ= 'R'), + Tuyau = SIMP(statut= 'f',typ= 'I',val_max= 10,defaut= 3), + ), + ), +# +# ============================================================================== + Barre = FACT(statut='f',max='**', + regles = (UN_PARMI('Maille','GroupeMailles'),), + Maille = SIMP(statut='f',typ='TXM' ,validators=NoRepeat(),max='**'), + GroupeMailles = SIMP(statut='f',typ=grma,validators=NoRepeat(),max='**'), + Section = SIMP(statut='o',typ='TXM',into=("GENERALE","RECTANGLE","CERCLE") ), + b_generale = BLOC(condition = "Section=='GENERALE'", + regles = (PRESENT_ABSENT('Table','Cara'), + PRESENT_PRESENT('Table','Nom'), + PRESENT_PRESENT('Cara','Valeur')), + Table = SIMP(statut='f',typ='TXM'), + Nom = SIMP(statut='f',typ='TXM',validators=LongStr(1,24) ), + Cara = SIMP(statut='f',typ='TXM',into=("A",) ), + Valeur = SIMP(statut='f',typ='R',min=1,max=1 ), + ), + b_rectangle = BLOC(condition = "Section=='RECTANGLE'", + Cara = SIMP(statut='o',typ='TXM', min=1, max=4, + validators = [NoRepeat(), + OrVal( [AndVal( [Compulsory(['H']),Absent(['HY','HZ','EPY','EPZ'])] ), + AndVal( [Compulsory(['HY','HZ']),Together(['EPY','EPZ']),Absent(['H','EP'])] )] )], + into=("H","EP","HZ","HY","EPY","EPZ"), ), + Valeur = SIMP(statut='o',typ='R',min=1,max=4 ), ), + b_cercle = BLOC(condition = "Section=='CERCLE'", + Cara = SIMP(statut='o',typ='TXM',validators=[NoRepeat(),Compulsory(['R'])],min=1,max=2,into=("R","EP") ), + Valeur = SIMP(statut='o',typ='R',min=1,max=2 ), ), + ), +# +# ============================================================================== + Discret = FACT(statut='f',max='**', + REPERE = SIMP(statut='f',typ='TXM',into=("LOCAL","GLOBAL") ), + AMOR_HYST = SIMP(statut='f',typ='R' ), + SYME = SIMP(statut='f',typ='TXM',defaut="OUI",into=("OUI","NON"),), + b_SYME_OUI = BLOC(condition="SYME=='OUI'", + fr="SYMETRIQUE: Affectation de matrices de rigidité, de masse ou d'amortissement à des mailles ou noeuds", + Cara = SIMP(statut='o',typ='TXM',validators=NoRepeat(),max=1,defaut="None", + 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", + "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", + "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",),), + # Affection des caractéristiques de RIGIDITE/AMORTISSEMENT/MASSE + b_AK_T_D_N = BLOC(condition = "((Cara=='K_T_D_N')or(Cara=='A_T_D_N'))", + fr = "Noeud: 3 valeurs (triangulaire supérieure par colonne)", + regles = (UN_PARMI('Maille','GroupeMailles','Noeud','GROUP_NO'),), + Noeud = SIMP(statut='f',typ='TXM' ,validators=NoRepeat(),max='**'), + GROUP_NO = SIMP(statut='f',typ=grno,validators=NoRepeat(),max='**'), + Maille = SIMP(statut='f',typ='TXM' ,validators=NoRepeat(),max='**'), + GroupeMailles = SIMP(statut='f',typ=grma,validators=NoRepeat(),homo='SansOrdreNiDoublon',max='**'), + Valeur = SIMP(statut='o',typ='R',min=3 ,max=3 ),), + ), + ), +# +# ============================================================================== + Discret_2D = FACT(statut='f',max='**', + REPERE = SIMP(statut='f',typ='TXM',into=("LOCAL","GLOBAL") ), + AMOR_HYST = SIMP(statut='f',typ='R' ), + SYME = SIMP(statut='f',typ='TXM',defaut="OUI",into=("OUI","NON"),), + ), +) + + diff --git a/OldCodes/Tests/Elementary_Lists_52996_Cata.py b/OldCodes/Tests/Elementary_Lists_52996_Cata.py new file mode 100644 index 00000000..f3cc11c8 --- /dev/null +++ b/OldCodes/Tests/Elementary_Lists_52996_Cata.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +from Accas import * + +#class myMesh(ASSD): pass +class myModel(ASSD): pass + +JdC = JDC_CATA(code='PATTERNS', + execmodul=None, + regles=(#AU_PLUS_UN('DEBUT', 'POURSUITE'), + AU_PLUS_UN('ALL_LISTS'), + #AU_PLUS_UN('FIN'), + A_CLASSER(('DEBUT', 'POURSUITE'), 'FIN') + ) +) + +class grma(): + def __convert__(cls,valeur): + if isinstance(valeur, (str,unicode)) and len(valeur.strip()) <= 24 : #and ("item" in (valeur.strip())) + return valeur.strip() + raise ValueError("Name length does not contain \"test\" and is longer than allowed, 24") + __convert__ = classmethod(__convert__) + +def mySeveral(suffix,num): + out=list() + for i in range(1,num+1): + out.append(suffix+str(i).zfill(2)) + return out + +switch_facultatif=True #change 'o' to 'f' of some widgets in the loop +#empty_defauts=True + +def myBloc(num): + myNum=str(num).zfill(2) + list_item_body="Item_"+myNum+"_" + defauts0=["","",True,"'phenomena_"+myNum+"'",mySeveral(list_item_body,2)] #presence of default values + defauts_mask=[False,False,True,True,True] #switch off defaults of some types + defauts=list() + for id0 in range(len(defauts0)): + if defauts_mask[id0]: + item=", defaut="+str(defauts0[id0]) + else: + item="" + defauts.append(item) + #print defauts + + opt=['o','o','o','o','o'] #initial default obligation of items in FACT groups + #make different widgets optional, one by one: + myLen=len(opt) + if switch_facultatif: + make_f=(num)%myLen + opt[make_f]='f' + #print opt + #if empty_defauts: + # clean_defaut=num%myLen + + myString="BLOC(condition=\"MESH==\'mesh_"+myNum+"'\""+defauts[0]+", AFFE=FACT(statut='"+opt[1]+"'"+defauts[1]+", ALL=SIMP(statut='"+opt[2]+"', typ=bool,ang='ALL "+myNum+" help EN'"+defauts[2]+"),PHENOMENA=SIMP(statut='"+opt[3]+"',typ='TXM',into=mySeveral('phenomena_',"+str(num)+")"+defauts[3]+"), MODELISATION=SIMP(statut='"+opt[4]+"',typ='TXM', min=2,max='**',into=mySeveral('"+list_item_body+"',"+str(num*4)+")"+defauts[4]+", ang='Input "+myNum+" list EN', fr='Input "+myNum+" list FR'),),)" + print myString + return eval(myString) + +ALL_LISTS=OPER(nom="ALL_LISTS",op=18,sd_prod=myModel, + UIinfo={"groupes":("Group1",)}, + ang="Model mesh definition EN", + reentrant='n', + #regles=(AU_MOINS_UN('LIST_O_CHECKTEXT','LIST_F_CHECKTEXT','LIST_O_ANY','LIST_F_ANY')), + + #LIST_O_NOREPEAT_CHECKTEXT=SIMP(statut='o',typ=grma,validators=NoRepeat(),min=3, max='**'), + #LIST_F_NOREPEAT_CHECKTEXT=SIMP(statut='f',typ=grma,validators=NoRepeat(),min=3, max='**'), + #LIST_F_REPEAT_CHECKTEXT=SIMP(statut='f',typ=grma,min=3, max='**'), + #LIST_O_REPEAT_CHECKTEXT=SIMP(statut='o',typ=grma,min=3, max='**'), + + #LIST_F_NOREPEAT_ANYTEXT=SIMP(statut='f',typ='TXM',validators=NoRepeat(),min=3, max='**'), + #LIST_O_NOREPEAT_ANYTEXT=SIMP(statut='o',typ='TXM',min=3,validators=NoRepeat(), max='**'), + #LIST_O_REPEAT_ANYTEXT=SIMP(statut='o',typ='TXM',min=3, max='**'), + #LIST_F_REPEAT_ANYTEXT=SIMP(statut='f',typ='TXM',min=3, max='**'), + + #LIST_O_NOREPEAT_CHECKTEXT_ADD=SIMP(statut='o',typ=grma,validators=NoRepeat(), into=("item01","text01","item02","text02","item03","text03",), min=3, max='**'), + #LIST_F_REPEAT_ANYTEXT_ADD=SIMP(statut='f',typ=grma,validators=NoRepeat(), into=("item01","text01","item02","text02","item03","text03",), min=3, max='**'), + + LIST_O_NOREPEAT_CHECKTEXT_ADD_NODEFAUT=SIMP(statut='o',typ=grma,validators=NoRepeat(), into=("item01","text01","item02","text02","item03","text03","item04","text04",), min=3, max='**'), + #LIST_O_NOREPEAT_CHECKTEXT_ADD_DEFAUT=SIMP(statut='o',typ=grma,validators=NoRepeat(), into=("item01","text01","item02","text02","item03","text03",), defaut=('item01','item02','item03'), min=3, max='**'), +) + +Classement_Commandes_Ds_Arbre=('DEBUT','MESH_TYPES','ALL_LISTS','FIN') + +Ordre_Des_Commandes = ('DEBUT','MESH_TYPES','ALL_LISTS','FIN') diff --git a/OldCodes/Tests/Elementary_Lists_53000_Cata.py b/OldCodes/Tests/Elementary_Lists_53000_Cata.py new file mode 100644 index 00000000..0dbba473 --- /dev/null +++ b/OldCodes/Tests/Elementary_Lists_53000_Cata.py @@ -0,0 +1,52 @@ +# coding: utf-8 +from Accas import * + +#class myMesh(ASSD): pass +class myModel(ASSD): pass + +JdC = JDC_CATA(code='PATTERNS', + execmodul=None, + regles=(#AU_PLUS_UN('DEBUT', 'POURSUITE'), + AU_PLUS_UN('ALL_LISTS'), + #AU_PLUS_UN('FIN'), + A_CLASSER(('DEBUT', 'POURSUITE'), 'FIN') + ) +) + + +ALL_LISTS=OPER(nom="ALL_LISTS",op=18,sd_prod=myModel, + UIinfo={"groupes":("Group1",)}, + ang="Model mesh definition EN", + reentrant='n', + LIST_O_NOREPEAT_CHECKTEXT_ADD_DEFAUT=SIMP(statut='o',typ="TXM",validators=NoRepeat(), + into=("item01","text01","item02","text02","item03","text03","item04","text04","item05","text05",), + defaut=('item01','item02','item03'), + homo="SansOrdreNiDoublon", + min=3, max='**'), + + #regles=(AU_MOINS_UN('LIST_O_CHECKTEXT','LIST_F_CHECKTEXT','LIST_O_ANY','LIST_F_ANY')), + + #LIST_O_NOREPEAT_CHECKTEXT=SIMP(statut='o',typ=grma,validators=NoRepeat(),min=3, max='**'), + #LIST_F_NOREPEAT_CHECKTEXT=SIMP(statut='f',typ=grma,validators=NoRepeat(),min=3, max='**'), + #LIST_F_REPEAT_CHECKTEXT=SIMP(statut='f',typ=grma,min=3, max='**'), + #LIST_O_REPEAT_CHECKTEXT=SIMP(statut='o',typ=grma,min=3, max='**'), + + #LIST_F_NOREPEAT_ANYTEXT=SIMP(statut='f',typ='TXM',validators=NoRepeat(),min=3, max='**'), + #LIST_O_NOREPEAT_ANYTEXT=SIMP(statut='o',typ='TXM',min=3,validators=NoRepeat(), max='**'), + #LIST_O_REPEAT_ANYTEXT=SIMP(statut='o',typ='TXM',min=3, max='**'), + #LIST_F_REPEAT_ANYTEXT=SIMP(statut='f',typ='TXM',min=3, max='**'), + + #LIST_O_NOREPEAT_CHECKTEXT_ADD=SIMP(statut='o',typ=grma,validators=NoRepeat(), into=("item01","text01","item02","text02","item03","text03",), min=3, max='**'), + #LIST_F_REPEAT_ANYTEXT_ADD=SIMP(statut='f',typ=grma,validators=NoRepeat(), into=("item01","text01","item02","text02","item03","text03",), min=3, max='**'), + + #LIST_O_NOREPEAT_CHECKTEXT_ADD_NODEFAUT=SIMP(statut='o',typ=grma,validators=NoRepeat(), into=("item01","text01","item02","text02","item03","text03","item04","text04",), min=3, max='**'), + + + #LIST_O_SANSORDRENODOUBLON_CHECKTEXT_DEFAUT=SIMP(statut='o',typ=grma,homo="SansOrdreNiDoublon", into=("item01","text01","item02","text02","item03","text03",), defaut=('item01','item02','item03'), min=3, max='**'), +) + + + +Classement_Commandes_Ds_Arbre=('DEBUT','MESH_TYPES','ALL_LISTS','FIN') + +Ordre_Des_Commandes = ('DEBUT','MESH_TYPES','ALL_LISTS','FIN') diff --git a/OldCodes/Tests/Elementary_Lists_53013_Cata.py b/OldCodes/Tests/Elementary_Lists_53013_Cata.py new file mode 100644 index 00000000..cf371ff2 --- /dev/null +++ b/OldCodes/Tests/Elementary_Lists_53013_Cata.py @@ -0,0 +1,59 @@ +# coding: utf-8 +from Accas import * + +class myModel(ASSD): pass + +JdC = JDC_CATA(code='PATTERNS', + execmodul=None, + regles=(#AU_PLUS_UN('DEBUT', 'POURSUITE'), + AU_PLUS_UN('ALL_LISTS'), + #AU_PLUS_UN('FIN'), + A_CLASSER(('DEBUT', 'POURSUITE'), 'FIN') + ) +) + +class grma(): + def __convert__(cls,valeur): + if isinstance(valeur, (str,unicode)) and len(valeur.strip()) <= 12 and ("item" in (valeur.strip()).lower()): # + return valeur.strip() + raise ValueError("Name length does not contain \"test\" and is longer than allowed, 12") + __convert__ = classmethod(__convert__) + +def mySeveral(suffix,num): + out=list() + for i in range(1,num+1): + out.append(suffix+str(i).zfill(2)) + return out + +ALL_LISTS=OPER(nom="ALL_LISTS",op=18,sd_prod=myModel, + UIinfo={"groupes":("Group1",)}, + fr="All lists definition FR", + ang="All lists definition EN", + reentrant='n', + #regles=(AU_MOINS_UN('LIST_O_CHECKTEXT','LIST_F_CHECKTEXT','LIST_O_ANY','LIST_F_ANY')), + + L1_LIST_O_NOREPEAT_CHECKTEXT=SIMP(statut='o',typ=grma,validators=NoRepeat(),min=3, max='**', ang='Obligatory, No Repetitions, checked text, EN'), + L2_LIST_F_NOREPEAT_CHECKTEXT=SIMP(statut='f',typ=grma,validators=NoRepeat(),min=3, max='**', ang='Optional, No Repetitions, checked text, EN'), + L3_LIST_F_REPEAT_CHECKTEXT=SIMP(statut='f',typ=grma,min=3, max='**',ang='Optional, Allowed Repetitions, checked text, EN'), + L4_LIST_O_REPEAT_CHECKTEXT=SIMP(statut='o',typ=grma,min=3, max='**',ang='Obligatory, Allowed Repetitions, checked text, EN'), + + L5_LIST_F_NOREPEAT_ANYTEXT=SIMP(statut='f',typ='TXM',validators=NoRepeat(),min=3, max='**',ang='Optional, No Repetitions, any text, EN'), + L6_LIST_O_NOREPEAT_ANYTEXT=SIMP(statut='o',typ='TXM',min=3,validators=NoRepeat(), max='**',ang='Obligatory, No Repetitions, any text, EN'), + L7_LIST_O_REPEAT_ANYTEXT=SIMP(statut='o',typ='TXM',min=3, max='**',ang='Obligatory, Allowed Repetitions, any text, EN'), + L8_LIST_F_REPEAT_ANYTEXT=SIMP(statut='f',typ='TXM',min=3, max='**',ang='Optional, Allowed Repetitions, any text, EN'), + + L9_LIST_O_NOREPEAT_CHECKTEXT_ADD=SIMP(statut='o',typ=grma,validators=NoRepeat(), into=("item01","text01","item02","text02","item03","text03",), min=3, max='**',ang='With spare list, Obligatory, No Repetitions, checked text, EN',), + L10_LIST_F_REPEAT_ANYTEXT_ADD=SIMP(statut='f',typ='TXM', into=("item01","text01","item02","text02","item03","text03",), min=3, max='**',ang='With spare list, Optional, Allowed Repetitions, any text, EN'), + L11_LIST_O_REPEAT_CHECKTEXT_ADD_NODEFAUT=SIMP(statut='o',typ=grma, into=("item01","text01","item02","text02","item03","text03","item04","text04"),ang='With spare list, obligatory, No Repetitions, checked text, no default values, EN', min=3, max='**'), + L12_LIST_O_NOREPEAT_CHECKTEXT_ADD_DEFAUT=SIMP(statut='o',typ=grma,validators=NoRepeat(), into=("item01","text01","item02","text02","item03","text03","item04","text04","item05","text05",), defaut=('item01','item02','item03'), min=3, max='**',ang='With spare list, Obligatory, No Repetitions, checked text, with default values EN'), + + L13_LIST_F_SANSORDRENODOUBLON_ANYTEXT_NODEFAUT=SIMP(statut='f',typ='TXM',homo="SansOrdreNiDoublon", into=("item01","text01","item02","text02","item03","text03",), min=3, max='**',ang='With check boxes, Optional, any text, no defaults, EN'), + L14_LIST_O_SANSORDRENODOUBLON_CHECKTEXT_NODEFAUT=SIMP(statut='o',typ=grma,homo="SansOrdreNiDoublon", into=("item01","text01","item02","text02","item03","text03",), min=3, max='**',ang='With check boxes, Obligatory, checked text, EN'), + L15_LIST_O_SANSORDRENODOUBLON_CHECKTEXT_DEFAUT=SIMP(statut='o',typ=grma,homo="SansOrdreNiDoublon", into=("item01","text01","item02","text02","item03","text03","item02","text02","item01","text01",), defaut=('item01','item02','item03'), min=3, max='**', ang='With check boxes, Obligatory, checked text, with default values, EN'), +) + + + +Classement_Commandes_Ds_Arbre=('DEBUT','MESH_TYPES','ALL_LISTS','FIN') + +Ordre_Des_Commandes = ('DEBUT','MESH_TYPES','ALL_LISTS','FIN') diff --git a/OldCodes/Tests/Elementary_Lists_53036_Cata.py b/OldCodes/Tests/Elementary_Lists_53036_Cata.py new file mode 100644 index 00000000..5cdc0faa --- /dev/null +++ b/OldCodes/Tests/Elementary_Lists_53036_Cata.py @@ -0,0 +1,59 @@ +# coding: utf-8 +from Accas import * + +class myModel(ASSD): pass + +JdC = JDC_CATA(code='PATTERNS', + execmodul=None, + regles=(#AU_PLUS_UN('DEBUT', 'POURSUITE'), + AU_PLUS_UN('ALL_LISTS'), + #AU_PLUS_UN('FIN'), + A_CLASSER(('DEBUT', 'POURSUITE'), 'FIN') + ) +) + +class grma(): + def __convert__(cls,valeur): + if isinstance(valeur, (str,unicode)) and len(valeur.strip()) <= 12 and ("item" in (valeur.strip()).lower()): # + return valeur.strip() + raise ValueError("Name length does not contain \"item\" and is longer than allowed, 12") + __convert__ = classmethod(__convert__) + +def mySeveral(suffix,num): + out=list() + for i in range(1,num+1): + out.append(suffix+str(i).zfill(2)) + return out + +ALL_LISTS=OPER(nom="ALL_LISTS",op=18,sd_prod=myModel, + UIinfo={"groupes":("Group1",)}, + fr="All lists definition FR", + ang="All lists definition EN", + reentrant='n', + #regles=(AU_MOINS_UN('LIST_O_CHECKTEXT','LIST_F_CHECKTEXT','LIST_O_ANY','LIST_F_ANY')), + + L1_LIST_O_NOREPEAT_CHECKTEXT=SIMP(statut='o',typ=grma,validators=NoRepeat(),min=3, max='**', ang='Obligatory, No Repetitions, checked text, EN'), + L2_LIST_F_NOREPEAT_CHECKTEXT=SIMP(statut='f',typ=grma,validators=NoRepeat(),min=3, max='**', ang='Optional, No Repetitions, checked text, EN'), + L3_LIST_F_REPEAT_CHECKTEXT=SIMP(statut='f',typ=grma,min=3, max='**',ang='Optional, Allowed Repetitions, checked text, EN'), + L4_LIST_O_REPEAT_CHECKTEXT=SIMP(statut='o',typ=grma,min=3, max='**',ang='Obligatory, Allowed Repetitions, checked text, EN'), + + L5_LIST_F_NOREPEAT_ANYTEXT=SIMP(statut='f',typ='TXM',validators=NoRepeat(),min=3, max='**',ang='Optional, No Repetitions, any text, EN'), + L6_LIST_O_NOREPEAT_ANYTEXT=SIMP(statut='o',typ='TXM',min=3,validators=NoRepeat(), max='**',ang='Obligatory, No Repetitions, any text, EN'), + L7_LIST_O_REPEAT_ANYTEXT=SIMP(statut='o',typ='TXM',min=3, max='**',ang='Obligatory, Allowed Repetitions, any text, EN'), + L8_LIST_F_REPEAT_ANYTEXT=SIMP(statut='f',typ='TXM',min=3, max='**',ang='Optional, Allowed Repetitions, any text, EN'), + + L9_LIST_O_NOREPEAT_CHECKTEXT_ADD=SIMP(statut='o',typ=grma,validators=NoRepeat(), into=("item01","text01","item02","text02","item03","text03",), min=3, max='**',ang='With spare list, Obligatory, No Repetitions, checked text, EN',), + L10_LIST_F_REPEAT_ANYTEXT_ADD=SIMP(statut='f',typ='TXM', into=("item01","text01","item02","text02","item03","text03",), min=3, max='**',ang='With spare list, Optional, Allowed Repetitions, any text, EN'), + L11_LIST_O_REPEAT_CHECKTEXT_ADD_NODEFAUT=SIMP(statut='o',typ=grma, into=("item01","text01","item02","text02","item03","text03","item04","text04"),ang='With spare list, obligatory, No Repetitions, checked text, no default values, EN', min=3, max='**'), + L12_LIST_O_NOREPEAT_CHECKTEXT_ADD_DEFAUT=SIMP(statut='o',typ=grma,validators=NoRepeat(), into=("item01","text01","item02","text02","item03","text03","item04","text04","item05","text05",), defaut=('item01','item02','item03'), min=3, max='**',ang='With spare list, Obligatory, No Repetitions, checked text, with default values EN'), + + L13_LIST_F_SANSORDRENODOUBLON_ANYTEXT_NODEFAUT=SIMP(statut='f',typ='TXM',homo="SansOrdreNiDoublon", into=("item01","text01","item02","text02","item03","text03",), min=3, max='**',ang='With check boxes, Optional, any text, no defaults, EN'), + L14_LIST_O_SANSORDRENODOUBLON_CHECKTEXT_NODEFAUT=SIMP(statut='o',typ=grma,homo="SansOrdreNiDoublon", into=("item01","text01","item02","text02","item03","text03",), min=3, max='**',ang='With check boxes, Obligatory, checked text, EN'), + L15_LIST_O_SANSORDRENODOUBLON_CHECKTEXT_NOREPEAT_DEFAUT=SIMP(statut='o',typ=grma,homo="SansOrdreNiDoublon", into=("item01","text01","item02","text02","item03","text03","item03","text03","item02","text02","item01","text01",), defaut=('item01','item02','item03'), min=3, max='**', ang='With check boxes, Obligatory, checked text, with default values, EN'), #validators=NoRepeat(), +) + + + +Classement_Commandes_Ds_Arbre=('DEBUT','MESH_TYPES','ALL_LISTS','FIN') + +Ordre_Des_Commandes = ('DEBUT','MESH_TYPES','ALL_LISTS','FIN') diff --git a/OldCodes/Tests/Elementary_Lists_Cata.py b/OldCodes/Tests/Elementary_Lists_Cata.py new file mode 100755 index 00000000..92d20b35 --- /dev/null +++ b/OldCodes/Tests/Elementary_Lists_Cata.py @@ -0,0 +1,59 @@ +# coding: utf-8 +from Accas import * + +class myModel(ASSD): pass + +JdC = JDC_CATA(code='PATTERNS', + execmodul=None, + regles=(#AU_PLUS_UN('DEBUT', 'POURSUITE'), + AU_PLUS_UN('ALL_LISTS'), + #AU_PLUS_UN('FIN'), + A_CLASSER(('DEBUT', 'POURSUITE'), 'FIN') + ) +) + +class grma(): + def __convert__(cls,valeur): + if isinstance(valeur, (str,unicode)) and len(valeur.strip()) <= 12 and ("item" in (valeur.strip()).lower()): # + return valeur.strip() + raise ValueError("Name length does not contain \"test\" and is longer than allowed, 12") + __convert__ = classmethod(__convert__) + +def mySeveral(suffix,num): + out=list() + for i in range(1,num+1): + out.append(suffix+str(i).zfill(2)) + return out + +ALL_LISTS=OPER(nom="ALL_LISTS",op=18,sd_prod=myModel, + UIinfo={"groupes":("Group1",)}, + fr="All lists definition FR", + ang="All lists definition EN", + reentrant='n', + #regles=(AU_MOINS_UN('LIST_O_CHECKTEXT','LIST_F_CHECKTEXT','LIST_O_ANY','LIST_F_ANY')), + + L1_LIST_O_NOREPEAT_CHECKTEXT=SIMP(statut='o',typ=grma,validators=NoRepeat(),min=3, max='**', ang='Obligatory, No Repetitions, checked text, EN'), + L2_LIST_F_NOREPEAT_CHECKTEXT=SIMP(statut='f',typ=grma,validators=NoRepeat(),min=3, max='**', ang='Optional, No Repetitions, checked text, EN'), + L3_LIST_F_REPEAT_CHECKTEXT=SIMP(statut='f',typ=grma,min=3, max='**',ang='Optional, Allowed Repetitions, checked text, EN'), + L4_LIST_O_REPEAT_CHECKTEXT=SIMP(statut='o',typ=grma,min=3, max='**',ang='Obligatory, Allowed Repetitions, checked text, EN'), + + L5_LIST_F_NOREPEAT_ANYTEXT=SIMP(statut='f',typ='TXM',validators=NoRepeat(),min=3, max='**',ang='Optional, No Repetitions, any text, EN'), + L6_LIST_O_NOREPEAT_ANYTEXT=SIMP(statut='o',typ='TXM',min=3,validators=NoRepeat(), max='**',ang='Obligatory, No Repetitions, any text, EN'), + L7_LIST_O_REPEAT_ANYTEXT=SIMP(statut='o',typ='TXM',min=3, max='**',ang='Obligatory, Allowed Repetitions, any text, EN'), + L8_LIST_F_REPEAT_ANYTEXT=SIMP(statut='f',typ='TXM',min=3, max='**',ang='Optional, Allowed Repetitions, any text, EN'), + + L9_LIST_O_NOREPEAT_CHECKTEXT_ADD=SIMP(statut='o',typ=grma,validators=NoRepeat(), into=("item01","text01","item02","text02","item03","text03",), min=3, max='**',ang='With spare list, Obligatory, No Repetitions, checked text, EN',), + L10_LIST_F_REPEAT_ANYTEXT_ADD=SIMP(statut='f',typ='TXM', into=("item01","text01","item02","text02","item03","text03",), min=3, max='**',ang='With spare list, Optional, Allowed Repetitions, any text, EN'), + L11_LIST_O_REPEAT_CHECKTEXT_ADD_NODEFAUT=SIMP(statut='o',typ=grma, into=("item01","text01","item02","text02","item03","text03","item04","text04"),ang='With spare list, obligatory, No Repetitions, checked text, no default values, EN', min=3, max='**'), + L12_LIST_O_NOREPEAT_CHECKTEXT_ADD_DEFAUT=SIMP(statut='o',typ=grma,validators=NoRepeat(), into=("item01","text01","item02","text02","item03","text03","item04","text04","item05","text05",), defaut=('item01','item02','item03'), min=3, max='**',ang='With spare list, Obligatory, No Repetitions, checked text, with default values EN'), + + L13_LIST_F_SANSORDRENODOUBLON_ANYTEXT_NODEFAUT=SIMP(statut='f',typ='TXM',homo="SansOrdreNiDoublon", into=("item01","text01","item02","text02","item03","text03",), min=3, max='**',ang='With check boxes, Optional, any text, no defaults, EN'), + L14_LIST_O_SANSORDRENODOUBLON_CHECKTEXT_NODEFAUT=SIMP(statut='o',typ=grma,homo="SansOrdreNiDoublon", into=("item01","text01","item02","text02","item03","text03",), min=3, max='**',ang='With check boxes, Obligatory, checked text, EN'), + L15_LIST_O_SANSORDRENODOUBLON_CHECKTEXT_DEFAUT=SIMP(statut='o',typ=grma,homo="SansOrdreNiDoublon", into=("item01","text01","item02","text02","item03","text03",), defaut=('item01','item02','item03'), min=3, max='**', ang='With check boxes, Obligatory, checked text, with default values, EN'), +) + + + +Classement_Commandes_Ds_Arbre=('DEBUT','MESH_TYPES','ALL_LISTS','FIN') + +Ordre_Des_Commandes = ('DEBUT','MESH_TYPES','ALL_LISTS','FIN') diff --git a/OldCodes/Tests/Global_Condition_Cata.py b/OldCodes/Tests/Global_Condition_Cata.py new file mode 100755 index 00000000..02396340 --- /dev/null +++ b/OldCodes/Tests/Global_Condition_Cata.py @@ -0,0 +1,53 @@ +# coding: utf-8 +from Accas import * +#class myModel(ASSD): pass + +JdC = JDC_CATA(code='GLOB_COND', + execmodul=None, + regles=(AU_PLUS_UN('TYPES',), + AU_PLUS_UN('INITS',), + AU_PLUS_UN('DATAS',), + #A_CLASSER('TYPES','INITS','DATAS') + ) +); + +TYPES=PROC(nom='TYPES',op=None,UIinfo={"groupes":("Global_Workflow",)}, #sd_prod=myModel, + MODE=SIMP( + typ='TXM', + statut='o', + position='global_jdc', + into=("MANUAL","AUTOMATIC","MIXED"), + defaut="AUTOMATIC", + ), +); + +liste_condition=('INITS', 'DATAS') + +INITS=PROC(nom='INITS',op=None,UIinfo={"groupes":("INI_param",)}, + ini_manual=BLOC(condition="MODE == 'MANUAL'", + Informer=SIMP(statut='o',typ='TXM', defaut="INITS MANUAL"), + ), + ini_auto=BLOC(condition="MODE == 'AUTOMATIC'", + Informer=SIMP(statut='o', typ='TXM', defaut="INITS AUTOMATIC",), + ), + ini_mixed=BLOC(condition="MODE == 'MIXED'", + Informer=SIMP(statut='o',typ='TXM', defaut="INITS MIXED",), + ), +); +DATAS=PROC(nom='DATAS',op=None,UIinfo={"groupes":("DATAS",)}, + data_manual=BLOC(condition="MODE == 'MANUAL'", + Informer=SIMP(statut='o',typ='TXM', defaut="DATAS MANUAL", + ), + ), + data_auto=BLOC(condition="MODE == 'AUTOMATIC'", + Informer=SIMP(statut='o', typ='TXM', defaut="DATAS AUTOMATIC", + ), + ), + data_mixed=BLOC(condition="MODE == 'MIXED'", + Informer=SIMP(statut='o',typ='TXM', defaut="DATAS MIXED", + ), + ), +); + +Classement_Commandes_Ds_Arbre=('TYPES','INITS','DATAS') +Ordre_Des_Commandes = ('TYPES','INITS','DATAS') diff --git a/OldCodes/Tests/Many_Concepts_52983_Cata.py b/OldCodes/Tests/Many_Concepts_52983_Cata.py new file mode 100644 index 00000000..70f099ac --- /dev/null +++ b/OldCodes/Tests/Many_Concepts_52983_Cata.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +from Accas import * + +#class myMesh(ASSD): pass +class myModel(ASSD): pass + +JdC = JDC_CATA(code='PATTERNS', + execmodul=None, + regles=(UN_PARMI('DEBUT', 'POURSUITE'), + AU_MOINS_UN('FIN'), + A_CLASSER(('DEBUT', 'POURSUITE'), 'FIN'))) + +DEBUT=PROC(nom="DEBUT", op=68, repetable='n', UIinfo={"groupes":("Group1",)}, ang="Debut Eng help", + PAR_LOT=SIMP(ang="Debut Par Lot help En",statut='o',typ=bool, defaut=True), +) +AFFE_MODELE=OPER(nom="AFFE_MODELE",op=None,sd_prod=myModel, + UIinfo={"groupes":("Group1",)}, + ang="Model mesh definition EN", + MESH=SIMP(statut='o',typ='TXM',into=("mesh_01","mesh_02","mesh_03","mesh_04",) , defaut="mesh_01"), + #reentrant='n', + #regles=(AU_MOINS_UN('AFFE','AFFE_SOUS_STRUC'),UN_PARMI('MAILLAGE','GRILLE')), + + + block_mesh_01=BLOC(condition="MESH=='mesh_01'", + AFFE=FACT(statut='o', + ALL=SIMP(statut='o', typ=bool,ang='ALL 01 help EN', defaut=True), + PHENOMENA=SIMP(statut='o',typ='TXM',into=('phenomena_01','phenomena_02',), defaut='phenomena_01'), + #MODELISATION=SIMP(statut='o',typ='TXM', min=2,max='**', into=("mesh_01","mesh_02","mesh_03","mesh_04",) ,ang='Input 01 list EN', fr='Input 01 list FR'), + MODELISATION=SIMP(statut='o',typ='TXM', min=2,max='**', into=('Item_01_01','Item_01_02',) ,ang='Input 01 list EN', fr='Input 01 list FR'), + ), + ), +) +FIN=PROC(nom="FIN",op=9999,repetable='n',ang="Finish help EN",UIinfo={"groupes":("Group1",)}, + FORMAT_HDF =SIMP(ang="Save HDF EN",statut='f',typ='TXM',defaut="NON",into=("OUI","NON",) ), +) + +Classement_Commandes_Ds_Arbre=('DEBUT','MESH','AFFE_MODELE','FIN') +Ordre_Des_Commandes = ('DEBUT','MESH','AFFE_MODELE','FIN') diff --git a/OldCodes/Tests/Many_Concepts_52988_Cata.py b/OldCodes/Tests/Many_Concepts_52988_Cata.py new file mode 100644 index 00000000..52d4f10f --- /dev/null +++ b/OldCodes/Tests/Many_Concepts_52988_Cata.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +from Accas import * + +class myMesh(ASSD): pass +class myModel(ASSD): pass + +JdC = JDC_CATA(code='PATTERNS', + execmodul=None, + regles=(AU_PLUS_UN('DEBUT', 'POURSUITE'), + AU_PLUS_UN('AFFE_MODELE'), + AU_PLUS_UN('FIN'), + A_CLASSER(('DEBUT', 'POURSUITE'), 'FIN'))) + +def mySeveral(suffix,num): + out=list() + for i in range(1,num+1): + out.append(suffix+str(i).zfill(2)) + return out + +switch_facultatif=True #change 'o' to 'f' of some widgets in the loop +empty_defauts=True + +def myBloc(num): + myNum=str(num).zfill(2) + list_item_body="Item_"+myNum+"_" + defauts0=["","",True,"'phenomena_"+myNum+"'",mySeveral(list_item_body,2)] #presence of default values + defauts_mask=[False,False,True,True,True] #switch off defaults of some types + defauts=list() + for id0 in range(len(defauts0)): + if defauts_mask[id0]: + item=", defaut="+str(defauts0[id0]) + else: + item="" + defauts.append(item) + #print defauts + + opt=['o','o','o','o','o'] #initial default obligation of items in FACT groups + #make some widgets optional: + myLen=len(opt) + if switch_facultatif: + make_f=(num)%myLen + opt[make_f]='f' + #print opt + if empty_defauts: + clean_defaut=num%myLen + + myString="BLOC(condition=\"MESH==\'mesh_"+myNum+"'\""+defauts[0]+", AFFE=FACT(statut='"+opt[1]+"'"+defauts[1]+", ALL=SIMP(statut='"+opt[2]+"', typ=bool,ang='ALL "+myNum+" help EN'"+defauts[2]+"),PHENOMENA=SIMP(statut='"+opt[3]+"',typ='TXM',into=mySeveral('phenomena_',"+str(num)+")"+defauts[3]+"), MODELISATION=SIMP(statut='"+opt[4]+"',typ='TXM', min=2,max='**',into=mySeveral('"+list_item_body+"',"+str(num*4)+")"+defauts[4]+", ang='Input "+myNum+" list EN', fr='Input "+myNum+" list FR'),),)" + print myString + return eval(myString) + +DEBUT=PROC(nom="DEBUT", op=10, repetable='n', UIinfo={"groupes":("Group1",)}, ang="Debut Eng help", + PAR_LOT=SIMP(ang="Debut Par Lot help En",statut='o',typ=bool, defaut=True), +); + +AFFE_MODELE=OPER(nom="AFFE_MODELE",op=18,sd_prod=myModel, + UIinfo={"groupes":("Group1",)}, + ang="Model mesh definition EN", + reentrant='n', + regles=(AU_MOINS_UN('APPROVED')), + MESH=SIMP(statut='o',typ='TXM',into=mySeveral("mesh_",4) ,defaut="mesh_01"), + APPROVED=SIMP(statut="o", typ=bool), + block_mesh_01=myBloc(1), + block_mesh_02=myBloc(2), + block_mesh_03=myBloc(3), + block_mesh_04=myBloc(4), +) + + +FIN=PROC(nom="FIN",op=9999,repetable='n',ang="Finish help EN",UIinfo={"groupes":("Group1",)}, + FORMAT_HDF =SIMP(ang="Save HDF EN",statut='f',typ='TXM',defaut="NON",into=("OUI","NON",) ), +); + +Classement_Commandes_Ds_Arbre=('DEBUT','MESH_TYPES','AFFE_MODELE','FIN') + +Ordre_Des_Commandes = ('DEBUT','MESH_TYPES','AFFE_MODELE','FIN') diff --git a/OldCodes/Tests/Many_Concepts_52989_Cata.py b/OldCodes/Tests/Many_Concepts_52989_Cata.py new file mode 100644 index 00000000..930d9e89 --- /dev/null +++ b/OldCodes/Tests/Many_Concepts_52989_Cata.py @@ -0,0 +1,77 @@ +# coding: utf-8 + +from Accas import * + +#class myMesh(ASSD): pass +class myModel(ASSD): pass + +JdC = JDC_CATA(code='PATTERNS', + execmodul=None, + regles=(AU_PLUS_UN('DEBUT', 'POURSUITE'), + AU_PLUS_UN('AFFE_MODELE'), + AU_PLUS_UN('FIN'), + A_CLASSER(('DEBUT', 'POURSUITE'), 'FIN'))) + +def mySeveral(suffix,num): + out=list() + for i in range(1,num+1): + out.append(suffix+str(i).zfill(2)) + return out + +switch_facultatif=True #change 'o' to 'f' of some widgets in the loop +#empty_defauts=True + +def myBloc(num): + myNum=str(num).zfill(2) + list_item_body="Item_"+myNum+"_" + defauts0=["","",True,"'phenomena_"+myNum+"'",mySeveral(list_item_body,2)] #presence of default values + defauts_mask=[False,False,True,True,True] #switch off defaults of some types + defauts=list() + for id0 in range(len(defauts0)): + if defauts_mask[id0]: + item=", defaut="+str(defauts0[id0]) + else: + item="" + defauts.append(item) + #print defauts + + opt=['o','o','o','o','o'] #initial default obligation of items in FACT groups + #make different widgets optional, one by one: + myLen=len(opt) + if switch_facultatif: + make_f=(num)%myLen + opt[make_f]='f' + #print opt + #if empty_defauts: + # clean_defaut=num%myLen + + myString="BLOC(condition=\"MESH==\'mesh_"+myNum+"'\""+defauts[0]+", AFFE=FACT(statut='"+opt[1]+"'"+defauts[1]+", ALL=SIMP(statut='"+opt[2]+"', typ=bool,ang='ALL "+myNum+" help EN'"+defauts[2]+"),PHENOMENA=SIMP(statut='"+opt[3]+"',typ='TXM',into=mySeveral('phenomena_',"+str(num)+")"+defauts[3]+"), MODELISATION=SIMP(statut='"+opt[4]+"',typ='TXM', min=2,max='**',into=mySeveral('"+list_item_body+"',"+str(num*4)+")"+defauts[4]+", ang='Input "+myNum+" list EN', fr='Input "+myNum+" list FR'),),)" + print myString + return eval(myString) + +DEBUT=PROC(nom="DEBUT", op=10, repetable='n', UIinfo={"groupes":("Group1",)}, ang="Debut Eng help", + PAR_LOT=SIMP(ang="Debut Par Lot help En",statut='o',typ=bool, defaut=True), +); + +AFFE_MODELE=OPER(nom="AFFE_MODELE",op=18,sd_prod=myModel, + UIinfo={"groupes":("Group1",)}, + ang="Model mesh definition EN", + reentrant='n', + regles=(AU_MOINS_UN('APPROVED')), + MESH=SIMP(statut='o',typ='TXM',into=mySeveral("mesh_",4) ,defaut="mesh_01"), + APPROVED=SIMP(statut="f", typ=bool), # presence of this item will validate the whole group + PAR_LOT=SIMP(ang="Debut Par Lot help En",statut='o',typ='I', defaut=True), + block_mesh_01=myBloc(1), + block_mesh_02=myBloc(2), + block_mesh_03=myBloc(3), + block_mesh_04=myBloc(4), +) + + +FIN=PROC(nom="FIN",op=9999,repetable='n',ang="Finish help EN",UIinfo={"groupes":("Group1",)}, + FORMAT_HDF =SIMP(ang="Save HDF EN",statut='f',typ='TXM',defaut="NON",into=("OUI","NON",) ), +); + +Classement_Commandes_Ds_Arbre=('DEBUT','MESH_TYPES','AFFE_MODELE','FIN') + +Ordre_Des_Commandes = ('DEBUT','MESH_TYPES','AFFE_MODELE','FIN') diff --git a/OldCodes/Tests/Many_Concepts_52992_Cata.py b/OldCodes/Tests/Many_Concepts_52992_Cata.py new file mode 100644 index 00000000..13145b96 --- /dev/null +++ b/OldCodes/Tests/Many_Concepts_52992_Cata.py @@ -0,0 +1,76 @@ +# coding: utf-8 + +from Accas import * + +#class myMesh(ASSD): pass +class myModel(ASSD): pass + +JdC = JDC_CATA(code='PATTERNS', + execmodul=None, + regles=(AU_PLUS_UN('DEBUT', 'POURSUITE'), + AU_PLUS_UN('AFFE_MODELE'), + AU_PLUS_UN('FIN'), + A_CLASSER(('DEBUT', 'POURSUITE'), 'FIN'))) + +def mySeveral(suffix,num): + out=list() + for i in range(1,num+1): + out.append(suffix+str(i).zfill(2)) + return out + +switch_facultatif=True #change 'o' to 'f' of some widgets in the loop +#empty_defauts=True + +def myBloc(num): + myNum=str(num).zfill(2) + list_item_body="Item_"+myNum+"_" + defauts0=["","",True,"'phenomena_"+myNum+"'",mySeveral(list_item_body,2)] #presence of default values + defauts_mask=[False,False,True,True,False] #switch off defaults of some types + defauts=list() + for id0 in range(len(defauts0)): + if defauts_mask[id0]: + item=", defaut="+str(defauts0[id0]) + else: + item="" + defauts.append(item) + #print defauts + + opt=['o','o','o','o','o'] #initial default obligation of items in FACT groups + #make different widgets optional, one by one: + myLen=len(opt) + if switch_facultatif: + make_f=(num)%myLen + opt[make_f]='f' + #print opt + #if empty_defauts: + # clean_defaut=num%myLen + + myString="BLOC(condition=\"MESH==\'mesh_"+myNum+"'\""+defauts[0]+", AFFE=FACT(statut='"+opt[1]+"'"+defauts[1]+", ALL=SIMP(statut='"+opt[2]+"', typ=bool,ang='ALL "+myNum+" help EN'"+defauts[2]+"),PHENOMENA=SIMP(statut='"+opt[3]+"',typ='TXM',into=mySeveral('phenomena_',"+str(num)+")"+defauts[3]+"), MODELISATION=SIMP(statut='"+opt[4]+"',typ='TXM', min=4,max='**',into=mySeveral('"+list_item_body+"',"+str(num*4)+")"+defauts[4]+", ang='Input "+myNum+" list EN', fr='Input "+myNum+" list FR'),),)" + print myString + return eval(myString) + +DEBUT=PROC(nom="DEBUT", op=10, repetable='n', UIinfo={"groupes":("Group1",)}, ang="Debut Eng help", + PAR_LOT=SIMP(ang="Debut Par Lot help En",statut='o',typ=bool, defaut=True), +); + +AFFE_MODELE=OPER(nom="AFFE_MODELE",op=18,sd_prod=myModel, + UIinfo={"groupes":("Group1",)}, + ang="Model mesh definition EN", + reentrant='n', + regles=(AU_MOINS_UN('APPROVED')), + MESH=SIMP(statut='o',typ='TXM',into=mySeveral("mesh_",4) ,defaut="mesh_01"), + APPROVED=SIMP(statut="f", typ=bool), # presence of this item will validate the whole group + block_mesh_01=myBloc(1), + block_mesh_02=myBloc(2), + block_mesh_03=myBloc(3), + block_mesh_04=myBloc(4), +) + + +FIN=PROC(nom="FIN",op=9999,repetable='n',ang="Finish help EN",UIinfo={"groupes":("Group1",)}, + FORMAT_HDF =SIMP(ang="Save HDF EN",statut='f',typ='TXM',defaut="NON",into=("OUI","NON",) ), +); + +Classement_Commandes_Ds_Arbre=('DEBUT','MESH_TYPES','AFFE_MODELE','FIN') + +Ordre_Des_Commandes = ('DEBUT','MESH_TYPES','AFFE_MODELE','FIN') diff --git a/OldCodes/Tests/Matrix_Cata.py b/OldCodes/Tests/Matrix_Cata.py new file mode 100644 index 00000000..268a77bf --- /dev/null +++ b/OldCodes/Tests/Matrix_Cata.py @@ -0,0 +1,87 @@ +# coding: utf-8 +from Accas import * + +class loi ( ASSD ) : pass +class variable ( ASSD ) : pass + +class Matrice: + def __init__(self,nbLigs=None,nbCols=None,methodeCalculTaille=None,formatSortie="ligne",valSup=None,valMin=None,structure=None): + self.nbLigs=nbLigs + self.nbCols=nbCols + self.methodeCalculTaille=methodeCalculTaille + self.formatSortie=formatSortie + self.valSup=valSup + self.valMin=valMin + self.structure=structure + + def __convert__(self,valeur): + # Attention ne verifie pas grand chose + if type(valeur) != types.ListType : + return None + return valeur + + def info(self): + return "Matrice %s x %s" % (self.nbLigs, self.nbCols) + + __repr__=info + __str__=info + + + +class myModel(ASSD): pass + +JdC = JDC_CATA(code='PATTERNS', + execmodul=None, + regles=(AU_MOINS_UN ( 'CORRELATION' ), + ) +) + +DETERMINISTICVARIABLE = OPER ( nom = "DETERMINISTICVARIABLE", + sd_prod = variable, + op = None, + fr = "Variable deterministe", + ang = "Deterministic variable", + + N = SIMP ( statut = 'o', typ = "TXM", fr = "Nom", ang = "Name", defaut = "Var1" ), + T = SIMP ( statut = 'o', defaut = "in", into = ( "in" , "out", ), typ = "TXM", fr = "Type", ang = "Type" ), + R = SIMP ( statut = 'o', defaut = 0, typ = "I", fr = "Rang", ang = "Rank" ), +) + +DISTRIBUTION = OPER ( nom = "DISTRIBUTION", + sd_prod = loi, + op = 68, + fr = "Definitions des lois marginales utilisees par les variables d'entree", + + R = SIMP ( statut = "o", typ = "R", max = 1, val_min = 0., fr = "Parametre R de la loi | R > 0", ang = "R parameter | R > 0", defaut = 0.5 ), + # T > R + T = SIMP ( statut = "o", typ = "R", max = 1, val_min = 0., fr = "Parametre T de la loi | T > R", ang = "T parameter | T > R", defaut = 0.7 ), + A = SIMP ( statut = "o", typ = "R", max = 1, fr = "Borne inferieure du support de la loi", ang = "Support lower bound", defaut = 0.1 ), + # B > A + B = SIMP ( statut = "o", typ = "R", max = 1, fr = "Borne superieure du support de la loi", ang = "Support upper bound", defaut = 0.3 ), +) + +VARIABLE = PROC ( nom = "VARIABLE", + op = None, + docu = "", + fr = "Variable probabiliste", + ang = "Probabilistic variable", + + ModelVariable = SIMP ( statut = "o", typ = ( variable, ), fr = "Variable d'entrée du modèle", ang = "Input variable of the model" ), + Distribution = SIMP ( statut = "o", typ = ( loi, ), fr = "Modélisation probabiliste", ang = "Probabilistic modelisation" ), +) + +CORRELATION = PROC ( nom = 'CORRELATION', + op = None, + docu = "", + fr = "Correlation entre variables", + ang = "Variable correlation", + + CorrelationMatrix = SIMP ( statut = "o", typ = Matrice(nbLigs=None, + nbCols=None, + methodeCalculTaille='NbDeVariables', + valSup=1, + valMin=-1, + structure="symetrique"), + fr = "Matrice de correlation entre les variables d'entree", + ang = "Correlation matrix for input variables" ), +) diff --git a/OldCodes/Tests/Nested_Cond_52945_Cata.py b/OldCodes/Tests/Nested_Cond_52945_Cata.py new file mode 100644 index 00000000..9d3b119d --- /dev/null +++ b/OldCodes/Tests/Nested_Cond_52945_Cata.py @@ -0,0 +1,61 @@ +# coding: utf-8 + +from Accas import * + +class loi(): pass + +JdC = JDC_CATA (code = 'PATTERNS', + execmodul = None, + ) +use_and=False #switch off second condition about MAX_ROWS while it does not work for blocks greater than 2 +def cond2(myMax=False): + if use_and: + if myMax: + out= " and MAX_ROWS>="+str(myMax) + else: + out="" + else: + out="" + print out + return out + +PROC_01 = PROC(nom = "PROC_01",op = None, ang="Help for PROC_01 EN", + MAX_ROWS=SIMP(statut='o',typ='I',val_min=1,val_max=8, defaut=8), + PROCGROUP1=SIMP(statut='o',typ='TXM',into=("1A","2A","add new row",)), + wideblock1=BLOC(condition='PROCGROUP1=="add new row"'+cond2(1), + PROCGROUP2=SIMP(statut='o',typ='TXM',into=("1A","add new row","3A",)), + wideblock2=BLOC(condition='PROCGROUP2=="add new row"'+cond2(2), + PROCGROUP3=SIMP(statut='o',typ='TXM',into=("1","2","add new row",)), + PROCGROUP689=SIMP(statut='o',typ='TXM',), + wideblock3=BLOC(condition='PROCGROUP3=="add new row"'+cond2(3), + PROCGROUP4=SIMP(statut='o',typ='TXM',into=("1","add new row","3",)), + wideblock4=BLOC(condition='PROCGROUP4=="add new row"'+cond2(4), + PROCGROUP5=SIMP(statut='o',typ='TXM',into=("add new row","2","3",)), + wideblock5=BLOC(condition='PROCGROUP5=="add new row"'+cond2(5), + PROCGROUP6=SIMP(statut='o',typ='TXM',into=("1","2","add new row",)), + wideblock6=BLOC(condition='PROCGROUP6=="add new row"'+cond2(6), + PROCGROUP7=SIMP(statut='o',typ='TXM',into=("1","add new row","3",)), + wideblock7=BLOC(condition='PROCGROUP7=="add new row"'+cond2(7), + PROCGROUP8=SIMP(statut='o',typ='TXM',into=("add new row","2","3",)), + wideblock8=BLOC(condition='PROCGROUP8=="add new row"'+cond2(8), + ) + ) + ) + ) + ) + ) + ) + ) +) + +#LEV1 = OPER( nom = "LEV1", +# sd_prod=loi, +# op=68, +# fr='LEV1 FR', +# Boolean01=SIMP( statut = 'o',typ = bool, defaut=True, fr = 'Bool mandatory FR', ang = 'Bool mandatory EN'), +# SelectedItem=SIMP(statut = 'o',typ = 'TXM', into=["01_01","01_02","01_03","01_04"], fr="FR"), +#) + +Classement_Commandes_Ds_Arbre=('PROC_01',) + +Ordre_Des_Commandes = ('PROC_01',) diff --git a/OldCodes/Tests/Nested_Cond_52946_Cata.py b/OldCodes/Tests/Nested_Cond_52946_Cata.py new file mode 100644 index 00000000..fef5edf0 --- /dev/null +++ b/OldCodes/Tests/Nested_Cond_52946_Cata.py @@ -0,0 +1,62 @@ +# coding: utf-8 + +from Accas import * + +class loi(): pass + +JdC = JDC_CATA (code = 'PATTERNS', + execmodul = None, + ) +use_and=True #switch off second condition about MAX_ROWS while it does not work for blocks greater than 2 +def cond2(myMax=False): + if use_and: + if myMax: + out= " and MAX_ROWS>="+str(myMax) + else: + out="" + else: + out="" + print out + return out + +PROC_01 = PROC(nom = "PROC_01",op = None, ang="Help for PROC_01 EN", + MAX_ROWS=SIMP(statut='o',typ='I',val_min=1,val_max=8, defaut=8), + PROCGROUP1=SIMP(statut='o',typ='TXM',into=("1","2","add new row",)), + wideblock1=BLOC(condition='PROCGROUP1=="add new row"'+cond2(1), + PROCGROUP2=SIMP(statut='o',typ='TXM',into=("1","add new row","3",)), + #wideblock2=BLOC(condition='PROCGROUP2=="add new row"', + wideblock2=BLOC(condition='MAX_ROWS == 8', + #wideblock2=BLOC(condition='PROCGROUP2=="add new row" and (MAX_ROWS > 2)', + PROCGROUP3=SIMP(statut='o',typ='TXM',into=("1","2","add new row",)), + wideblock3=BLOC(condition='PROCGROUP3=="add new row"'+cond2(3), + PROCGROUP4=SIMP(statut='o',typ='TXM',into=("1","add new row","3",)), + wideblock4=BLOC(condition='PROCGROUP4=="add new row"'+cond2(4), + PROCGROUP5=SIMP(statut='o',typ='TXM',into=("add new row","2","3",)), + wideblock5=BLOC(condition='PROCGROUP5=="add new row"'+cond2(5), + PROCGROUP6=SIMP(statut='o',typ='TXM',into=("1","2","add new row",)), + wideblock6=BLOC(condition='PROCGROUP6=="add new row"'+cond2(6), + PROCGROUP7=SIMP(statut='o',typ='TXM',into=("1","add new row","3",)), + wideblock7=BLOC(condition='PROCGROUP7=="add new row"'+cond2(7), + PROCGROUP8=SIMP(statut='o',typ='TXM',into=("add new row","2","3",)), + wideblock8=BLOC(condition='PROCGROUP8=="add new row"'+cond2(8), + ) + ) + ) + ) + ) + ) + ) + ) +) + +#LEV1 = OPER( nom = "LEV1", +# sd_prod=loi, +# op=68, +# fr='LEV1 FR', +# Boolean01=SIMP( statut = 'o',typ = bool, defaut=True, fr = 'Bool mandatory FR', ang = 'Bool mandatory EN'), +# SelectedItem=SIMP(statut = 'o',typ = 'TXM', into=["01_01","01_02","01_03","01_04"], fr="FR"), +#) + +Classement_Commandes_Ds_Arbre=('PROC_01',) + +Ordre_Des_Commandes = ('PROC_01',) diff --git a/OldCodes/Tests/Nested_Cond_52947_Cata.py b/OldCodes/Tests/Nested_Cond_52947_Cata.py new file mode 100644 index 00000000..bf3be39e --- /dev/null +++ b/OldCodes/Tests/Nested_Cond_52947_Cata.py @@ -0,0 +1,17 @@ +# coding: utf-8 + +from Accas import * + +class loi(): pass + +JdC = JDC_CATA (code = 'PATTERNS', + execmodul = None, + ) + +PROC_01 = PROC(nom = "PROC_01",op = None, ang="Help for PROC_01 EN", + PROCGROUP1=SIMP(statut='o',typ='TXM',into=("a1","a2","a3",)), +) + +Classement_Commandes_Ds_Arbre=('PROC_01',) + +Ordre_Des_Commandes = ('PROC_01',) diff --git a/OldCodes/Tests/Nested_Cond_52948_Cata.py b/OldCodes/Tests/Nested_Cond_52948_Cata.py new file mode 100644 index 00000000..81f216f8 --- /dev/null +++ b/OldCodes/Tests/Nested_Cond_52948_Cata.py @@ -0,0 +1,21 @@ +# coding: utf-8 + +from Accas import * + +class loi(ASSD): pass + +JdC = JDC_CATA (code = 'PATTERNS', + execmodul = None, + ) + +PER_01 = OPER( nom = "PER_01", + sd_prod=loi, + op=68, + fr='LEV1 FR', + Boolean01=SIMP( statut = 'o',typ = bool, defaut=True, fr = 'Bool mandatory FR', ang = 'Bool mandatory EN'), + SelectedItem=SIMP(statut = 'o',typ = 'TXM', into=["01_01","01_02","01_03","01_04"], fr="FR"), +) + +#Classement_Commandes_Ds_Arbre=('OPER_01',) + +#Ordre_Des_Commandes = ('OPER_01',) diff --git a/OldCodes/Tests/Nested_Cond_52949_Cata.py b/OldCodes/Tests/Nested_Cond_52949_Cata.py new file mode 100644 index 00000000..d09011a3 --- /dev/null +++ b/OldCodes/Tests/Nested_Cond_52949_Cata.py @@ -0,0 +1,19 @@ +# coding: utf-8 + +from Accas import * + +JdC = JDC_CATA (code = 'PATTERNS', + execmodul = None, + ) + +PROC_01 = PROC(nom = "PROC_01",op = None, ang="Help for PROC_01 EN", + MAX_ROWS=SIMP(statut='o',typ='I',val_min=1,val_max=8, defaut=8), + PROCGROUP1=SIMP(statut='o',typ='TXM',into=("1","2","add new row",)), + wideblock1=BLOC(condition='PROCGROUP1 in "add new row"', + PROCGROUP2=SIMP(statut='o',typ='TXM',into=("1","add new row","3",)), + ) +) + +Classement_Commandes_Ds_Arbre=('PROC_01',) + +Ordre_Des_Commandes = ('PROC_01',) diff --git a/OldCodes/Tests/Nested_Cond_52952_Cata.py b/OldCodes/Tests/Nested_Cond_52952_Cata.py new file mode 100644 index 00000000..47a8d7c5 --- /dev/null +++ b/OldCodes/Tests/Nested_Cond_52952_Cata.py @@ -0,0 +1,60 @@ +# coding: utf-8 + +from Accas import * + +class loi(): pass + +JdC = JDC_CATA (code = 'PATTERNS', + execmodul = None, + ) +use_and=False #switch off second condition about MAX_ROWS while it does not work for blocks greater than 2 +def cond2(myMax=False): + if use_and: + if myMax: + out= " and MAX_ROWS>="+str(myMax) + else: + out="" + else: + out="" + #print out + return out + +PROC_01 = PROC(nom = "PROC_01",op = None, ang="Help for PROC_01 EN", + MAX_ROWS=SIMP(statut='o',typ='I',val_min=1,val_max=8, defaut=8), + PROCGROUP1=SIMP(statut='o',typ='TXM',into=("1","2","add new row",)), + wideblock1=BLOC(condition='PROCGROUP1=="add new row"'+cond2(1), + PROCGROUP2=SIMP(statut='o',typ='TXM',into=("1","add new row","3",)), + wideblock2=BLOC(condition='PROCGROUP2=="add new row"'+cond2(2), + PROCGROUP3=SIMP(statut='o',typ='TXM',into=("1","2","add new row",)), + wideblock3=BLOC(condition='PROCGROUP3=="add new row"'+cond2(3), + PROCGROUP4=SIMP(statut='o',typ='TXM',into=("1","add new row","3",)), + wideblock4=BLOC(condition='PROCGROUP4=="add new row"'+cond2(4), + PROCGROUP5=SIMP(statut='o',typ='TXM',into=("add new row","2","3",)), + wideblock5=BLOC(condition='PROCGROUP5=="add new row"'+cond2(5), + PROCGROUP6=SIMP(statut='o',typ='TXM',into=("1","2","add new row",)), + wideblock6=BLOC(condition='PROCGROUP6=="add new row"'+cond2(6), + PROCGROUP7=SIMP(statut='o',typ='TXM',into=("1","add new row","3",)), + wideblock7=BLOC(condition='PROCGROUP7=="add new row"'+cond2(7), + PROCGROUP8=SIMP(statut='o',typ='TXM',into=("add new row","2","3",)), + wideblock8=BLOC(condition='PROCGROUP8=="add new row"'+cond2(8), + ) + ) + ) + ) + ) + ) + ) + ) +) + +#LEV1 = OPER( nom = "LEV1", +# sd_prod=loi, +# op=68, +# fr='LEV1 FR', +# Boolean01=SIMP( statut = 'o',typ = bool, defaut=True, fr = 'Bool mandatory FR', ang = 'Bool mandatory EN'), +# SelectedItem=SIMP(statut = 'o',typ = 'TXM', into=["01_01","01_02","01_03","01_04"], fr="FR"), +#) + +Classement_Commandes_Ds_Arbre=('PROC_01',) + +Ordre_Des_Commandes = ('PROC_01',) diff --git a/OldCodes/Tests/Separate_Blocks_52958_Cata.py b/OldCodes/Tests/Separate_Blocks_52958_Cata.py new file mode 100644 index 00000000..1327a3fb --- /dev/null +++ b/OldCodes/Tests/Separate_Blocks_52958_Cata.py @@ -0,0 +1,29 @@ +# coding: utf-8 + +from Accas import * + +JdC = JDC_CATA (code = 'PATTERNS', + execmodul = None, + ) +def several(suffix,num): + out=list() + for i in range(1,num+1): + out.append(suffix+str(i).zfill(2)) + return out + +NUMERICAL_PARAMETERS=PROC(nom = "NUMERICAL_PARAMETERS", op=None, ang="Help for NUMERICAL_PARAMETERS, English version", + #Equations=SIMP(statut = 'o',typ = 'TXM',into=("EF","VF","BS"),defaut="EF"), + Solver_definition=FACT(statut = 'o', + Solver = SIMP(statut = 'o',typ = 'TXM', into=several("Solver_",12), defaut="Solver_06"), + ) +) +PASCALE=PROC(nom = "PASCALE", op=None, ang="Help for NUMERICAL_PARAMETERS, English version", + Equations=SIMP(statut = 'o',typ = 'TXM',into=("EF","VF","BS"),defaut="EF"), + Solver_definition=FACT(statut = 'o', + Solver = SIMP(statut = 'o',typ = 'TXM', into=several("Solver_",12), defaut="Solver_06"), + ) +) + +Classement_Commandes_Ds_Arbre=('NUMERICAL_PARAMETERS',) + +Ordre_Des_Commandes = ('NUMERICAL_PARAMETERS',) diff --git a/OldCodes/Tests/Separate_Blocks_52963_Cata.py b/OldCodes/Tests/Separate_Blocks_52963_Cata.py new file mode 100644 index 00000000..c115196f --- /dev/null +++ b/OldCodes/Tests/Separate_Blocks_52963_Cata.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +from Accas import * + +JdC = JDC_CATA (code = 'PATTERNS', + execmodul = None, + ) +def mySeveral(suffix,num): + out=list() + for i in range(1,num+1): + out.append(suffix+str(i).zfill(2)) + return out + +def myFact(num): + myNum=str(num).zfill(2) + list_item_body="Item_"+myNum+"_" + myString="FACT(statut = 'f', List_"+myNum+" = SIMP(statut = 'o',typ = 'TXM', into=mySeveral('"+list_item_body+"',12), defaut='"+list_item_body+myNum+"'),Real_"+myNum+" = SIMP(statut = 'o',typ = 'R', defaut = "+str(num/100.)+", ang='Real "+myNum+" help EN'),Integer_"+myNum+" = SIMP(statut = 'o',typ = 'I', defaut = "+str(100+num)+",ang='Max_Iter "+myNum+" help EN'))" + print myString + return eval(myString) + + +PROC_01=PROC(nom = "PROC_01", op=None, ang="Help for PROC_01, English version",fr="Help for PROC_01, French version", docu="", + Radio_01=SIMP(statut = 'f',typ = 'TXM',into=("EF","VF","BS"),defaut="EF"), + FACT_01=myFact(1), + FACT_02=myFact(2), + FACT_03=myFact(3), + FACT_04=myFact(4), + FACT_05=myFact(5), + FACT_06=myFact(6), + FACT_07=myFact(7), + FACT_08=myFact(8), + FACT_09=myFact(9), + FACT_10=myFact(10), + FACT_11=myFact(11), + FACT_12=myFact(12), +) + +Classement_Commandes_Ds_Arbre=('PROC_01',) + +Ordre_Des_Commandes = ('PROC_01',) diff --git a/OldCodes/Tests/Separate_Blocks_52966_Cata.py b/OldCodes/Tests/Separate_Blocks_52966_Cata.py new file mode 100644 index 00000000..baef1eb1 --- /dev/null +++ b/OldCodes/Tests/Separate_Blocks_52966_Cata.py @@ -0,0 +1,48 @@ +# coding: utf-8 + +from Accas import * + +JdC = JDC_CATA (code = 'PATTERNS', + execmodul = None, + ) +def mySeveral(suffix,num): + out=list() + for i in range(1,num+1): + out.append(suffix+str(i).zfill(2)) + return out + +switch_facultatif=False #change 'o' to 'f' of some widgets in the loop + +def myFact(num): + opt=['o','f','o','o'] + if switch_facultatif: + myLen=len(opt) + make_f=(num-1)%myLen + opt[make_f]='f' + #print opt + myNum=str(num).zfill(2) + list_item_body="Item_"+myNum+"_" + myString="FACT(statut = '"+opt[0]+"', List_"+myNum+" = SIMP(statut = '"+opt[1]+"',typ = 'TXM', into=mySeveral('"+list_item_body+"',12), defaut='"+list_item_body+myNum+"'),Real_"+myNum+" = SIMP(statut = '"+opt[2]+"',typ = 'R', defaut = "+str(num/100.)+", ang='Real "+myNum+" help EN'),Integer_"+myNum+" = SIMP(statut = '"+opt[3]+"',typ = 'I', defaut = "+str(100+num)+",ang='Max_Iter "+myNum+" help EN'))" + print myString + return eval(myString) + + +PROC_01=PROC(nom = "PROC_01", op=None, ang="Help for PROC_01, English version",fr="Help for PROC_01, French version", docu="", + Radio_01=SIMP(statut = 'o',typ = 'TXM',into=("EF","VF","BS"),defaut="EF"), + FACT_01=myFact(1), + FACT_02=myFact(2), + FACT_03=myFact(3), + FACT_04=myFact(4), + FACT_05=myFact(5), + FACT_06=myFact(6), + FACT_07=myFact(7), + FACT_08=myFact(8), + FACT_09=myFact(9), + FACT_10=myFact(10), + FACT_11=myFact(11), + FACT_12=myFact(12), +) + +Classement_Commandes_Ds_Arbre=('PROC_01',) + +Ordre_Des_Commandes = ('PROC_01',) diff --git a/OldCodes/Tests/Separate_Blocks_52972_Cata.py b/OldCodes/Tests/Separate_Blocks_52972_Cata.py new file mode 100644 index 00000000..88927e49 --- /dev/null +++ b/OldCodes/Tests/Separate_Blocks_52972_Cata.py @@ -0,0 +1,66 @@ +# coding: utf-8 + +from Accas import * + +JdC = JDC_CATA (code = 'PATTERNS', + execmodul = None, + ) +def mySeveral(suffix,num): + out=list() + for i in range(1,num+1): + out.append(suffix+str(i).zfill(2)) + return out + +switch_facultatif=True #change 'o' to 'f' of some widgets in the loop +empty_defauts=True + +def myFact(num): + myNum=str(num).zfill(2) + list_item_body="Item_"+myNum+"_" + + defauts0=["","'"+list_item_body+myNum+"'", str(num/100.), str(100+num), "'Text_"+myNum+"'" ] #presence of default values + defauts_mask=[False,True,True,False,True] #switch off defaults of some types + defauts=list() + for id0 in range(len(defauts0)): + if defauts_mask[id0]: + item=", defaut="+defauts0[id0] + else: + item="" + defauts.append(item) + print defauts + + opt=['o','o','o','o','o'] #initial default obligation of items in FACT groups + #make some widgets optional: + myLen=len(opt) + if switch_facultatif: + make_f=(num)%myLen + opt[make_f]='f' + #print opt + if empty_defauts: + clean_defaut=num%myLen + + + myString="FACT(statut = '"+opt[0]+"', List_"+myNum+" = SIMP(statut = '"+opt[1]+"',typ = 'TXM', into=mySeveral('"+list_item_body+"',12)"+defauts[1]+"),Real_"+myNum+" = SIMP(statut = '"+opt[2]+"',typ = 'R'"+defauts[2]+", ang='Real "+myNum+" help EN'),Integer_"+myNum+" = SIMP(statut = '"+opt[3]+"',typ = 'I'"+defauts[3]+",ang='Integer "+myNum+" help EN'),Text_"+myNum+" = SIMP(statut = '"+opt[4]+"',typ = 'TXM'"+defauts[4]+",ang='Text "+myNum+" help EN'))" + print myString + return eval(myString) + + +PROC_01=PROC(nom = "PROC_01", op=None, ang="Help for PROC_01, English version",fr="Help for PROC_01, French version", docu="", + Radio_01=SIMP(statut = 'o',typ = 'TXM',into=("EF","VF","BS"),defaut="EF"), + FACT_01=myFact(1), + FACT_02=myFact(2), + FACT_03=myFact(3), + FACT_04=myFact(4), + FACT_05=myFact(5), + #FACT_06=myFact(6), + #FACT_07=myFact(7), + #FACT_08=myFact(8), + #FACT_09=myFact(9), + #FACT_10=myFact(10), + #FACT_11=myFact(11), + #FACT_12=myFact(12), +) + +Classement_Commandes_Ds_Arbre=('PROC_01',) + +Ordre_Des_Commandes = ('PROC_01',) diff --git a/OldCodes/Tests/Separate_Blocks_52975_Cata.py b/OldCodes/Tests/Separate_Blocks_52975_Cata.py new file mode 100644 index 00000000..88927e49 --- /dev/null +++ b/OldCodes/Tests/Separate_Blocks_52975_Cata.py @@ -0,0 +1,66 @@ +# coding: utf-8 + +from Accas import * + +JdC = JDC_CATA (code = 'PATTERNS', + execmodul = None, + ) +def mySeveral(suffix,num): + out=list() + for i in range(1,num+1): + out.append(suffix+str(i).zfill(2)) + return out + +switch_facultatif=True #change 'o' to 'f' of some widgets in the loop +empty_defauts=True + +def myFact(num): + myNum=str(num).zfill(2) + list_item_body="Item_"+myNum+"_" + + defauts0=["","'"+list_item_body+myNum+"'", str(num/100.), str(100+num), "'Text_"+myNum+"'" ] #presence of default values + defauts_mask=[False,True,True,False,True] #switch off defaults of some types + defauts=list() + for id0 in range(len(defauts0)): + if defauts_mask[id0]: + item=", defaut="+defauts0[id0] + else: + item="" + defauts.append(item) + print defauts + + opt=['o','o','o','o','o'] #initial default obligation of items in FACT groups + #make some widgets optional: + myLen=len(opt) + if switch_facultatif: + make_f=(num)%myLen + opt[make_f]='f' + #print opt + if empty_defauts: + clean_defaut=num%myLen + + + myString="FACT(statut = '"+opt[0]+"', List_"+myNum+" = SIMP(statut = '"+opt[1]+"',typ = 'TXM', into=mySeveral('"+list_item_body+"',12)"+defauts[1]+"),Real_"+myNum+" = SIMP(statut = '"+opt[2]+"',typ = 'R'"+defauts[2]+", ang='Real "+myNum+" help EN'),Integer_"+myNum+" = SIMP(statut = '"+opt[3]+"',typ = 'I'"+defauts[3]+",ang='Integer "+myNum+" help EN'),Text_"+myNum+" = SIMP(statut = '"+opt[4]+"',typ = 'TXM'"+defauts[4]+",ang='Text "+myNum+" help EN'))" + print myString + return eval(myString) + + +PROC_01=PROC(nom = "PROC_01", op=None, ang="Help for PROC_01, English version",fr="Help for PROC_01, French version", docu="", + Radio_01=SIMP(statut = 'o',typ = 'TXM',into=("EF","VF","BS"),defaut="EF"), + FACT_01=myFact(1), + FACT_02=myFact(2), + FACT_03=myFact(3), + FACT_04=myFact(4), + FACT_05=myFact(5), + #FACT_06=myFact(6), + #FACT_07=myFact(7), + #FACT_08=myFact(8), + #FACT_09=myFact(9), + #FACT_10=myFact(10), + #FACT_11=myFact(11), + #FACT_12=myFact(12), +) + +Classement_Commandes_Ds_Arbre=('PROC_01',) + +Ordre_Des_Commandes = ('PROC_01',) diff --git a/OldCodes/Tests/a b/OldCodes/Tests/a new file mode 100644 index 00000000..0018d1d5 --- /dev/null +++ b/OldCodes/Tests/a @@ -0,0 +1,110 @@ +ESSAI_FACT=OPER(nom="ESSAI_FACT", + sd_prod=ObjetUtilisateur, + op=None, + fr=tr("Affectation de caractéristiques à des éléments de structure"), + regles = (AU_MOINS_UN('Poutre','Barre'), + EXCLUS('Discret','Discret_2D'),), + Info = SIMP(statut='f',typ='I', defaut= 1 ,into=(1,2) ), + Verif = SIMP(statut='f',typ='TXM',validators=NoRepeat(),max='**',into=("Maille","Noeud") ), +# +# ============================================================================== + Poutre = FACT(statut= 'f',max= '**', + Section = SIMP(statut= 'o',typ= 'TXM' ,into= ("GENERALE","RECTANGLE","CERCLE") ), + + b_generale = BLOC(condition = " Section == 'GENERALE'", + regles = (UN_PARMI('Maille','GroupeMailles'),), + Maille = SIMP(statut= 'f',typ= ma ,validators= NoRepeat(),max= '**'), + GroupeMailles = SIMP(statut= 'f',typ= grma,validators= NoRepeat(),max= '**'), + + Vari = SIMP(statut= 'f',typ= 'TXM',into= ("CONSTANT","HOMOTHETIQUE"),defaut= "CONSTANT"), + + b_constant = BLOC(condition = "Vari == 'CONSTANT'", + regles = (PRESENT_ABSENT('Table','Cara'), + PRESENT_PRESENT('Table','Nom'), + PRESENT_PRESENT('Cara','Valeur'),), + Table = SIMP(statut= 'f',typ='TXM'), + Nom = SIMP(statut= 'f',typ= 'TXM'), + Cara = SIMP(statut= 'o',typ= 'TXM',min= 4 ,max= 5, + fr= tr("A,IY,IZ,JX sont des paramètres obligatoires"), + validators= [NoRepeat(), Compulsory(['A','IY','IZ','JX'])], + into= ("A","IY","IZ","AY","AZ","EY","EZ","JX","RY","RZ","RT","JG","IYR2","IZR2","AI") ), + Valeur = SIMP(statut= 'f',typ= 'R',min= 4 ,max= 15), + ), + ), + b_rectangle = BLOC(condition = "Section == 'RECTANGLE'", + regles = (UN_PARMI('Maille','GroupeMailles'),), + Maille = SIMP(statut= 'f',typ= ma ,validators= NoRepeat(),max= '**'), + GroupeMailles = SIMP(statut= 'f',typ= grma,validators= NoRepeat(),max= '**'), + Vari = SIMP(statut= 'f',typ= 'TXM',into= ("CONSTANT","HOMOTHETIQUE","AFFINE"),defaut= "CONSTANT"), + b_constant = BLOC(condition = "Vari == 'CONSTANT'", + Cara = SIMP(statut= 'o',typ= 'TXM',min= 1 ,max= 4, + validators = [NoRepeat(), + OrVal( [AndVal( [Compulsory(['H']),Absent(['HY','HZ','EPY','EPZ'])] ), + AndVal( [Compulsory(['HY','HZ']),Together(['EPY','EPZ']),Absent(['H','EP'])] )] )], + into= ("H","EP", "HY","HZ","EPY","EPZ"),), + Valeur = SIMP(statut= 'o',typ= 'R',min= 1 ,max= 4), + ), + + Metrique = SIMP(statut= 'f',typ= 'TXM',defaut= "NON",into= ("OUI","NON") ), + Fcx = SIMP(statut= 'f',typ= 'R'), + Tuyau = SIMP(statut= 'f',typ= 'I',val_max= 10,defaut= 3), + ), + ), +# +# ============================================================================== + Barre = FACT(statut='f',max='**', + regles = (UN_PARMI('Maille','GroupeMailles'),), + Maille = SIMP(statut='f',typ=ma ,validators=NoRepeat(),max='**'), + GroupeMailles = SIMP(statut='f',typ=grma,validators=NoRepeat(),max='**'), + Section = SIMP(statut='o',typ='TXM',into=("GENERALE","RECTANGLE","CERCLE") ), + b_generale = BLOC(condition = "Section=='GENERALE'", + regles = (PRESENT_ABSENT('Table','Cara'), + PRESENT_PRESENT('Table','Nom'), + PRESENT_PRESENT('Cara','Valeur')), + Table = SIMP(statut='f',typ=table_sdaster), + Nom = SIMP(statut='f',typ='TXM',validators=LongStr(1,24) ), + Cara = SIMP(statut='f',typ='TXM',into=("A",) ), + Valeur = SIMP(statut='f',typ='R',min=1,max=1 ), + ), + b_rectangle = BLOC(condition = "Section=='RECTANGLE'", + Cara = SIMP(statut='o',typ='TXM', min=1, max=4, + validators = [NoRepeat(), + OrVal( [AndVal( [Compulsory(['H']),Absent(['HY','HZ','EPY','EPZ'])] ), + AndVal( [Compulsory(['HY','HZ']),Together(['EPY','EPZ']),Absent(['H','EP'])] )] )], + into=("H","EP","HZ","HY","EPY","EPZ"), ), + Valeur = SIMP(statut='o',typ='R',min=1,max=4 ), ), + b_cercle = BLOC(condition = "Section=='CERCLE'", + Cara = SIMP(statut='o',typ='TXM',validators=[NoRepeat(),Compulsory(['R'])],min=1,max=2,into=("R","EP") ), + Valeur = SIMP(statut='o',typ='R',min=1,max=2 ), ), + ), +# +# ============================================================================== + Discret = FACT(statut='f',max='**', + REPERE = SIMP(statut='f',typ='TXM',into=("LOCAL","GLOBAL") ), + AMOR_HYST = SIMP(statut='f',typ='R' ), + SYME = SIMP(statut='f',typ='TXM',defaut="OUI",into=("OUI","NON"),), + b_SYME_OUI = BLOC(condition="SYME=='OUI'", + fr=tr("SYMETRIQUE: Affectation de matrices de rigidité, de masse ou d'amortissement à des mailles ou noeuds"), + Cara = SIMP(statut='o',typ='TXM',validators=NoRepeat(),max=1,defaut="None", + 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", + "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", + "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",),), + # Affection des caractéristiques de RIGIDITE/AMORTISSEMENT/MASSE + b_AK_T_D_N = BLOC(condition = "((Cara=='K_T_D_N')or(Cara=='A_T_D_N'))", + fr = tr("Noeud: 3 valeurs (triangulaire supérieure par colonne)"), + regles = (UN_PARMI('Maille','GroupeMailles','Noeud','GROUP_NO'),), + Noeud = SIMP(statut='f',typ=no ,validators=NoRepeat(),max='**'), + GROUP_NO = SIMP(statut='f',typ=grno,validators=NoRepeat(),max='**'), + Maille = SIMP(statut='f',typ=ma ,validators=NoRepeat(),max='**'), + GroupeMailles = SIMP(statut='f',typ=grma,validators=NoRepeat(),homo='SansOrdreNiDoublon',max='**'), + Valeur = SIMP(statut='o',typ='R',min=3 ,max=3 ),), + ), + ), +# +# ============================================================================== + Discret_2D = FACT(statut='f',max='**', + REPERE = SIMP(statut='f',typ='TXM',into=("LOCAL","GLOBAL") ), + AMOR_HYST = SIMP(statut='f',typ='R' ), + SYME = SIMP(statut='f',typ='TXM',defaut="OUI",into=("OUI","NON"),), + ), +) diff --git a/OldCodes/Tests/cata_diapo.py b/OldCodes/Tests/cata_diapo.py new file mode 100644 index 00000000..0c5268ef --- /dev/null +++ b/OldCodes/Tests/cata_diapo.py @@ -0,0 +1,48 @@ +# coding: utf-8 + +from Accas import * +class Tuple: + def __init__(self,ntuple): + self.ntuple=ntuple + + def __convert__(self,valeur): + import types + if type(valeur) == types.StringType: + return None + if len(valeur) != self.ntuple: + return None + return valeur + + def info(self): + return "Tuple de %s elements" % self.ntuple + + __repr__=info + __str__=info + + + +class forme ( ASSD ) : pass + +JdC = JDC_CATA (code = 'MED', + execmodul = None, + ) + +FORME_GEOMETRIQUE=OPER(nom='FORME_GEOMETRIQUE',sd_prod =forme ,op=None, + Forme=SIMP(statut="o",typ='TXM',into=[ 'carre', 'cercle', 'triangle' ],defaut='carre'), + bloc_pour_Carre = BLOC (condition = "Forme=='carre'", + Cote=SIMP(statut="o",typ='I'), ) , # fin bloc_pour_carre + bloc_pour_cercle = BLOC (condition ="Forme=='cercle'", + rayon=SIMP(statut="o",typ='I'), ) , # fin bloc_pour_cercle + + DE_NOMBREUSES_WIDGETS= FACT(statut="o", + Stop_Criteria = SIMP(statut = 'o',typ = Tuple(3),validators = VerifTypeTuple(('R','R','R'))), + Fichier_Med = SIMP( statut = 'o', typ = ('Fichier', 'Med Files (*.med);;All Files (*)',),), + ListeDeChoixPlusGrande=SIMP(statut="o",typ='TXM',into=['a','b,','c','d','e','f','g','h'], + homo="SansOrdreNiDoublon",), + Un_Parametre_Facultatif=SIMP(statut="f",typ='TXM') + + ), + Couleur=SIMP(statut = 'f',typ='TXM'), + Matiere=SIMP(statut = 'f',typ='TXM'), +); + diff --git a/OldCodes/Tests/cata_med.py b/OldCodes/Tests/cata_med.py new file mode 100644 index 00000000..4640f81e --- /dev/null +++ b/OldCodes/Tests/cata_med.py @@ -0,0 +1,29 @@ +# coding: utf-8 + +from Accas import * + +JdC = JDC_CATA (code = 'MED', + execmodul = None, + ) +FAS=PROC(nom='FAS',op=None, + FAMILY_MESH_NAME_REF = FACT(statut='o', max='**', + + NAME=SIMP(statut="o",typ='TXM'), + ELEM=FACT(statut="f", max="**", + NUM=SIMP(statut="o",typ='TXM',), + NAME=SIMP(statut="o",typ='TXM',), + ATT=FACT(statut="f", + NBR=SIMP(statut="o", max=1 , typ = 'I'), + DES=SIMP(statut="o", max="**", typ = 'TXM'), + IDE=SIMP(statut="o", max="**", typ = 'I'), + VAL=SIMP(statut="o", max="**", typ = 'I'), + ), + GRO=FACT(statut="f", + NBR=SIMP(statut="o", max=1 , typ = 'I'), + NOM=SIMP(statut="o", max="**", typ='TXM'), + ), + ), + ), +); + + diff --git a/OldCodes/Tests/configuration_MED.py b/OldCodes/Tests/configuration_MED.py new file mode 100644 index 00000000..4ab64b85 --- /dev/null +++ b/OldCodes/Tests/configuration_MED.py @@ -0,0 +1,43 @@ +# -*- 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 pour charger les paramètres de configuration d'EFICAS +""" +# Modules Python +from InterfaceQT4 import configuration +import os + + +class CONFIG(configuration.CONFIG_BASE): + + #----------------------------------- + def __init__(self,appli,repIni): + #----------------------------------- + + self.labels_user=['catalogues','lang'] + self.labels_eficas=['lang','rep_cata','catalogues'] + + configuration.CONFIG_BASE.__init__(self,appli,'.Eficas_monCode') + + +def make_config(appli,rep): + return CONFIG(appli,rep) + diff --git a/OldCodes/Tests/images/essaiAster.png b/OldCodes/Tests/images/essaiAster.png new file mode 100644 index 00000000..d01c5de8 Binary files /dev/null and b/OldCodes/Tests/images/essaiAster.png differ diff --git a/OldCodes/Tests/items_integer_space.txt b/OldCodes/Tests/items_integer_space.txt new file mode 100644 index 00000000..8e17136e --- /dev/null +++ b/OldCodes/Tests/items_integer_space.txt @@ -0,0 +1,2 @@ +"4" "3" "2" "1" +"4" "5" "6" "7" \ No newline at end of file diff --git a/OldCodes/Tests/monCode_qtEficas.py b/OldCodes/Tests/monCode_qtEficas.py new file mode 100755 index 00000000..7f9a6e2c --- /dev/null +++ b/OldCodes/Tests/monCode_qtEficas.py @@ -0,0 +1,33 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +# Copyright (C) 2007-2021 EDF R&D +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# +""" + Ce module sert a lancer EFICAS configure pour Code_Aster +""" +# Modules Python +# Modules Eficas + +import sys,os +sys.path.append(os.path.join(os.path.abspath(os.path.dirname(__file__)),'..')) + +from PyQt4.QtCore import * +import prefs +from InterfaceQT4 import eficas_go +eficas_go.lance_eficas(code=prefs.code) diff --git a/OldCodes/Tests/prefs.py b/OldCodes/Tests/prefs.py new file mode 100644 index 00000000..768415d5 --- /dev/null +++ b/OldCodes/Tests/prefs.py @@ -0,0 +1,22 @@ +# Copyright (C) 2007-2021 EDF R&D +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# +code="MED" +import sys, os +if os.path.dirname(os.path.abspath(__file__)) not in sys.path : + sys.path.insert(0,os.path.dirname(os.path.abspath(__file__))) diff --git a/OldCodes/Tests/prefs_MED.py b/OldCodes/Tests/prefs_MED.py new file mode 100644 index 00000000..220dc3f0 --- /dev/null +++ b/OldCodes/Tests/prefs_MED.py @@ -0,0 +1,48 @@ +# -*- 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. +# +# +# ====================================================================== + +import os,sys +# repIni sert a localiser le fichier editeur.ini +# Obligatoire +repIni=os.path.dirname(os.path.abspath(__file__)) +INSTALLDIR=os.path.join(repIni,'..') +sys.path[:0]=[INSTALLDIR] + + +# lang indique la langue utilisee pour les chaines d'aide : fr ou ang +lang='en' + +# Codage des strings qui accepte les accents (en remplacement de 'ascii') +encoding='iso-8859-1' +docPath=repIni + +# +catalogues=( + #('med','med',os.path.join(repIni,'cata_med.py'),'dico','python'), + ('med','med',os.path.join(repIni,'CataAZ.py'),'python','python'), +) + +simpleClic=True +nombreDeBoutonParLigne = 4 +dicoImages={ +'CREEOBJET' : os.path.join(repIni,'images/essaiAster.png') +} + diff --git a/OldCodes/Tests/prefs_monCode.py b/OldCodes/Tests/prefs_monCode.py new file mode 100644 index 00000000..b9e513fc --- /dev/null +++ b/OldCodes/Tests/prefs_monCode.py @@ -0,0 +1,68 @@ +# -*- 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. +# +# +# ====================================================================== + +import os,sys +# repIni sert a localiser le fichier editeur.ini +# Obligatoire +repIni=os.path.dirname(os.path.abspath(__file__)) +INSTALLDIR=os.path.join(repIni,'..') +sys.path[:0]=[INSTALLDIR] + + +# lang indique la langue utilisee pour les chaines d'aide : fr ou ang +lang='en' + +# Codage des strings qui accepte les accents (en remplacement de 'ascii') +encoding='iso-8859-1' +docPath=repIni + +# +catalogues=( + ('monCode','med',os.path.join(repIni,'CataAZ.py'),'python','python'), +# ('monCode','53036',os.path.join(repIni,'Elementary_Lists_53036_Cata.py'),'dico','python'), +# ('monCode','53033',os.path.join(repIni,'Tuples_Cata.py'),'dico','python'), +# ('monCode','53031',os.path.join(repIni,'Tuples_Cata.py'),'dico','python'), +# ('monCode','53030',os.path.join(repIni,'Tuples_Cata.py'),'dico','python'), +# ('monCode','53020',os.path.join(repIni,'Nested_Cond_52945_Cata.py'),'dico','python'), +# ('monCode','53013',os.path.join(repIni,'Elementary_Lists_53013_Cata.py'),'dico','python'), +# ('monCode','53000',os.path.join(repIni,'Elementary_Lists_53030_Cata.py'),'dico','python'), +# ('monCode','52996',os.path.join(repIni,'Elementary_Lists_52996_Cata.py'),'dico','python'), +# ('monCode','52992',os.path.join(repIni,'Many_Concepts_52992_Cata.py'),'dico','python'), +# ('monCode','52989',os.path.join(repIni,'Many_Concepts_52989_Cata.py'),'dico','python'), +# ('monCode','52988',os.path.join(repIni,'Many_Concepts_52988_Cata.py'),'dico','python'), +# ('monCode','52985',os.path.join(repIni,'fin_52985_Cata.py'),'dico','python'), +# ('monCode','52983',os.path.join(repIni,'Many_Concepts_52983_Cata.py'),'dico','python'), +# ('monCode','52975',os.path.join(repIni,'Separate_Blocks_52975_Cata.py'),'dico','python'), +# ('monCode','52972',os.path.join(repIni,'Separate_Blocks_52972_Cata.py'),'dico','python'), +# ('monCode','52958',os.path.join(repIni,'Separate_Blocks_52958_Cata.py'),'dico','python'), +# ('monCode','52952',os.path.join(repIni,'Nested_Cond_52952_Cata.py'),'dico','python'), +# ('monCode','52949',os.path.join(repIni,'Nested_Cond_52949_Cata.py'),'dico','python'), +# ('monCode','52947',os.path.join(repIni,'Nested_Cond_52947_Cata.py'),'dico','python'), +# ('monCode','52946',os.path.join(repIni,'Nested_Cond_52946_Cata.py'),'dico','python'), +# ('monCode','52945',os.path.join(repIni,'Nested_Cond_52945_Cata.py'),'dico','python'), +# ('monCode','Global',os.path.join(repIni,'Global_Condition_Cata.py'),'dico','python'), +## resolu ('monCode','52948',os.path.join(repIni,'Nested_Cond_52948_Cata.py'),'dico','python'), +# pb d afffichage des optionnels ('monCode','52963',os.path.join(repIni,'Separate_Blocks_52963_Cata.py'),'dico','python'), +# pb d afffichage des optionnels ('monCode','52966',os.path.join(repIni,'Separate_Blocks_52966_Cata.py'),'dico','python'), + +# ('monCode','test',os.path.join(repIni,'monCode_Cata1.py'),'dico','python'), +) + diff --git a/OldCodes/Tests/properties.py b/OldCodes/Tests/properties.py new file mode 100644 index 00000000..1d328a46 --- /dev/null +++ b/OldCodes/Tests/properties.py @@ -0,0 +1,24 @@ +#@ MODIF properties Accas DATE 11/06/2008 AUTEUR aster M.ADMINISTRATEUR +# RESPONSABLE D6BHHHH J-P.LEFEBVRE +# ====================================================================== +# COPYRIGHT (C) 1991 - 2001 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# ====================================================================== +# IDENTIFICATION DU GESTIONNAIRE DE COMMANDE ACCAS A PARTIR +# DE LA VERSION DU CODE_ASTER ASSOCIE +#---------------------------------------------------------------------- +version = "1.2" +date = "25/05/2010" +exploit = False diff --git a/OldCodes/Tests/qtEficas_AZ.py b/OldCodes/Tests/qtEficas_AZ.py new file mode 100755 index 00000000..336afdff --- /dev/null +++ b/OldCodes/Tests/qtEficas_AZ.py @@ -0,0 +1,32 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +# Copyright (C) 2007-2021 EDF R&D +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# +""" + Ce module sert a lancer EFICAS configure pour Code_Aster +""" +# Modules Python +# Modules Eficas + +import sys,os +sys.path.append(os.path.join(os.path.abspath(os.path.dirname(__file__)),'..')) + +import prefs +from InterfaceQT4 import eficas_go +eficas_go.lance_eficas(code=prefs.code) diff --git a/OldCodes/Tests/qtEficas_Med.py b/OldCodes/Tests/qtEficas_Med.py new file mode 100755 index 00000000..336afdff --- /dev/null +++ b/OldCodes/Tests/qtEficas_Med.py @@ -0,0 +1,32 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +# Copyright (C) 2007-2021 EDF R&D +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# +""" + Ce module sert a lancer EFICAS configure pour Code_Aster +""" +# Modules Python +# Modules Eficas + +import sys,os +sys.path.append(os.path.join(os.path.abspath(os.path.dirname(__file__)),'..')) + +import prefs +from InterfaceQT4 import eficas_go +eficas_go.lance_eficas(code=prefs.code) diff --git a/OldCodes/Tests/typescript b/OldCodes/Tests/typescript new file mode 100644 index 00000000..f070be17 --- /dev/null +++ b/OldCodes/Tests/typescript @@ -0,0 +1,34 @@ +Le script a débuté sur mar. 29 nov. 2016 15:37:06 CET +]0;A96028@dsp0780471: ~/QT5GitEficasTravail/eficas/monCodeA96028@dsp0780471:~/QT5GitEficasTravail/eficas/monCode$ ./qtEficas_Med.py /tmp/a.commoo.comm +eficas_en /home/A96028/QT5GitEficasTravail/eficas/monCode/../Extensions/../UiQT4 +() +{'typ': 'TXM', 'statut': 'o'} +() +{'typ': 'TXM', 'statut': 'o'} +() +{'typ': 'TXM', 'statut': 'o'} +() +{'max': 1, 'typ': 'I', 'statut': 'o'} +() +{'max': '**', 'typ': 'TXM', 'statut': 'o'} +() +{'max': '**', 'typ': 'I', 'statut': 'o'} +() +{'max': '**', 'typ': 'I', 'statut': 'o'} +() +{'NBR': , 'IDE': , 'DES': , 'VAL': , 'statut': 'f'} +() +{'max': 1, 'typ': 'I', 'statut': 'o'} +() +{'max': '**', 'typ': 'TXM', 'statut': 'o'} +() +{'NOM': , 'NBR': , 'statut': 'f'} +() +{'NAME': , 'statut': 'f', 'max': '**', 'ATT': , 'NUM': , 'GRO': } +() +{'NAME': , 'ELEM': , 'statut': 'o'} +() +{'nom': 'FAS', 'FAMILY_MESH_NAME_REF': , 'op': None} +]0;A96028@dsp0780471: ~/QT5GitEficasTravail/eficas/monCodeA96028@dsp0780471:~/QT5GitEficasTravail/eficas/monCode$ exit + +Script terminé sur mar. 29 nov. 2016 15:37:13 CET