--- /dev/null
+# coding: utf-8\r
+import types\r
+from Accas import *\r
+\r
+class grno(GEOM):\r
+ """\r
+ Classe servant à définir le nom d'un groupe de noeuds dans le fichier de commande\r
+ En clair : un chaine de longueur 24.\r
+ """\r
+ def __convert__(cls,valeur):\r
+ """\r
+ Fonction de verification de la longueur de la chaine\r
+ """\r
+ if isinstance(valeur, (str,unicode)) and len(valeur.strip()) <= 24:\r
+ return valeur.strip()\r
+ raise ValueError(_(u'On attend une chaine de caractères (de longueur <= 24).'))\r
+ __convert__ = classmethod(__convert__)\r
+\r
+class grma(GEOM):\r
+ """\r
+ Classe servant à définir le nom d'un groupe de mailles dans le fichier de commande\r
+ En clair : un chaine de longueur 24.\r
+ """\r
+ def __convert__(cls,valeur):\r
+ """\r
+ Fonction de verification de la longueur de la chaine\r
+ """\r
+ if isinstance(valeur, (str,unicode)) and len(valeur.strip()) <= 24:\r
+ return valeur.strip()\r
+ raise ValueError(_(u'On attend une chaine de caractères (de longueur <= 24).'))\r
+ __convert__ = classmethod(__convert__)\r
+\r
+\r
+class Tuple:\r
+ def __init__(self,ntuple):\r
+ self.ntuple=ntuple\r
+\r
+ def __convert__(self,valeur):\r
+ if type(valeur) == types.StringType: return None\r
+ if len(valeur) != self.ntuple: return None\r
+ return valeur\r
+\r
+ def info(self):\r
+ return "Tuple de %s elements" % self.ntuple\r
+\r
+ __repr__=info\r
+ __str__=info\r
+\r
+class ObjetUtilisateur(ASSD): pass\r
+\r
+\r
+JdC = JDC_CATA(code='PATTERNS',\r
+ execmodul=None,\r
+ )\r
+\r
+\r
+EXAMPLE = PROC (nom = 'EXAMPLE',\r
+ op=None,\r
+\r
+ TITRE = SIMP(statut ='o', typ = 'TXM', defaut = 'Mon Etude',),\r
+ TITRE2 = SIMP(statut ='f', typ = 'TXM', ),\r
+)\r
+CREEOBJET = OPER (nom="CREEOBJET",\r
+ op=None,\r
+ sd_prod=ObjetUtilisateur,\r
+ UIinfo={"groupes":("Group1",)},\r
+\r
+ TITLE = SIMP(statut ='o', typ = 'TXM', defaut = '',),\r
+ RB1 = SIMP(statut ='o', typ = 'I', into = [1,2,3],),\r
+ RB2 = SIMP(statut ='o', typ = 'I', into = [1,2,3,4,5,6,],),\r
+ CB = SIMP(statut ='o', typ = 'I', into = [1,2,3,4,5,6,7,8,9],),\r
+ MBool = SIMP(statut ='o', typ = bool,),\r
+ MFile = SIMP(statut ='o', typ = ('Fichier','All Files (*)')),\r
+ MDir = SIMP(statut ='o', typ = 'Repertoire'),\r
+ Reel1 = SIMP(statut ='o', typ = 'R'),\r
+ Compl = SIMP(statut ='o', typ = 'C'),\r
+ Tuple2 = SIMP(statut ='o', typ = Tuple(2), validators=VerifTypeTuple(('R','R'))),\r
+ Tuple3 = SIMP(statut ='o', typ = Tuple(3), validators=VerifTypeTuple(('R','R','R'))),\r
+ InSalome = SIMP(statut ='o', typ = SalomeEntry),\r
+\r
+ LTITLE = SIMP(statut ='o', typ = 'TXM', max='**', defaut = '',),\r
+ LRB2 = SIMP(statut ='o', typ = 'I', max = '**', into = [1,2,3,4,5,6,],),\r
+ LCB = SIMP(statut ='o', typ = 'I', max = '**', homo="SansOrdreNiDoublon", into = [1,2,3,4,5,6,7,8,9],),\r
+ LReel1 = SIMP(statut ='o', typ = 'R', max = "**"),\r
+ LCompl = SIMP(statut ='o', typ = 'C', max = "**"),\r
+ LTuple2 = SIMP(statut ='o', typ = Tuple(2), validators=VerifTypeTuple(('R','R')), max = "**"),\r
+ LTuple3 = SIMP(statut ='o', typ = Tuple(3), validators=VerifTypeTuple(('R','R','R')), max = "**"),\r
+ LInSalome = SIMP(statut ='o', typ = SalomeEntry, max="**"),\r
+\r
+ LREEL = SIMP(statut ='f', typ = 'R', max='**', defaut = '',),\r
+)\r
+\r
+UTILISEOBJET = PROC (nom="UTILISEOBJET",\r
+ op=None,\r
+ UIinfo={"groupes":("Group1",)},\r
+ Obj = SIMP (statut ='o', typ = ObjetUtilisateur,)\r
+)\r
+\r
+ESSAI_FACT=OPER(nom="ESSAI_FACT",\r
+ sd_prod=ObjetUtilisateur,\r
+ op=None,\r
+ fr="Affectation de caractéristiques à des éléments de structure",\r
+ regles = (AU_MOINS_UN('Poutre','Barre'),\r
+ EXCLUS('Discret','Discret_2D'),),\r
+ Info = SIMP(statut='f',typ='I', defaut= 1 ,into=(1,2) ),\r
+ Verif = SIMP(statut='f',typ='TXM',validators=NoRepeat(),max='**',into=("Maille","Noeud") ),\r
+#\r
+# ==============================================================================\r
+ Poutre = FACT(statut= 'f',max= '**',\r
+ Section = SIMP(statut= 'o',typ= 'TXM' ,into= ("GENERALE","RECTANGLE","CERCLE") ),\r
+\r
+ b_generale = BLOC(condition = " Section == 'GENERALE'",\r
+ regles = (UN_PARMI('Maille','GroupeMailles'),),\r
+ Maille = SIMP(statut= 'f',typ= 'TXM' ,validators= NoRepeat(),max= '**'),\r
+ GroupeMailles = SIMP(statut= 'f',typ= grma,validators= NoRepeat(),max= '**'),\r
+\r
+ Vari = SIMP(statut= 'f',typ= 'TXM',into= ("CONSTANT","HOMOTHETIQUE"),defaut= "CONSTANT"),\r
+\r
+ b_constant = BLOC(condition = "Vari == 'CONSTANT'",\r
+ regles = (PRESENT_ABSENT('Table','Cara'),\r
+ PRESENT_PRESENT('Table','Nom'),\r
+ PRESENT_PRESENT('Cara','Valeur'),),\r
+ Table = SIMP(statut= 'f',typ='TXM'),\r
+ Nom = SIMP(statut= 'f',typ= 'TXM'),\r
+ Cara = SIMP(statut= 'o',typ= 'TXM',min= 4 ,max= 5,\r
+ fr= "A,IY,IZ,JX sont des paramètres obligatoires",\r
+ validators= [NoRepeat(), Compulsory(['A','IY','IZ','JX'])],\r
+ into= ("A","IY","IZ","AY","AZ","EY","EZ","JX","RY","RZ","RT","JG","IYR2","IZR2","AI") ),\r
+ Valeur = SIMP(statut= 'f',typ= 'R',min= 4 ,max= 15),\r
+ ),\r
+ ),\r
+ b_rectangle = BLOC(condition = "Section == 'RECTANGLE'",\r
+ regles = (UN_PARMI('Maille','GroupeMailles'),),\r
+ Maille = SIMP(statut= 'f',typ= 'TXM' ,validators= NoRepeat(),max= '**'),\r
+ GroupeMailles = SIMP(statut= 'f',typ= grma,validators= NoRepeat(),max= '**'),\r
+ Vari = SIMP(statut= 'f',typ= 'TXM',into= ("CONSTANT","HOMOTHETIQUE","AFFINE"),defaut= "CONSTANT"),\r
+ b_constant = BLOC(condition = "Vari == 'CONSTANT'",\r
+ Cara = SIMP(statut= 'o',typ= 'TXM',min= 1 ,max= 4,\r
+ validators = [NoRepeat(),\r
+ OrVal( [AndVal( [Compulsory(['H']),Absent(['HY','HZ','EPY','EPZ'])] ),\r
+ AndVal( [Compulsory(['HY','HZ']),Together(['EPY','EPZ']),Absent(['H','EP'])] )] )],\r
+ into= ("H","EP", "HY","HZ","EPY","EPZ"),),\r
+ Valeur = SIMP(statut= 'o',typ= 'R',min= 1 ,max= 4),\r
+ ),\r
+\r
+ Metrique = SIMP(statut= 'f',typ= 'TXM',defaut= "NON",into= ("OUI","NON") ),\r
+ Fcx = SIMP(statut= 'f',typ= 'R'),\r
+ Tuyau = SIMP(statut= 'f',typ= 'I',val_max= 10,defaut= 3),\r
+ ),\r
+ ),\r
+#\r
+# ==============================================================================\r
+ Barre = FACT(statut='f',max='**',\r
+ regles = (UN_PARMI('Maille','GroupeMailles'),),\r
+ Maille = SIMP(statut='f',typ='TXM' ,validators=NoRepeat(),max='**'),\r
+ GroupeMailles = SIMP(statut='f',typ=grma,validators=NoRepeat(),max='**'),\r
+ Section = SIMP(statut='o',typ='TXM',into=("GENERALE","RECTANGLE","CERCLE") ),\r
+ b_generale = BLOC(condition = "Section=='GENERALE'",\r
+ regles = (PRESENT_ABSENT('Table','Cara'),\r
+ PRESENT_PRESENT('Table','Nom'),\r
+ PRESENT_PRESENT('Cara','Valeur')),\r
+ Table = SIMP(statut='f',typ='TXM'),\r
+ Nom = SIMP(statut='f',typ='TXM',validators=LongStr(1,24) ),\r
+ Cara = SIMP(statut='f',typ='TXM',into=("A",) ),\r
+ Valeur = SIMP(statut='f',typ='R',min=1,max=1 ),\r
+ ),\r
+ b_rectangle = BLOC(condition = "Section=='RECTANGLE'",\r
+ Cara = SIMP(statut='o',typ='TXM', min=1, max=4,\r
+ validators = [NoRepeat(),\r
+ OrVal( [AndVal( [Compulsory(['H']),Absent(['HY','HZ','EPY','EPZ'])] ),\r
+ AndVal( [Compulsory(['HY','HZ']),Together(['EPY','EPZ']),Absent(['H','EP'])] )] )],\r
+ into=("H","EP","HZ","HY","EPY","EPZ"), ),\r
+ Valeur = SIMP(statut='o',typ='R',min=1,max=4 ), ),\r
+ b_cercle = BLOC(condition = "Section=='CERCLE'",\r
+ Cara = SIMP(statut='o',typ='TXM',validators=[NoRepeat(),Compulsory(['R'])],min=1,max=2,into=("R","EP") ),\r
+ Valeur = SIMP(statut='o',typ='R',min=1,max=2 ), ),\r
+ ),\r
+#\r
+# ==============================================================================\r
+ Discret = FACT(statut='f',max='**',\r
+ REPERE = SIMP(statut='f',typ='TXM',into=("LOCAL","GLOBAL") ),\r
+ AMOR_HYST = SIMP(statut='f',typ='R' ),\r
+ SYME = SIMP(statut='f',typ='TXM',defaut="OUI",into=("OUI","NON"),),\r
+ b_SYME_OUI = BLOC(condition="SYME=='OUI'",\r
+ fr="SYMETRIQUE: Affectation de matrices de rigidité, de masse ou d'amortissement à des mailles ou noeuds",\r
+ Cara = SIMP(statut='o',typ='TXM',validators=NoRepeat(),max=1,defaut="None",\r
+ into = ("K_T_D_N", "K_T_D_L", "K_TR_D_N", "K_TR_D_L", "K_T_N", "K_T_L", "K_TR_N", "K_TR_L",\r
+ "M_T_D_N", "M_T_D_L", "M_TR_D_N", "M_TR_D_L", "M_T_N", "M_T_L", "M_TR_N", "M_TR_L",\r
+ "A_T_D_N", "A_T_D_L", "A_TR_D_N", "A_TR_D_L", "A_T_N", "A_T_L", "A_TR_N", "A_TR_L",),),\r
+ # Affection des caractéristiques de RIGIDITE/AMORTISSEMENT/MASSE\r
+ b_AK_T_D_N = BLOC(condition = "((Cara=='K_T_D_N')or(Cara=='A_T_D_N'))",\r
+ fr = "Noeud: 3 valeurs (triangulaire supérieure par colonne)",\r
+ regles = (UN_PARMI('Maille','GroupeMailles','Noeud','GROUP_NO'),),\r
+ Noeud = SIMP(statut='f',typ='TXM' ,validators=NoRepeat(),max='**'),\r
+ GROUP_NO = SIMP(statut='f',typ=grno,validators=NoRepeat(),max='**'),\r
+ Maille = SIMP(statut='f',typ='TXM' ,validators=NoRepeat(),max='**'),\r
+ GroupeMailles = SIMP(statut='f',typ=grma,validators=NoRepeat(),homo='SansOrdreNiDoublon',max='**'),\r
+ Valeur = SIMP(statut='o',typ='R',min=3 ,max=3 ),),\r
+ ),\r
+ ),\r
+#\r
+# ==============================================================================\r
+ Discret_2D = FACT(statut='f',max='**',\r
+ REPERE = SIMP(statut='f',typ='TXM',into=("LOCAL","GLOBAL") ),\r
+ AMOR_HYST = SIMP(statut='f',typ='R' ),\r
+ SYME = SIMP(statut='f',typ='TXM',defaut="OUI",into=("OUI","NON"),),\r
+ ),\r
+)\r
+\r
+\r
--- /dev/null
+# coding: utf-8\r
+\r
+from Accas import *\r
+\r
+#class myMesh(ASSD): pass\r
+class myModel(ASSD): pass\r
+\r
+JdC = JDC_CATA(code='PATTERNS',\r
+ execmodul=None,\r
+ regles=(#AU_PLUS_UN('DEBUT', 'POURSUITE'),\r
+ AU_PLUS_UN('ALL_LISTS'),\r
+ #AU_PLUS_UN('FIN'),\r
+ A_CLASSER(('DEBUT', 'POURSUITE'), 'FIN')\r
+ )\r
+)\r
+\r
+class grma():\r
+ def __convert__(cls,valeur):\r
+ if isinstance(valeur, (str,unicode)) and len(valeur.strip()) <= 24 : #and ("item" in (valeur.strip()))\r
+ return valeur.strip()\r
+ raise ValueError("Name length does not contain \"test\" and is longer than allowed, 24")\r
+ __convert__ = classmethod(__convert__)\r
+\r
+def mySeveral(suffix,num):\r
+ out=list()\r
+ for i in range(1,num+1):\r
+ out.append(suffix+str(i).zfill(2))\r
+ return out\r
+\r
+switch_facultatif=True #change 'o' to 'f' of some widgets in the loop\r
+#empty_defauts=True\r
+\r
+def myBloc(num):\r
+ myNum=str(num).zfill(2)\r
+ list_item_body="Item_"+myNum+"_"\r
+ defauts0=["","",True,"'phenomena_"+myNum+"'",mySeveral(list_item_body,2)] #presence of default values\r
+ defauts_mask=[False,False,True,True,True] #switch off defaults of some types\r
+ defauts=list()\r
+ for id0 in range(len(defauts0)):\r
+ if defauts_mask[id0]:\r
+ item=", defaut="+str(defauts0[id0])\r
+ else:\r
+ item=""\r
+ defauts.append(item)\r
+ #print defauts\r
+\r
+ opt=['o','o','o','o','o'] #initial default obligation of items in FACT groups\r
+ #make different widgets optional, one by one:\r
+ myLen=len(opt)\r
+ if switch_facultatif:\r
+ make_f=(num)%myLen\r
+ opt[make_f]='f'\r
+ #print opt\r
+ #if empty_defauts:\r
+ # clean_defaut=num%myLen\r
+\r
+ 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'),),)"\r
+ print myString\r
+ return eval(myString)\r
+\r
+ALL_LISTS=OPER(nom="ALL_LISTS",op=18,sd_prod=myModel,\r
+ UIinfo={"groupes":("Group1",)},\r
+ ang="Model mesh definition EN",\r
+ reentrant='n',\r
+ #regles=(AU_MOINS_UN('LIST_O_CHECKTEXT','LIST_F_CHECKTEXT','LIST_O_ANY','LIST_F_ANY')),\r
+\r
+ #LIST_O_NOREPEAT_CHECKTEXT=SIMP(statut='o',typ=grma,validators=NoRepeat(),min=3, max='**'),\r
+ #LIST_F_NOREPEAT_CHECKTEXT=SIMP(statut='f',typ=grma,validators=NoRepeat(),min=3, max='**'),\r
+ #LIST_F_REPEAT_CHECKTEXT=SIMP(statut='f',typ=grma,min=3, max='**'),\r
+ #LIST_O_REPEAT_CHECKTEXT=SIMP(statut='o',typ=grma,min=3, max='**'),\r
+\r
+ #LIST_F_NOREPEAT_ANYTEXT=SIMP(statut='f',typ='TXM',validators=NoRepeat(),min=3, max='**'),\r
+ #LIST_O_NOREPEAT_ANYTEXT=SIMP(statut='o',typ='TXM',min=3,validators=NoRepeat(), max='**'),\r
+ #LIST_O_REPEAT_ANYTEXT=SIMP(statut='o',typ='TXM',min=3, max='**'),\r
+ #LIST_F_REPEAT_ANYTEXT=SIMP(statut='f',typ='TXM',min=3, max='**'),\r
+\r
+ #LIST_O_NOREPEAT_CHECKTEXT_ADD=SIMP(statut='o',typ=grma,validators=NoRepeat(), into=("item01","text01","item02","text02","item03","text03",), min=3, max='**'),\r
+ #LIST_F_REPEAT_ANYTEXT_ADD=SIMP(statut='f',typ=grma,validators=NoRepeat(), into=("item01","text01","item02","text02","item03","text03",), min=3, max='**'),\r
+\r
+ 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='**'),\r
+ #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='**'),\r
+)\r
+\r
+Classement_Commandes_Ds_Arbre=('DEBUT','MESH_TYPES','ALL_LISTS','FIN')\r
+\r
+Ordre_Des_Commandes = ('DEBUT','MESH_TYPES','ALL_LISTS','FIN')\r
--- /dev/null
+# coding: utf-8\r
+from Accas import *\r
+\r
+#class myMesh(ASSD): pass\r
+class myModel(ASSD): pass\r
+\r
+JdC = JDC_CATA(code='PATTERNS',\r
+ execmodul=None,\r
+ regles=(#AU_PLUS_UN('DEBUT', 'POURSUITE'),\r
+ AU_PLUS_UN('ALL_LISTS'),\r
+ #AU_PLUS_UN('FIN'),\r
+ A_CLASSER(('DEBUT', 'POURSUITE'), 'FIN')\r
+ )\r
+)\r
+\r
+\r
+ALL_LISTS=OPER(nom="ALL_LISTS",op=18,sd_prod=myModel,\r
+ UIinfo={"groupes":("Group1",)},\r
+ ang="Model mesh definition EN",\r
+ reentrant='n',\r
+ LIST_O_NOREPEAT_CHECKTEXT_ADD_DEFAUT=SIMP(statut='o',typ="TXM",validators=NoRepeat(), \r
+ into=("item01","text01","item02","text02","item03","text03","item04","text04","item05","text05",), \r
+ defaut=('item01','item02','item03'),\r
+ homo="SansOrdreNiDoublon",\r
+ min=3, max='**'),\r
+\r
+ #regles=(AU_MOINS_UN('LIST_O_CHECKTEXT','LIST_F_CHECKTEXT','LIST_O_ANY','LIST_F_ANY')),\r
+\r
+ #LIST_O_NOREPEAT_CHECKTEXT=SIMP(statut='o',typ=grma,validators=NoRepeat(),min=3, max='**'),\r
+ #LIST_F_NOREPEAT_CHECKTEXT=SIMP(statut='f',typ=grma,validators=NoRepeat(),min=3, max='**'),\r
+ #LIST_F_REPEAT_CHECKTEXT=SIMP(statut='f',typ=grma,min=3, max='**'),\r
+ #LIST_O_REPEAT_CHECKTEXT=SIMP(statut='o',typ=grma,min=3, max='**'),\r
+\r
+ #LIST_F_NOREPEAT_ANYTEXT=SIMP(statut='f',typ='TXM',validators=NoRepeat(),min=3, max='**'),\r
+ #LIST_O_NOREPEAT_ANYTEXT=SIMP(statut='o',typ='TXM',min=3,validators=NoRepeat(), max='**'),\r
+ #LIST_O_REPEAT_ANYTEXT=SIMP(statut='o',typ='TXM',min=3, max='**'),\r
+ #LIST_F_REPEAT_ANYTEXT=SIMP(statut='f',typ='TXM',min=3, max='**'),\r
+\r
+ #LIST_O_NOREPEAT_CHECKTEXT_ADD=SIMP(statut='o',typ=grma,validators=NoRepeat(), into=("item01","text01","item02","text02","item03","text03",), min=3, max='**'),\r
+ #LIST_F_REPEAT_ANYTEXT_ADD=SIMP(statut='f',typ=grma,validators=NoRepeat(), into=("item01","text01","item02","text02","item03","text03",), min=3, max='**'),\r
+\r
+ #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='**'),\r
+\r
+\r
+ #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='**'),\r
+)\r
+\r
+\r
+\r
+Classement_Commandes_Ds_Arbre=('DEBUT','MESH_TYPES','ALL_LISTS','FIN')\r
+\r
+Ordre_Des_Commandes = ('DEBUT','MESH_TYPES','ALL_LISTS','FIN')\r
--- /dev/null
+# coding: utf-8\r
+from Accas import *\r
+\r
+class myModel(ASSD): pass\r
+\r
+JdC = JDC_CATA(code='PATTERNS',\r
+ execmodul=None,\r
+ regles=(#AU_PLUS_UN('DEBUT', 'POURSUITE'),\r
+ AU_PLUS_UN('ALL_LISTS'),\r
+ #AU_PLUS_UN('FIN'),\r
+ A_CLASSER(('DEBUT', 'POURSUITE'), 'FIN')\r
+ )\r
+)\r
+\r
+class grma():\r
+ def __convert__(cls,valeur):\r
+ if isinstance(valeur, (str,unicode)) and len(valeur.strip()) <= 12 and ("item" in (valeur.strip()).lower()): #\r
+ return valeur.strip()\r
+ raise ValueError("Name length does not contain \"test\" and is longer than allowed, 12")\r
+ __convert__ = classmethod(__convert__)\r
+\r
+def mySeveral(suffix,num):\r
+ out=list()\r
+ for i in range(1,num+1):\r
+ out.append(suffix+str(i).zfill(2))\r
+ return out\r
+\r
+ALL_LISTS=OPER(nom="ALL_LISTS",op=18,sd_prod=myModel,\r
+ UIinfo={"groupes":("Group1",)},\r
+ fr="All lists definition FR",\r
+ ang="All lists definition EN",\r
+ reentrant='n',\r
+ #regles=(AU_MOINS_UN('LIST_O_CHECKTEXT','LIST_F_CHECKTEXT','LIST_O_ANY','LIST_F_ANY')),\r
+\r
+ L1_LIST_O_NOREPEAT_CHECKTEXT=SIMP(statut='o',typ=grma,validators=NoRepeat(),min=3, max='**', ang='Obligatory, No Repetitions, checked text, EN'),\r
+ L2_LIST_F_NOREPEAT_CHECKTEXT=SIMP(statut='f',typ=grma,validators=NoRepeat(),min=3, max='**', ang='Optional, No Repetitions, checked text, EN'),\r
+ L3_LIST_F_REPEAT_CHECKTEXT=SIMP(statut='f',typ=grma,min=3, max='**',ang='Optional, Allowed Repetitions, checked text, EN'),\r
+ L4_LIST_O_REPEAT_CHECKTEXT=SIMP(statut='o',typ=grma,min=3, max='**',ang='Obligatory, Allowed Repetitions, checked text, EN'),\r
+\r
+ L5_LIST_F_NOREPEAT_ANYTEXT=SIMP(statut='f',typ='TXM',validators=NoRepeat(),min=3, max='**',ang='Optional, No Repetitions, any text, EN'),\r
+ L6_LIST_O_NOREPEAT_ANYTEXT=SIMP(statut='o',typ='TXM',min=3,validators=NoRepeat(), max='**',ang='Obligatory, No Repetitions, any text, EN'),\r
+ L7_LIST_O_REPEAT_ANYTEXT=SIMP(statut='o',typ='TXM',min=3, max='**',ang='Obligatory, Allowed Repetitions, any text, EN'),\r
+ L8_LIST_F_REPEAT_ANYTEXT=SIMP(statut='f',typ='TXM',min=3, max='**',ang='Optional, Allowed Repetitions, any text, EN'),\r
+\r
+ 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',),\r
+ 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'),\r
+ 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='**'),\r
+ 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'),\r
+\r
+ 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'),\r
+ 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'),\r
+ 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'),\r
+)\r
+\r
+\r
+\r
+Classement_Commandes_Ds_Arbre=('DEBUT','MESH_TYPES','ALL_LISTS','FIN')\r
+\r
+Ordre_Des_Commandes = ('DEBUT','MESH_TYPES','ALL_LISTS','FIN')\r
--- /dev/null
+# coding: utf-8\r
+from Accas import *\r
+\r
+class myModel(ASSD): pass\r
+\r
+JdC = JDC_CATA(code='PATTERNS',\r
+ execmodul=None,\r
+ regles=(#AU_PLUS_UN('DEBUT', 'POURSUITE'),\r
+ AU_PLUS_UN('ALL_LISTS'),\r
+ #AU_PLUS_UN('FIN'),\r
+ A_CLASSER(('DEBUT', 'POURSUITE'), 'FIN')\r
+ )\r
+)\r
+\r
+class grma():\r
+ def __convert__(cls,valeur):\r
+ if isinstance(valeur, (str,unicode)) and len(valeur.strip()) <= 12 and ("item" in (valeur.strip()).lower()): #\r
+ return valeur.strip()\r
+ raise ValueError("Name length does not contain \"item\" and is longer than allowed, 12")\r
+ __convert__ = classmethod(__convert__)\r
+\r
+def mySeveral(suffix,num):\r
+ out=list()\r
+ for i in range(1,num+1):\r
+ out.append(suffix+str(i).zfill(2))\r
+ return out\r
+\r
+ALL_LISTS=OPER(nom="ALL_LISTS",op=18,sd_prod=myModel,\r
+ UIinfo={"groupes":("Group1",)},\r
+ fr="All lists definition FR",\r
+ ang="All lists definition EN",\r
+ reentrant='n',\r
+ #regles=(AU_MOINS_UN('LIST_O_CHECKTEXT','LIST_F_CHECKTEXT','LIST_O_ANY','LIST_F_ANY')),\r
+\r
+ L1_LIST_O_NOREPEAT_CHECKTEXT=SIMP(statut='o',typ=grma,validators=NoRepeat(),min=3, max='**', ang='Obligatory, No Repetitions, checked text, EN'),\r
+ L2_LIST_F_NOREPEAT_CHECKTEXT=SIMP(statut='f',typ=grma,validators=NoRepeat(),min=3, max='**', ang='Optional, No Repetitions, checked text, EN'),\r
+ L3_LIST_F_REPEAT_CHECKTEXT=SIMP(statut='f',typ=grma,min=3, max='**',ang='Optional, Allowed Repetitions, checked text, EN'),\r
+ L4_LIST_O_REPEAT_CHECKTEXT=SIMP(statut='o',typ=grma,min=3, max='**',ang='Obligatory, Allowed Repetitions, checked text, EN'),\r
+\r
+ L5_LIST_F_NOREPEAT_ANYTEXT=SIMP(statut='f',typ='TXM',validators=NoRepeat(),min=3, max='**',ang='Optional, No Repetitions, any text, EN'),\r
+ L6_LIST_O_NOREPEAT_ANYTEXT=SIMP(statut='o',typ='TXM',min=3,validators=NoRepeat(), max='**',ang='Obligatory, No Repetitions, any text, EN'),\r
+ L7_LIST_O_REPEAT_ANYTEXT=SIMP(statut='o',typ='TXM',min=3, max='**',ang='Obligatory, Allowed Repetitions, any text, EN'),\r
+ L8_LIST_F_REPEAT_ANYTEXT=SIMP(statut='f',typ='TXM',min=3, max='**',ang='Optional, Allowed Repetitions, any text, EN'),\r
+\r
+ 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',),\r
+ 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'),\r
+ 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='**'),\r
+ 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'),\r
+\r
+ 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'),\r
+ 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'),\r
+ 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(),\r
+)\r
+\r
+\r
+\r
+Classement_Commandes_Ds_Arbre=('DEBUT','MESH_TYPES','ALL_LISTS','FIN')\r
+\r
+Ordre_Des_Commandes = ('DEBUT','MESH_TYPES','ALL_LISTS','FIN')\r
--- /dev/null
+# coding: utf-8\r
+from Accas import *\r
+\r
+class myModel(ASSD): pass\r
+\r
+JdC = JDC_CATA(code='PATTERNS',\r
+ execmodul=None,\r
+ regles=(#AU_PLUS_UN('DEBUT', 'POURSUITE'),\r
+ AU_PLUS_UN('ALL_LISTS'),\r
+ #AU_PLUS_UN('FIN'),\r
+ A_CLASSER(('DEBUT', 'POURSUITE'), 'FIN')\r
+ )\r
+)\r
+\r
+class grma():\r
+ def __convert__(cls,valeur):\r
+ if isinstance(valeur, (str,unicode)) and len(valeur.strip()) <= 12 and ("item" in (valeur.strip()).lower()): #\r
+ return valeur.strip()\r
+ raise ValueError("Name length does not contain \"test\" and is longer than allowed, 12")\r
+ __convert__ = classmethod(__convert__)\r
+\r
+def mySeveral(suffix,num):\r
+ out=list()\r
+ for i in range(1,num+1):\r
+ out.append(suffix+str(i).zfill(2))\r
+ return out\r
+\r
+ALL_LISTS=OPER(nom="ALL_LISTS",op=18,sd_prod=myModel,\r
+ UIinfo={"groupes":("Group1",)},\r
+ fr="All lists definition FR",\r
+ ang="All lists definition EN",\r
+ reentrant='n',\r
+ #regles=(AU_MOINS_UN('LIST_O_CHECKTEXT','LIST_F_CHECKTEXT','LIST_O_ANY','LIST_F_ANY')),\r
+\r
+ L1_LIST_O_NOREPEAT_CHECKTEXT=SIMP(statut='o',typ=grma,validators=NoRepeat(),min=3, max='**', ang='Obligatory, No Repetitions, checked text, EN'),\r
+ L2_LIST_F_NOREPEAT_CHECKTEXT=SIMP(statut='f',typ=grma,validators=NoRepeat(),min=3, max='**', ang='Optional, No Repetitions, checked text, EN'),\r
+ L3_LIST_F_REPEAT_CHECKTEXT=SIMP(statut='f',typ=grma,min=3, max='**',ang='Optional, Allowed Repetitions, checked text, EN'),\r
+ L4_LIST_O_REPEAT_CHECKTEXT=SIMP(statut='o',typ=grma,min=3, max='**',ang='Obligatory, Allowed Repetitions, checked text, EN'),\r
+\r
+ L5_LIST_F_NOREPEAT_ANYTEXT=SIMP(statut='f',typ='TXM',validators=NoRepeat(),min=3, max='**',ang='Optional, No Repetitions, any text, EN'),\r
+ L6_LIST_O_NOREPEAT_ANYTEXT=SIMP(statut='o',typ='TXM',min=3,validators=NoRepeat(), max='**',ang='Obligatory, No Repetitions, any text, EN'),\r
+ L7_LIST_O_REPEAT_ANYTEXT=SIMP(statut='o',typ='TXM',min=3, max='**',ang='Obligatory, Allowed Repetitions, any text, EN'),\r
+ L8_LIST_F_REPEAT_ANYTEXT=SIMP(statut='f',typ='TXM',min=3, max='**',ang='Optional, Allowed Repetitions, any text, EN'),\r
+\r
+ 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',),\r
+ 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'),\r
+ 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='**'),\r
+ 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'),\r
+\r
+ 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'),\r
+ 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'),\r
+ 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'),\r
+)\r
+\r
+\r
+\r
+Classement_Commandes_Ds_Arbre=('DEBUT','MESH_TYPES','ALL_LISTS','FIN')\r
+\r
+Ordre_Des_Commandes = ('DEBUT','MESH_TYPES','ALL_LISTS','FIN')\r
--- /dev/null
+# 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')
--- /dev/null
+# 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')
--- /dev/null
+# 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')
--- /dev/null
+# 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')
--- /dev/null
+# 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')
--- /dev/null
+# 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" ),
+)
--- /dev/null
+# 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',)
--- /dev/null
+# 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',)
--- /dev/null
+# 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',)
--- /dev/null
+# 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',)
--- /dev/null
+# 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',)
--- /dev/null
+# 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',)
--- /dev/null
+# 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',)
--- /dev/null
+# 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',)
--- /dev/null
+# 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',)
--- /dev/null
+# 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',)
--- /dev/null
+# 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',)
--- /dev/null
+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"),),
+ ),
+)
--- /dev/null
+# 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'),
+);
+
--- /dev/null
+# 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'),
+ ),
+ ),
+ ),
+);
+
+
--- /dev/null
+# -*- coding: utf-8 -*-\r
+# maConfiguration MANAGEMENT OF EDF VERSION\r
+# ======================================================================\r
+# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG\r
+# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY\r
+# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY\r
+# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR\r
+# (AT YOUR OPTION) ANY LATER VERSION.\r
+#\r
+# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT\r
+# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF\r
+# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU\r
+# GENERAL PUBLIC LICENSE FOR MORE DETAILS.\r
+#\r
+# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE\r
+# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER,\r
+# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE.\r
+#\r
+#\r
+# ======================================================================\r
+"""\r
+ Ce module sert pour charger les paramètres de configuration d'EFICAS\r
+"""\r
+# Modules Python\r
+from InterfaceQT4 import configuration\r
+import os\r
+\r
+\r
+class CONFIG(configuration.configBase):\r
+\r
+ #-----------------------------------\r
+ def __init__(self,appli,repIni):\r
+ #-----------------------------------\r
+\r
+ self.labels_user=['catalogues','lang']\r
+ self.labels_eficas=['lang','rep_cata','catalogues']\r
+\r
+ configuration.configBase.__init__(self,appli,'.Eficas_monCode')\r
+\r
+\r
+def make_config(appli,rep):\r
+ return CONFIG(appli,rep)\r
+\r
--- /dev/null
+"4" "3" "2" "1"
+"4" "5" "6" "7"
\ No newline at end of file
--- /dev/null
+#!/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.lanceEficas(code=prefs.code)
--- /dev/null
+# Copyright (C) 2007-2012 EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+code="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__)))
--- /dev/null
+# -*- coding: utf-8 -*-
+# maConfiguration MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG
+# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY
+# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY
+# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR
+# (AT YOUR OPTION) ANY LATER VERSION.
+#
+# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT
+# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF
+# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU
+# GENERAL PUBLIC LICENSE FOR MORE DETAILS.
+#
+# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE
+# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER,
+# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE.
+#
+#
+# ======================================================================
+
+import os,sys
+# repIni sert a localiser le fichier editeur.ini
+# Obligatoire
+repIni=os.path.dirname(os.path.abspath(__file__))
+INSTALLDIR=os.path.join(repIni,'..')
+sys.path[:0]=[INSTALLDIR]
+
+
+# lang indique la langue utilisee pour les chaines d'aide : fr ou ang
+lang='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')
+}
+
--- /dev/null
+# -*- coding: utf-8 -*-
+# maConfiguration MANAGEMENT OF EDF VERSION
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG
+# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY
+# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY
+# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR
+# (AT YOUR OPTION) ANY LATER VERSION.
+#
+# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT
+# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF
+# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU
+# GENERAL PUBLIC LICENSE FOR MORE DETAILS.
+#
+# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE
+# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER,
+# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE.
+#
+#
+# ======================================================================
+
+import os,sys
+# repIni sert a localiser le fichier editeur.ini
+# Obligatoire
+repIni=os.path.dirname(os.path.abspath(__file__))
+INSTALLDIR=os.path.join(repIni,'..')
+sys.path[:0]=[INSTALLDIR]
+
+
+# lang indique la langue utilisee pour les chaines d'aide : fr ou ang
+lang='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'),
+)
+
--- /dev/null
+#@ MODIF properties Accas DATE 11/06/2008 AUTEUR aster M.ADMINISTRATEUR
+# RESPONSABLE D6BHHHH J-P.LEFEBVRE
+# ======================================================================
+# COPYRIGHT (C) 1991 - 2001 EDF R&D WWW.CODE-ASTER.ORG
+# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY
+# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY
+# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR
+# (AT YOUR OPTION) ANY LATER VERSION.
+#
+# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT
+# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF
+# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU
+# GENERAL PUBLIC LICENSE FOR MORE DETAILS.
+#
+# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE
+# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER,
+# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE.
+# ======================================================================
+# IDENTIFICATION DU GESTIONNAIRE DE COMMANDE ACCAS A PARTIR
+# DE LA VERSION DU CODE_ASTER ASSOCIE
+#----------------------------------------------------------------------
+version = "1.2"
+date = "25/05/2010"
+exploit = False
--- /dev/null
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+# Copyright (C) 2007-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.lanceEficas(code=prefs.code)
--- /dev/null
+#!/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.lanceEficas(code=prefs.code)
self.childrenComplete=[]
self.racine=self.item.itemNode(self,self.item)
- self.itemCourrant=None
+ self.itemCourant=None
self.itemClicked.connect(self.handleOnItem)
self.itemCollapsed.connect(self.handleCollapsedItem)
"""
#print "handleContextMenu"
if item == None : return
+ self.itemCourant=item
if item.existeMenu == 0 : return
if item.menu == None:
item.createPopUpMenu()
def handleCollapsedItem(self,item):
#print "dans CollapsedItem", self.inhibeExpand
if self.inhibeExpand == True : return
+ self.itemCourant=item
# On traite le cas de l item non selectionne
itemParent=item
while not (hasattr (itemParent,'getPanel')) :
#import traceback
#traceback.print_stack()
if self.inhibeExpand == True : return
+ self.itemCourant=item
self.inhibeExpand = True
itemParent=item
while not (hasattr (itemParent,'getPanel')) :
def handleOnItem(self,item,int):
- #print "je passe dans handleOnItem pour ",self, item.item.nom, item, item.item
+ #print ("je passe dans handleOnItem pour ",self, item.item.nom, item, item.item, item.item.getLabelText())
from InterfaceQT4 import composimp
self.inhibeExpand = True
- self.itemCourrant=item
+ self.itemCourant=item
itemParent=item
while not (hasattr (itemParent,'getPanel')) :
itemParent=itemParent.treeParent
if itemParent.fenetre != self.editor.fenetreCentraleAffichee :
-
estUneFeuille=(isinstance(item,composimp.Node))
# il faut afficher le parent
- #print "estUneFeuille", estUneFeuille
- #print "afficheCommandesPliees", self.editor.afficheCommandesPliees
if estUneFeuille : itemParent.affichePanneau()
elif self.editor.afficheCommandesPliees : itemParent.plieToutEtReafficheSaufItem(item)
else : itemParent.affichePanneau()
else: name = tr(item.getLabelText()[0])
if item.nom != tr(item.nom) : name = str(tr(item.nom)+" :")
value = tr(str( item.getText() ) )
+
+ # si specialisation de la fenetre
+ if self.item.object.definition == None : self.fenetreIhm = None
+ # Cas des listes de mots_clefs
+ else : self.fenetreIhm = self.item.object.definition.fenetreIhm
-
if self.editor.enteteQTree=='complet':mesColonnes=(name,value)
else : mesColonnes=(name,)
return None
- def deplieCeNiveau(self):
-
- if self.fenetre == None :
- print ('PNPNPN a programmer')
- #self.fenetre=self.getPanelGroupe(self.editor)
- #print ((self.item.panel))
- print (self.fenetre)
+ def afficheCeNiveau(self):
+ #print ('afficheCeNiveau pour ', self.item.nom, self.item.getLabelText())
for indiceWidget in range(self.editor.widgetCentraleLayout.count()):
widget=self.editor.widgetCentraleLayout.itemAt(indiceWidget)
self.editor.widgetCentraleLayout.removeItem(widget)
maDefinition=self.item.get_definition()
monObjet=self.item.object
self.maFenetreCadre=MonWidgetNiveauFact(self,self.editor,maDefinition,monObjet)
- #self.maFenetreCadre.commandesLayout.insertWidget(-1,self.fenetre)
+ self.fenetre=self.maFenetreCadre
self.editor.widgetCentraleLayout.addWidget(self.maFenetreCadre)
- #print ("j ajoute ", self.fenetre, self.fenetre.node.item.nom)
self.editor.fenetreCentraleAffichee=self.maFenetreCadre
- self.tree.node_selected= self
-
+ self.select()
+ #print ('fin afficheCeNiveau pour ', self.item.nom)
+
+
+ def getPanelModifie(self):
+
+ if self.fenetreIhm == None : return None
+ if self.fenetreIhm=='deplie1Niveau':
+ from InterfaceQT4.monWidgetCommandeDeplie1Niveau import MonWidgetCommandeDeplie1Niveau
+ return MonWidgetCommandeDeplie1Niveau (self,self.editor ,self.item.object)
+ return None
def affichePanneau(self) :
# posera des pb si un code decide d appeler FIN un mot clef
# on resoudera a ce moment la
# pour l instant pas de poussiere sous le tapis
+ #print ('_________________ds affichePanneau pour', self.item.nom)
if not(self.item.isActif()) :
from .monWidgetInactif import MonWidgetInactif
self.fenetre = MonWidgetInactif(self,self.editor)
itemParent=self
while not (hasattr (itemParent,'getPanel')) : itemParent=itemParent.treeParent
if itemParent!=self :
+ #print ('j appelle affichePanneau pour ', itemParent.item.nom , 'par', self.item.nom)
itemParent.affichePanneau()
+ #print ('fin _________________ds affichePanneau pour', self.item.nom)
return
- self.fenetre=self.getPanel()
- #self.editor.restoreSplitterSizes()
+ self.fenetre=self.getPanelModifie()
+ if self.fenetre == None : self.fenetre=self.getPanel()
+ self.editor.restoreSplitterSizes()
for indiceWidget in range(self.editor.widgetCentraleLayout.count()):
widget=self.editor.widgetCentraleLayout.itemAt(indiceWidget)
self.tree.inhibeExpand=True
self.tree.expandItem(self)
self.tree.inhibeExpand=False
- #print( 'fin affichePanneau pour', self.item.nom)
+ #print( '_________________fin affichePanneau pour', self.item.nom)
def createPopUpMenu(self):
return child
def plieToutEtReafficheSaufItem(self, itemADeplier):
- #print "je suis dans plieToutEtReaffiche", self.item.getNom()
self.inhibeExpand=True
from InterfaceQT4 import compojdc
if (isinstance(self, compojdc.Node)) :
self.inhibeExpand=False
def plieToutEtReaffiche(self):
+ if self.item.getNom() == 'RAFFINEMENT' :
+ import traceback
+ traceback.print_stack()
+ print (a)
from InterfaceQT4 import compojdc
if (isinstance(self, compojdc.Node)) : self.affichePanneau(); return
self.inhibeExpand=True
if (isinstance(item,compobloc.Node)) : continue
item.setPlie()
self.affichePanneau()
+ #print ("fin plieToutEtReaffiche", self.item.getNom())
def deplieToutEtReaffiche(self):
self.editor.deplier = True
# item.appartientAUnNoeudPlie=False
def setPlieChildren(self):
- #print ("dans setPlieChildren pour", self.item.nom)
self.plie=True
+ from InterfaceQT4 import composimp
+ if isinstance(self,composimp.Node) : return
for c in self.children :
c.setPlieChildren()
#print "dans setPlieChildren appartientAUnNoeudPlie=True ", c, c.item.getLabelText()[0]
c.appartientAUnNoeudPlie=True
c.plie=True
#print "dans setPlieChildren plie", c.item.nom
- c.setExpanded(False)
+ # 01/2018 PNPN : boucle sur MT __ La ligne suivante ne me semble pas necessaire
+ #if not (isinstance(c,composimp.Node)) :c.setExpanded(False)
# Pour les blocs et les motcles list
# on affiche un niveau de plus
niveauPere=niveauPere.treeParent
for c in self.children :
c.appartientAUnNoeudPlie=niveauPere.appartientAUnNoeudPlie
- #print "dans setPlieChildren appartientAUnNoeudPlie=True ", c, c.item.getLabelText()[0], "mis a la valeur ", niveauPere.appartientAUnNoeudPlie
+ #print ("dans setPlieChildren appartientAUnNoeudPlie=True ", c, c.item.getLabelText()[0], "mis a la valeur ", niveauPere.appartientAUnNoeudPlie)
c.setExpanded(False)
- # on affiche un niveau de plus
- #if isinstance(self,compomclist.Node) :
- #if isinstance(self,compobloc.Node) :
- # niveauPere=self.treeParent
- # while (isinstance(niveauPere,compobloc.Node)):
- # niveauPere=niveauPere.treeParent
- # for c in self.children :
- # c.appartientAUnNoeudPlie=niveauPere.appartientAUnNoeudPlie
def setDeplie(self):
#print "dans setPlieChildren pour", self.item.nom
# Modules Eficas
from Editeur import Objecttreeitem
from Extensions.i18n import tr
-from . import compooper
-from . import browser
-from . import typeNode
+from InterfaceQT4 import compooper
+from InterfaceQT4 import browser
+from InterfaceQT4 import typeNode
from PyQt5.QtWidgets import QAction
from PyQt5.QtCore import Qt
monObjet=self.item.object
monNom=self.item.nom
maCommande=commande
- #print "ds getPanelGroupe" , self.item.nom
if hasattr(parentQt,'niveau'): self.niveau=parentQt.niveau+1
else : self.niveau=1
+ # attention si l objet est une mclist on utilise bloc
if not (monObjet.isMCList()) :
if hasattr(self,'plie') and self.plie==True :
- from .monWidgetFactPlie import MonWidgetFactPlie
+ from InterfaceQT4.monWidgetFactPlie import MonWidgetFactPlie
widget=MonWidgetFactPlie(self,self.editor,parentQt,maDefinition,monObjet,self.niveau,maCommande,insertIn)
else:
- from .monWidgetFact import MonWidgetFact
+ from InterfaceQT4.monWidgetFact import MonWidgetFact
widget=MonWidgetFact(self,self.editor,parentQt,maDefinition,monObjet,self.niveau,maCommande,insertIn)
else :
- from .monWidgetBloc import MonWidgetBloc
+ from InterfaceQT4.monWidgetBloc import MonWidgetBloc
widget=MonWidgetBloc(self,self.editor,parentQt,maDefinition,monObjet,self.niveau,maCommande)
return widget
FACTPanel.
Si la liste est plus longue on utilise le panneau MCLISTPanel.
"""
- print ('he suis dans panel de MCListTreeItem')
+ print ('je suis dans panel de MCListTreeItem')
if len(self._object) > 1:
return MCLISTPanel(jdcdisplay,pane,node)
elif isinstance(self._object.data[0],ErrorObj):
# if v.nom == name : return v
# return None
- def getType_sd_prod(self):
- """
- Retourne le nom du type du concept résultat de l'étape
- """
- sd_prod=self.object.getType_produit()
- if sd_prod:
- return sd_prod.__name__
- else:
- return ""
+ # def getType_sd_prod(self):
+ # """
+ # Retourne le nom du type du concept résultat de l'étape
+ # """
+ # sd_prod=self.object.getType_produit()
+ # if sd_prod:
+ # return sd_prod.__name__
+ # else:
+ # return ""
def addItem(self,name,pos):
mcent = self._object.addEntite(name,pos)
self.ficIcones=None
self.repIcones=None
self.differencieSiDefaut=False
+ self.typeDeCata='Python'
from Editeur import comploader
from Editeur import Objecttreeitem
from InterfaceQT4 import browser
-from InterfaceQT4 import readercata
from desBaseWidget import Ui_baseWidget
from InterfaceQT4.monViewTexte import ViewText
from Editeur import session
from Editeur import comploader
from Editeur import Objecttreeitem
-from InterfaceQT4 import readercata
DictExtensions= {"MAP" : ".map", "TELEMAC" : '.cas'}
debug = False
if not hasattr ( self.appliEficas, 'readercata') or self.appliEficas.multi==True:
+ if self.maConfiguration.typeDeCata == 'XML' :
+ from InterfaceQT4 import readercataXML as readercata
+ else :
+ from InterfaceQT4 import readercata
+ print (self.maConfiguration.typeDeCata)
+ print (readercata)
self.readercata = readercata.READERCATA( self, self.appliEficas )
self.appliEficas.readercata=self.readercata
self.appliEficas.code=self.code
pareil,texteNew=self.verifieChecksum(p.text)
if not pareil :
- self.informe(tr("fichier modifie"),tr("Attention! fichier change hors EFICAS"),False)
+ self.informe(("fichier modifie"),("Attention! fichier change hors EFICAS"),False)
p.text=texteNew
memeVersion,texteNew=self.verifieVersionCataDuJDC(p.text)
"""
"""
def __init__(self,node,editor,parentQt,definition,obj,niveau,commande=None):
+ #print ("groupe : ",self.node.item.nom," ",self.node.fenetre)
QWidget.__init__(self,None)
self.node=node
self.node.fenetre=self
- #print "groupe : ",self.node.item.nom," ",self.node.fenetre
+ if self.node.item.nom == 'MASSES' : traceback.print_stack()
self.setupUi(self)
self.editor=editor
self.obj=obj
def afficheMots(self):
- #print "ds afficheMots ",self.node.item.nom
+ #print ("ds afficheMots ",self.node.item.nom,self.node.plie)
for node in self.node.children:
- #if node.item.nom == "Background" :print "afficheMots ",node," " ,node.item.nom, " ",node.plie ," ", node.appartientAUnNoeudPlie,node.getPanelGroupe
- #if node.item.nom == "BackgroundError" :print "afficheMots ",node," " ,node.item.nom, " ",node.plie ," ", node.appartientAUnNoeudPlie,node.getPanelGroupe
# non return mais continue car il faut tenir compte des blocs
if node.appartientAUnNoeudPlie==True : continue
#print "je suis apres le if pour ",node.item.nom
def setPlie(self):
self.node.setPlie()
- if self.editor.code== 'MT' and (self.maCommande.obj.nom == "ZONE") :
- #if (len(self.node.item.getGenealogie())==2):
- index=self.maCommande.commandesLayout.indexOf(self)
- self.maCommande.reafficheSeulement(self,index)
- return
- #else :
- # self.reaffiche(self.node)
- #return
- #print ('je reaffiche dans Plie')
self.reaffiche(self.node)
def setDeplie(self):
+ #print ('je passe ds setDeplie de groupe')
self.node.setDeplie()
- if self.editor.code== 'MT' and (self.maCommande.obj.nom == "ZONE") :
- #if (len(self.node.item.getGenealogie())==2):
- index=self.parentQt.commandesLayout.indexOf(self)
- self.maCommande.reafficheSeulement(self,index)
- return
- #else :
- # self.reaffiche(self.node)
- #return
- #print ('je reaffiche dans Plie')
self.reaffiche(self.node)
#print "dans mousePressEvent"
if self.parent.node.item.object.isValid() :
myToolTip=tr("objet valide")
- if self.parent.editor.configuration.differencieSiDefaut :
+ if self.parent.editor.maConfiguration.differencieSiDefaut :
if self.parent.node.item.object.valeur != self.parent.node.item.object.definition.defaut :
myToolTip+='\ndefaut : \n'+str(self.parent.node.item.object.definition.defaut)
"""
"""
def __init__(self,node,editor,parentQt,definition, obj, niveau,commande):
- #print "bloc : ",node.item.nom
+ #print ("bloc : ",node.item.nom)
Groupe.__init__(self,node,editor,parentQt, definition,obj,niveau,commande)
self.parentQt.commandesLayout.insertWidget(-1,self,1)
pass
def nomChange(self):
- print (1)
nom = str(self.LENom.text())
nom = nom.strip()
if nom == '' : return # si pas de nom, on ressort sans rien faire
- print (2)
test,mess = self.node.item.nommeSd(nom)
- print (test,mess)
self.editor.afficheCommentaire(mess)
- print (3)
#Notation scientifique
if test :
#print "delayAffiche, self.doitAfficherOptionnel = ", self.doitAfficherOptionnel
if self.doitAfficherOptionnel and self.editor.code != "CARMELCND" :self.afficheOptionnel()
+
class MonWidgetFact(Ui_WidgetFact,MonWidgetFactCommun):
def __init__(self,node,editor,parentQt,definition, obj, niveau,commande,insertIn=True):
MonWidgetFactCommun.__init__(self,node,editor,parentQt, definition,obj,niveau,commande,insertIn)
"""
def __init__(self,node,editor,parentQt,definition, obj, niveau,commande,insertIn=-1):
#print "fact plie : ",node.item.nom
+ node.fenetreAAfficher=self
Groupe.__init__(self,node,editor,parentQt, definition,obj,niveau,commande)
self.groupBox.setText(self.node.item.getLabelText()[0])
self.parentQt.commandesLayout.insertWidget(insertIn,self)
"""
"""
def __init__(self,node,editor,definition,obj):
- #QWidget.__init__(self,editor)
- #self.setupUi(self)
self.listeAffichageWidget=[]
Groupe.__init__(self,node,editor,None,definition,obj,1,self)
+ self.afficheOptionnel()
def reaffiche(self,nodeAVoir=None):
- print ('PNPNPN a programmer')
-#
-# self.listeAffichageWidget=[]
-# self.inhibe=0
-# self.ensure=0
-# editor.inhibeSplitter=1
-# editor.inhibeSplitter=0
-#
-# self.frameAffichage.setMinimumHeight(20)
-# if node.item.getFr() != "" : self.labelDoc.setText(node.item.getFr())
-# else :
-# self.labelDoc.close()
-# self.frameAffichage.resize(self.frameAffichage.width(),50)
-#
-# #if (etape.getType_produit()==None): self.LENom.close()
-# #test,mess = self.node.item.nommeSd('ee')
-# if not(hasattr(etape.definition,'sd_prod')) or (etape.definition.sd_prod==None): self.LENom.close()
-# elif (hasattr(etape.definition,'sd_prod') and type(etape.definition.sd_prod)== types.FunctionType):self.LENom.close()
-# elif (hasattr(etape, 'sdnom')) and etape.sdnom != "sansnom" and etape.sdnom != None: self.LENom.setText(etape.sdnom)
-# else : self.LENom.setText("")
-#
-#
-# maPolice= QFont("Times", 10,)
-# self.setFont(maPolice)
-# self.labelNomCommande.setText(tr(self.obj.nom))
-#
-#
-# if self.editor.maConfiguration.closeAutreCommande == True : self.closeAutreCommande()
-# else :
-# try :
-# self.bCatalogue.clicked.connect(self.afficheCatalogue)
-# self.bAvant.clicked.connect(self.afficheAvant)
-# self.bApres.clicked.connect(self.afficheApres)
-# except :
-# pass
-# self.LENom.returnPressed.connect(self.nomChange)
-#
-# if self.editor.code in ['Adao','ADAO'] and self.editor.closeFrameRechercheCommande==True :
-# self.frameAffichage.close()
-#
-# if self.editor.code in ['CARMELCND',] : self.closeAutreCommande()
-# self.racine=self.node.tree.racine
-# if self.node.item.getIconName() == "ast-red-square" : self.LENom.setDisabled(True)
-#
-# self.setAcceptDrops(True)
-# self.etablitOrdre()
-#
-# if self.editor.code == "CARMELCND" :
-# self.RBPoubelle.close() # JDC Fige
-# return # Pas de MC Optionnels pour Carmel
-#
-# from .monWidgetOptionnel import MonWidgetOptionnel
-# if self.editor.widgetOptionnel!= None :
-# self.monOptionnel=self.editor.widgetOptionnel
-# else :
-# self.editor.inhibeSplitter=1
-# self.monOptionnel=MonWidgetOptionnel(self.editor)
-# self.editor.widgetOptionnel=self.monOptionnel
-# self.editor.splitter.addWidget(self.monOptionnel)
-# self.editor.ajoutOptionnel()
-# self.editor.inhibeSplitter=0
-# self.afficheOptionnel()
-# #self.editor.restoreSplitterSizes()
-#
-# #print "fin init de widget Commande"
-#
-#
-# def closeAutreCommande(self):
-# self.bCatalogue.close()
-# self.bAvant.close()
-# self.bApres.close()
-#
-# def donnePremier(self):
-# #print "dans donnePremier"
-# QApplication.processEvents()
-# if self.listeAffichageWidget != [] :
-# self.listeAffichageWidget[0].setFocus(7)
-# QApplication.processEvents()
-# #print self.focusWidget()
-#
-#
-# def focusNextPrevChild(self, next):
-# # on s assure que ce n est pas un chgt de fenetre
-# #print "je passe dans focusNextPrevChild"
-# if self.editor.fenetreCentraleAffichee != self : return True
-# f=self.focusWidget()
-# if f not in self.listeAffichageWidget :
-# i=0
-# while not hasattr (f,'AAfficher') :
-# if f==None :i=-1; break
-# f=f.parentWidget()
-# if hasattr(f,'AAfficher') : f=f.AAfficher
-# if i != -1 : i=self.listeAffichageWidget.index(f)
-# else :i=self.listeAffichageWidget.index(f)
-# if (i==len(self.listeAffichageWidget) -1) and next and not self.inhibe:
-# try :
-# self.listeAffichageWidget[1].setFocus(7)
-# w=self.focusWidget()
-# self.inhibe=1
-# w.focusPreviousChild()
-# self.inhibe=0
-# return True
-# except :
-# pass
-# #print self.listeAffichageWidget
-# #print "souci ds focusNextPrevChild"
-# if i==0 and next==False and not self.inhibe:
-# if hasattr(self.editor.fenetreCentraleAffichee,'scrollArea'):
-# self.editor.fenetreCentraleAffichee.scrollArea.ensureWidgetVisible(self.listeAffichageWidget[-1])
-# self.listeAffichageWidget[-2].setFocus(7)
-# self.inhibe=1
-# w=self.focusWidget()
-# w.focusNextChild()
-# self.inhibe=0
-# return True
-# if i==0 and next==True and not self.inhibe:
-# self.listeAffichageWidget[0].setFocus(7)
-# self.inhibe=1
-# w=self.focusWidget()
-# w.focusNextChild()
-# self.inhibe=0
-# return True
-# if i>0 and next==False and not self.inhibe:
-# if isinstance(self.listeAffichageWidget[i-1],QRadioButton):
-# self.listeAffichageWidget[i-1].setFocus(7)
-# return True
-# return QWidget.focusNextPrevChild(self, next)
-#
-# def etablitOrdre(self):
-# i=0
-# while(i +1 < len(self.listeAffichageWidget)):
-# self.setTabOrder(self.listeAffichageWidget[i],self.listeAffichageWidget[i+1])
-# i=i+1
-# # si on boucle on perd l'ordre
-#
-# def afficheNieme(self,n):
-# #print ('ds afficheNieme')
-# self.listeAffichageWidget[n].setFocus(7)
-#
-# def afficheSuivant(self,f):
-# #print ('ds afficheSuivant')
-# try :
-# i=self.listeAffichageWidget.index(f)
-# next=i+1
-# except :
-# next=1
-# if (next==len(self.listeAffichageWidget) ): next =0
-# #self.f=next
-# #QTimer.singleShot(1, self.rendVisible)
-# try :
-# self.listeAffichageWidget[next].setFocus(7)
-# except :
-# pass
-#
-#
-# def afficheOptionnel(self):
-# # N a pas de parentQt. doit donc etre redefini
-# liste,liste_rouge=self.ajouteMCOptionnelDesBlocs()
-# #print "dans afficheOptionnel", self.monOptionnel
-# # dans le cas ou l insertion n a pas eu leiu (souci d ordre par exemple)
-# #if self.monOptionnel == None : return
-# self.monOptionnel.parentCommande=self
-# self.monOptionnel.titre(self.obj.nom)
-# self.monGroupe=self.monOptionnel.afficheOptionnel(liste,liste_rouge,self)
-#
-#
-# def focusInEvent(self,event):
-# #print "je mets a jour dans focusInEvent de monWidget Commande "
-# if self.editor.code == "CARMELCND" : return #Pas de MC Optionnels pour Carmel
-# self.afficheOptionnel()
-#
-#
-# def reaffiche(self,nodeAVoir=None):
-# # Attention delicat. les appels de fonctions ne semblent pas pouvoir etre supprimes!
-# self.avantH=self.editor.fenetreCentraleAffichee.scrollAreaCommandes.horizontalScrollBar().sliderPosition()
-# self.avantV=self.editor.fenetreCentraleAffichee.scrollAreaCommandes.verticalScrollBar().sliderPosition()
-# self.inhibeExpand=True
-# self.node.affichePanneau()
-# #QTimer.singleShot(1, self.recentre)
-# if nodeAVoir != None and nodeAVoir!=0:
-# self.f=nodeAVoir.fenetre
-# if self.f==None :
-# newNode=nodeAVoir.treeParent.chercheNoeudCorrespondant(nodeAVoir.item.object)
-# self.f = newNode.fenetre
-# if self.f != None and self.f.isVisible() : self.inhibeExpand=False; return
-# if self.f != None : self.rendVisible()
-# else : self.recentre()
-# else : self.recentre()
-# self.inhibeExpand=False
-#
-# def reafficheSeulement(self,nodeAReafficher,index):
-# #print ('ds reafficheSeulement', nodeAReafficher)
-# parentNodeAReafficher=nodeAReafficher.parentQt
-# index=parentNodeAReafficher.commandesLayout.indexOf(nodeAReafficher)
-# oldFenetre=nodeAReafficher.node.fenetre
-# newWidget=nodeAReafficher.node.getPanelGroupe(parentNodeAReafficher,self,index)
-# nodeAReafficher.node.fenetre=newWidget
-# oldFenetre.setParent(None)
-# oldFenetre.close()
-# oldFenetre.deleteLater()
-# #print ("fin pour " , self.node.item.nom)
-#
-#
-# def recentre(self):
-# QApplication.processEvents()
-# s=self.editor.fenetreCentraleAffichee.scrollAreaCommandes
-# s.horizontalScrollBar().setSliderPosition(self.avantH)
-# s.verticalScrollBar().setSliderPosition(self.avantV)
-#
-# def rendVisibleNoeud(self,node):
-# self.f=node.fenetre
-# #print "dans rendVisibleNoeud",self.f
-# QTimer.singleShot(1, self.rendVisible)
-#
-# def rendVisible(self):
-# #print "dans rendVisible",self.f
-# QApplication.processEvents()
-# self.f.setFocus(7)
-# self.editor.fenetreCentraleAffichee.scrollAreaCommandes.ensureWidgetVisible(self.f)
-#
-# def afficheCatalogue(self):
-# if self.editor.widgetOptionnel != None : self.monOptionnel.hide()
-# self.racine.affichePanneau()
-# if self.node : self.node.select()
-# else : self.racine.select()
-#
-# def afficheApres(self):
-# self.node.selectApres()
-#
-# def afficheAvant(self):
-# self.node.selectAvant()
-#
-# def setValide(self):
-# if not(hasattr (self,'RBValide')) : return
-# icon = QIcon()
-# if self.node.item.object.isValid() :
-# icon=QIcon(self.repIcon+"/ast-green-ball.png")
-# else :
-# icon=QIcon(self.repIcon+"/ast-red-ball.png")
-# if self.node.item.getIconName() == "ast-yellow-square" :
-# icon=QIcon(self.repIcon+"/ast-yel-ball.png")
-# self.LENom.setDisabled(False)
-# if self.node.item.getIconName() == "ast-red-square" : self.LENom.setDisabled(True)
-# self.RBValide.setIcon(icon)
-#
+ self.node.setDeplieChildren()
+ self.node.afficheCeNiveau()
+ self.editor.fenetreCentraleAffichee.labelDoc.setText(self.node.item.getFr())
+ self.editor.fenetreCentraleAffichee.labelNomCommande.setText(self.node.item.getLabelText()[0])
+
+ def getPanel(self):
+ # necessaire pour handleOnItem de browser.py
+ # non appele
+ pass
+
+ def donnePremier(self):
+ #print "dans donnePremier"
+ QApplication.processEvents()
+ if self.listeAffichageWidget != [] :
+ self.listeAffichageWidget[0].setFocus(7)
+ QApplication.processEvents()
+ #print self.focusWidget()
+
+
+ def focusNextPrevChild(self, next):
+ # on s assure que ce n est pas un chgt de fenetre
+ #print "je passe dans focusNextPrevChild"
+ if self.editor.fenetreCentraleAffichee != self : return True
+ f=self.focusWidget()
+
+ if f not in self.listeAffichageWidget :
+ i=0
+ while not hasattr (f,'AAfficher') :
+ if f==None :i=-1; break
+ f=f.parentWidget()
+ if hasattr(f,'AAfficher') : f=f.AAfficher
+ if i != -1 : i=self.listeAffichageWidget.index(f)
+ else :i=self.listeAffichageWidget.index(f)
+ if (i==len(self.listeAffichageWidget) -1) and next and not self.inhibe:
+ try :
+ self.listeAffichageWidget[1].setFocus(7)
+ w=self.focusWidget()
+ self.inhibe=1
+ w.focusPreviousChild()
+ self.inhibe=0
+ return True
+ except : pass
+
+ if i==0 and next==False and not self.inhibe:
+ if hasattr(self.editor.fenetreCentraleAffichee,'scrollArea'):
+ self.editor.fenetreCentraleAffichee.scrollArea.ensureWidgetVisible(self.listeAffichageWidget[-1])
+ self.listeAffichageWidget[-2].setFocus(7)
+ self.inhibe=1
+ w=self.focusWidget()
+ w.focusNextChild()
+ self.inhibe=0
+ return True
+
+ if i==0 and next==True and not self.inhibe:
+ self.listeAffichageWidget[0].setFocus(7)
+ self.inhibe=1
+ w=self.focusWidget()
+ w.focusNextChild()
+ self.inhibe=0
+ return True
+
+ if i>0 and next==False and not self.inhibe:
+ if isinstance(self.listeAffichageWidget[i-1],QRadioButton):
+ self.listeAffichageWidget[i-1].setFocus(7)
+ return True
+ return QWidget.focusNextPrevChild(self, next)
+
+ def etablitOrdre(self):
+ # si on boucle on perd l'ordre
+ i=0
+ while(i +1 < len(self.listeAffichageWidget)):
+ self.setTabOrder(self.listeAffichageWidget[i],self.listeAffichageWidget[i+1])
+ i=i+1
+
+ def afficheSuivant(self,f):
+ #print ('ds afficheSuivant')
+ try :
+ i=self.listeAffichageWidget.index(f)
+ next=i+1
+ except :
+ next=1
+ if (next==len(self.listeAffichageWidget) ): next =0
+ try :
+ self.listeAffichageWidget[next].setFocus(7)
+ except :
+ pass
+
+
+ def afficheOptionnel(self):
+ # N a pas de parentQt. doit donc etre redefini
+ #print ('ds afficheOptionnel')
+ if self.editor.widgetOptionnel!= None :
+ self.monOptionnel=self.editor.widgetOptionnel
+ else :
+ self.editor.inhibeSplitter=1
+ self.monOptionnel=MonWidgetOptionnel(self.editor)
+ self.editor.widgetOptionnel=self.monOptionnel
+ self.editor.splitter.addWidget(self.monOptionnel)
+ self.editor.ajoutOptionnel()
+ self.editor.inhibeSplitter=0
+ self.monOptionnel.vireTous()
+
+
+ liste,liste_rouge=self.ajouteMCOptionnelDesBlocs()
+ self.monOptionnel.parentCommande=self
+ self.monOptionnel.titre(self.obj.nom)
+ self.monGroupe=self.monOptionnel.afficheOptionnel(liste,liste_rouge,self)
+
+
del self.dicoMCWidgetOptionnel[k]
#print( "fin vireLesAutres")
+ def vireTous(self):
+ for k in list(self.dicoMCWidgetOptionnel.keys()):
+ self.dicoMCWidgetOptionnel[k].close()
+ del self.dicoMCWidgetOptionnel[k]
+
def afficheOptionnelVide(self):
self.GeneaLabel.setText("")
for k in list(self.dicoMCWidgetOptionnel.keys()):
if not validite and commentaire is None:
commentaire = "impossible d'evaluer : %s " %repr(valeurentree)
- print ('ds testeUneValeur', valeur, validite, commentaire)
+ #print ('ds testeUneValeur', valeur, validite, commentaire)
return valeur, validite, commentaire
# ----------------------------------------------------------------------------------------
if self.maConfiguration.boutonDsMenuBar == False : return
if not hasattr(self, 'readercata') : return
from monLayoutBouton import MonLayoutBouton
- if hasattr(self,'monLayoutBoutonRempli') :
- print ('double passage dans le readerCata')
- self.monLayoutBoutonRempli.close()
+ if hasattr(self,'monLayoutBoutonRempli') : return
self.monLayoutBoutonRempli=MonLayoutBouton(self)
- #for
- #self.toolBarCommande.close()
def handleAjoutEtape(self,nomEtape):
self.viewmanager.handleAjoutEtape(nomEtape)
self.cata=(self.cata,)
self.titre=self.VERSION_EFICAS+" "+tr( " avec le catalogue ") + os.path.basename(self.fic_cata)
- if self.appliEficas.ssIhm == False :
- self.appliEficas.setWindowTitle(self.titre)
+ if self.appliEficas.ssIhm == False : self.appliEficas.setWindowTitle(self.titre)
self.appliEficas.titre=self.titre
self.QWParent.titre=self.titre
Pour chaque entite du catlogue on cree une liste de nom ordre_mc qui
contient le nom des mots cles dans le bon ordre
"""
- self.cata_ordonne_dico,self.appliEficas.liste_simp_reel=autre_analyse_cata.analyseCatalogue(self.cata)
+ self.cata_ordonne_dico, self.appliEficas.liste_simp_reel=autre_analyse_cata.analyseCatalogue(self.cata)
def retrouveOrdreCataStandard(self):
"""
--- /dev/null
+# -*- coding: utf-8 -*-
+# Copyright (C) 2007-2013 EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+"""
+ Ce module sert a lire un catalogue et a construire
+ un objet CataItem pour Eficas.
+ Il s'appuie sur la classe READERCATA
+"""
+# Modules Python
+import sys, os
+sys.path.insert(0,os.path.abspath(os.path.join(os.getcwd(),'..','EssaiInit',)))
+import autre_analyse_cata
+
+
+# Modules Eficas
+
+from monChoixCata import MonChoixCata
+from Extensions.i18n import tr
+from Extensions.eficas_exception import EficasException
+import uiinfo
+
+
+class READERCATA:
+
+ def __init__(self,QWParent, appliEficas):
+ self.QWParent=QWParent
+ self.appliEficas=appliEficas
+ self.VERSION_EFICAS=self.appliEficas.VERSION_EFICAS
+ self.code=self.appliEficas.code
+ self.ssCode=self.appliEficas.ssCode
+ self.appliEficas.format_fichier='python'
+ self.appliEficas.format_fichier_in ='xml'
+ self.modeNouvCommande=self.appliEficas.maConfiguration.modeNouvCommande
+ self.versionCode=self.appliEficas.versionCode
+ self.version_cata=None
+ self.fic_cata=None
+ self.OpenCata()
+ self.cataitem=None
+ self.titre='Eficas XML'
+ self.Ordre_Des_Commandes=None
+ self.Classement_Commandes_Ds_Arbre=()
+
+ #self.traiteIcones()
+ #self.creeDicoInverse()
+
+
+ def OpenCata(self):
+
+ self.fic_cata = 'Cata_MED_FAM.xml'
+
+ import readerEfficas
+ xml = open('/home/A96028/QT5GitEficasTravail/XMLEficas/EssaiInit/Cata_MED_FAM.xml').read()
+ SchemaMed = readerEfficas.efficas.CreateFromDocument(xml)
+ SchemaMed.exploreCata()
+ self.cata=(SchemaMed,)
+ uiinfo.traite_UIinfo(self.cata[0])
+ self.Commandes_Ordre_Catalogue=[]
+ self.cata_ordonne_dico,self.appliEficas.liste_simp_reel=autre_analyse_cata.analyseCatalogue(self.cata[0])
+ self.liste_groupes=None
+
+
self.dict_commandes_mesScripts=self.appliEficas.mesScripts[self.editor.code].dict_commandes
if self.tree.currentItem().item.getNom() in self.dict_commandes_mesScripts :
self.ajoutScript()
- if self.appliEficas.code == 'MT' :
- item=self
- depth=0
- while(item!=None) :
- depth = depth+1
- item = item.parent()
- if depth != 3 : return
- from InterfaceQT4 import composimp
- if (isinstance(self,composimp.Node)) : return
- label=('Deplie ce niveau')
- self.actionDeplie=QAction(label,self.tree)
- self.actionDeplie.triggered.connect(self.deplieCeNiveau)
- self.menu.addAction(self.actionDeplie)
def ajoutScript(self):
-
# cochon mais je n arrive pas a faire mieux avec le mecanisme de plugin
# a revoir avec un menu et un connect sur le triggered sur le menu ?
if hasattr(self.appliEficas, 'mesScripts'):
+++ /dev/null
-# coding: utf-8\r
-import types\r
-from Accas import *\r
-\r
-class grno(GEOM):\r
- """\r
- Classe servant à définir le nom d'un groupe de noeuds dans le fichier de commande\r
- En clair : un chaine de longueur 24.\r
- """\r
- def __convert__(cls,valeur):\r
- """\r
- Fonction de verification de la longueur de la chaine\r
- """\r
- if isinstance(valeur, (str,unicode)) and len(valeur.strip()) <= 24:\r
- return valeur.strip()\r
- raise ValueError(_(u'On attend une chaine de caractères (de longueur <= 24).'))\r
- __convert__ = classmethod(__convert__)\r
-\r
-class grma(GEOM):\r
- """\r
- Classe servant à définir le nom d'un groupe de mailles dans le fichier de commande\r
- En clair : un chaine de longueur 24.\r
- """\r
- def __convert__(cls,valeur):\r
- """\r
- Fonction de verification de la longueur de la chaine\r
- """\r
- if isinstance(valeur, (str,unicode)) and len(valeur.strip()) <= 24:\r
- return valeur.strip()\r
- raise ValueError(_(u'On attend une chaine de caractères (de longueur <= 24).'))\r
- __convert__ = classmethod(__convert__)\r
-\r
-\r
-class Tuple:\r
- def __init__(self,ntuple):\r
- self.ntuple=ntuple\r
-\r
- def __convert__(self,valeur):\r
- if type(valeur) == types.StringType: return None\r
- if len(valeur) != self.ntuple: return None\r
- return valeur\r
-\r
- def info(self):\r
- return "Tuple de %s elements" % self.ntuple\r
-\r
- __repr__=info\r
- __str__=info\r
-\r
-class ObjetUtilisateur(ASSD): pass\r
-\r
-\r
-JdC = JDC_CATA(code='PATTERNS',\r
- execmodul=None,\r
- )\r
-\r
-\r
-EXAMPLE = PROC (nom = 'EXAMPLE',\r
- op=None,\r
-\r
- TITRE = SIMP(statut ='o', typ = 'TXM', defaut = 'Mon Etude',),\r
- TITRE2 = SIMP(statut ='f', typ = 'TXM', ),\r
-)\r
-CREEOBJET = OPER (nom="CREEOBJET",\r
- op=None,\r
- sd_prod=ObjetUtilisateur,\r
- UIinfo={"groupes":("Group1",)},\r
-\r
- TITLE = SIMP(statut ='o', typ = 'TXM', defaut = '',),\r
- RB1 = SIMP(statut ='o', typ = 'I', into = [1,2,3],),\r
- RB2 = SIMP(statut ='o', typ = 'I', into = [1,2,3,4,5,6,],),\r
- CB = SIMP(statut ='o', typ = 'I', into = [1,2,3,4,5,6,7,8,9],),\r
- MBool = SIMP(statut ='o', typ = bool,),\r
- MFile = SIMP(statut ='o', typ = ('Fichier','All Files (*)')),\r
- MDir = SIMP(statut ='o', typ = 'Repertoire'),\r
- Reel1 = SIMP(statut ='o', typ = 'R'),\r
- Compl = SIMP(statut ='o', typ = 'C'),\r
- Tuple2 = SIMP(statut ='o', typ = Tuple(2), validators=VerifTypeTuple(('R','R'))),\r
- Tuple3 = SIMP(statut ='o', typ = Tuple(3), validators=VerifTypeTuple(('R','R','R'))),\r
- InSalome = SIMP(statut ='o', typ = SalomeEntry),\r
-\r
- LTITLE = SIMP(statut ='o', typ = 'TXM', max='**', defaut = '',),\r
- LRB2 = SIMP(statut ='o', typ = 'I', max = '**', into = [1,2,3,4,5,6,],),\r
- LCB = SIMP(statut ='o', typ = 'I', max = '**', homo="SansOrdreNiDoublon", into = [1,2,3,4,5,6,7,8,9],),\r
- LReel1 = SIMP(statut ='o', typ = 'R', max = "**"),\r
- LCompl = SIMP(statut ='o', typ = 'C', max = "**"),\r
- LTuple2 = SIMP(statut ='o', typ = Tuple(2), validators=VerifTypeTuple(('R','R')), max = "**"),\r
- LTuple3 = SIMP(statut ='o', typ = Tuple(3), validators=VerifTypeTuple(('R','R','R')), max = "**"),\r
- LInSalome = SIMP(statut ='o', typ = SalomeEntry, max="**"),\r
-\r
- LREEL = SIMP(statut ='f', typ = 'R', max='**', defaut = '',),\r
-)\r
-\r
-UTILISEOBJET = PROC (nom="UTILISEOBJET",\r
- op=None,\r
- UIinfo={"groupes":("Group1",)},\r
- Obj = SIMP (statut ='o', typ = ObjetUtilisateur,)\r
-)\r
-\r
-ESSAI_FACT=OPER(nom="ESSAI_FACT",\r
- sd_prod=ObjetUtilisateur,\r
- op=None,\r
- fr="Affectation de caractéristiques à des éléments de structure",\r
- regles = (AU_MOINS_UN('Poutre','Barre'),\r
- EXCLUS('Discret','Discret_2D'),),\r
- Info = SIMP(statut='f',typ='I', defaut= 1 ,into=(1,2) ),\r
- Verif = SIMP(statut='f',typ='TXM',validators=NoRepeat(),max='**',into=("Maille","Noeud") ),\r
-#\r
-# ==============================================================================\r
- Poutre = FACT(statut= 'f',max= '**',\r
- Section = SIMP(statut= 'o',typ= 'TXM' ,into= ("GENERALE","RECTANGLE","CERCLE") ),\r
-\r
- b_generale = BLOC(condition = " Section == 'GENERALE'",\r
- regles = (UN_PARMI('Maille','GroupeMailles'),),\r
- Maille = SIMP(statut= 'f',typ= 'TXM' ,validators= NoRepeat(),max= '**'),\r
- GroupeMailles = SIMP(statut= 'f',typ= grma,validators= NoRepeat(),max= '**'),\r
-\r
- Vari = SIMP(statut= 'f',typ= 'TXM',into= ("CONSTANT","HOMOTHETIQUE"),defaut= "CONSTANT"),\r
-\r
- b_constant = BLOC(condition = "Vari == 'CONSTANT'",\r
- regles = (PRESENT_ABSENT('Table','Cara'),\r
- PRESENT_PRESENT('Table','Nom'),\r
- PRESENT_PRESENT('Cara','Valeur'),),\r
- Table = SIMP(statut= 'f',typ='TXM'),\r
- Nom = SIMP(statut= 'f',typ= 'TXM'),\r
- Cara = SIMP(statut= 'o',typ= 'TXM',min= 4 ,max= 5,\r
- fr= "A,IY,IZ,JX sont des paramètres obligatoires",\r
- validators= [NoRepeat(), Compulsory(['A','IY','IZ','JX'])],\r
- into= ("A","IY","IZ","AY","AZ","EY","EZ","JX","RY","RZ","RT","JG","IYR2","IZR2","AI") ),\r
- Valeur = SIMP(statut= 'f',typ= 'R',min= 4 ,max= 15),\r
- ),\r
- ),\r
- b_rectangle = BLOC(condition = "Section == 'RECTANGLE'",\r
- regles = (UN_PARMI('Maille','GroupeMailles'),),\r
- Maille = SIMP(statut= 'f',typ= 'TXM' ,validators= NoRepeat(),max= '**'),\r
- GroupeMailles = SIMP(statut= 'f',typ= grma,validators= NoRepeat(),max= '**'),\r
- Vari = SIMP(statut= 'f',typ= 'TXM',into= ("CONSTANT","HOMOTHETIQUE","AFFINE"),defaut= "CONSTANT"),\r
- b_constant = BLOC(condition = "Vari == 'CONSTANT'",\r
- Cara = SIMP(statut= 'o',typ= 'TXM',min= 1 ,max= 4,\r
- validators = [NoRepeat(),\r
- OrVal( [AndVal( [Compulsory(['H']),Absent(['HY','HZ','EPY','EPZ'])] ),\r
- AndVal( [Compulsory(['HY','HZ']),Together(['EPY','EPZ']),Absent(['H','EP'])] )] )],\r
- into= ("H","EP", "HY","HZ","EPY","EPZ"),),\r
- Valeur = SIMP(statut= 'o',typ= 'R',min= 1 ,max= 4),\r
- ),\r
-\r
- Metrique = SIMP(statut= 'f',typ= 'TXM',defaut= "NON",into= ("OUI","NON") ),\r
- Fcx = SIMP(statut= 'f',typ= 'R'),\r
- Tuyau = SIMP(statut= 'f',typ= 'I',val_max= 10,defaut= 3),\r
- ),\r
- ),\r
-#\r
-# ==============================================================================\r
- Barre = FACT(statut='f',max='**',\r
- regles = (UN_PARMI('Maille','GroupeMailles'),),\r
- Maille = SIMP(statut='f',typ='TXM' ,validators=NoRepeat(),max='**'),\r
- GroupeMailles = SIMP(statut='f',typ=grma,validators=NoRepeat(),max='**'),\r
- Section = SIMP(statut='o',typ='TXM',into=("GENERALE","RECTANGLE","CERCLE") ),\r
- b_generale = BLOC(condition = "Section=='GENERALE'",\r
- regles = (PRESENT_ABSENT('Table','Cara'),\r
- PRESENT_PRESENT('Table','Nom'),\r
- PRESENT_PRESENT('Cara','Valeur')),\r
- Table = SIMP(statut='f',typ='TXM'),\r
- Nom = SIMP(statut='f',typ='TXM',validators=LongStr(1,24) ),\r
- Cara = SIMP(statut='f',typ='TXM',into=("A",) ),\r
- Valeur = SIMP(statut='f',typ='R',min=1,max=1 ),\r
- ),\r
- b_rectangle = BLOC(condition = "Section=='RECTANGLE'",\r
- Cara = SIMP(statut='o',typ='TXM', min=1, max=4,\r
- validators = [NoRepeat(),\r
- OrVal( [AndVal( [Compulsory(['H']),Absent(['HY','HZ','EPY','EPZ'])] ),\r
- AndVal( [Compulsory(['HY','HZ']),Together(['EPY','EPZ']),Absent(['H','EP'])] )] )],\r
- into=("H","EP","HZ","HY","EPY","EPZ"), ),\r
- Valeur = SIMP(statut='o',typ='R',min=1,max=4 ), ),\r
- b_cercle = BLOC(condition = "Section=='CERCLE'",\r
- Cara = SIMP(statut='o',typ='TXM',validators=[NoRepeat(),Compulsory(['R'])],min=1,max=2,into=("R","EP") ),\r
- Valeur = SIMP(statut='o',typ='R',min=1,max=2 ), ),\r
- ),\r
-#\r
-# ==============================================================================\r
- Discret = FACT(statut='f',max='**',\r
- REPERE = SIMP(statut='f',typ='TXM',into=("LOCAL","GLOBAL") ),\r
- AMOR_HYST = SIMP(statut='f',typ='R' ),\r
- SYME = SIMP(statut='f',typ='TXM',defaut="OUI",into=("OUI","NON"),),\r
- b_SYME_OUI = BLOC(condition="SYME=='OUI'",\r
- fr="SYMETRIQUE: Affectation de matrices de rigidité, de masse ou d'amortissement à des mailles ou noeuds",\r
- Cara = SIMP(statut='o',typ='TXM',validators=NoRepeat(),max=1,defaut="None",\r
- into = ("K_T_D_N", "K_T_D_L", "K_TR_D_N", "K_TR_D_L", "K_T_N", "K_T_L", "K_TR_N", "K_TR_L",\r
- "M_T_D_N", "M_T_D_L", "M_TR_D_N", "M_TR_D_L", "M_T_N", "M_T_L", "M_TR_N", "M_TR_L",\r
- "A_T_D_N", "A_T_D_L", "A_TR_D_N", "A_TR_D_L", "A_T_N", "A_T_L", "A_TR_N", "A_TR_L",),),\r
- # Affection des caractéristiques de RIGIDITE/AMORTISSEMENT/MASSE\r
- b_AK_T_D_N = BLOC(condition = "((Cara=='K_T_D_N')or(Cara=='A_T_D_N'))",\r
- fr = "Noeud: 3 valeurs (triangulaire supérieure par colonne)",\r
- regles = (UN_PARMI('Maille','GroupeMailles','Noeud','GROUP_NO'),),\r
- Noeud = SIMP(statut='f',typ='TXM' ,validators=NoRepeat(),max='**'),\r
- GROUP_NO = SIMP(statut='f',typ=grno,validators=NoRepeat(),max='**'),\r
- Maille = SIMP(statut='f',typ='TXM' ,validators=NoRepeat(),max='**'),\r
- GroupeMailles = SIMP(statut='f',typ=grma,validators=NoRepeat(),homo='SansOrdreNiDoublon',max='**'),\r
- Valeur = SIMP(statut='o',typ='R',min=3 ,max=3 ),),\r
- ),\r
- ),\r
-#\r
-# ==============================================================================\r
- Discret_2D = FACT(statut='f',max='**',\r
- REPERE = SIMP(statut='f',typ='TXM',into=("LOCAL","GLOBAL") ),\r
- AMOR_HYST = SIMP(statut='f',typ='R' ),\r
- SYME = SIMP(statut='f',typ='TXM',defaut="OUI",into=("OUI","NON"),),\r
- ),\r
-)\r
-\r
-\r
+++ /dev/null
-# coding: utf-8\r
-\r
-from Accas import *\r
-\r
-#class myMesh(ASSD): pass\r
-class myModel(ASSD): pass\r
-\r
-JdC = JDC_CATA(code='PATTERNS',\r
- execmodul=None,\r
- regles=(#AU_PLUS_UN('DEBUT', 'POURSUITE'),\r
- AU_PLUS_UN('ALL_LISTS'),\r
- #AU_PLUS_UN('FIN'),\r
- A_CLASSER(('DEBUT', 'POURSUITE'), 'FIN')\r
- )\r
-)\r
-\r
-class grma():\r
- def __convert__(cls,valeur):\r
- if isinstance(valeur, (str,unicode)) and len(valeur.strip()) <= 24 : #and ("item" in (valeur.strip()))\r
- return valeur.strip()\r
- raise ValueError("Name length does not contain \"test\" and is longer than allowed, 24")\r
- __convert__ = classmethod(__convert__)\r
-\r
-def mySeveral(suffix,num):\r
- out=list()\r
- for i in range(1,num+1):\r
- out.append(suffix+str(i).zfill(2))\r
- return out\r
-\r
-switch_facultatif=True #change 'o' to 'f' of some widgets in the loop\r
-#empty_defauts=True\r
-\r
-def myBloc(num):\r
- myNum=str(num).zfill(2)\r
- list_item_body="Item_"+myNum+"_"\r
- defauts0=["","",True,"'phenomena_"+myNum+"'",mySeveral(list_item_body,2)] #presence of default values\r
- defauts_mask=[False,False,True,True,True] #switch off defaults of some types\r
- defauts=list()\r
- for id0 in range(len(defauts0)):\r
- if defauts_mask[id0]:\r
- item=", defaut="+str(defauts0[id0])\r
- else:\r
- item=""\r
- defauts.append(item)\r
- #print defauts\r
-\r
- opt=['o','o','o','o','o'] #initial default obligation of items in FACT groups\r
- #make different widgets optional, one by one:\r
- myLen=len(opt)\r
- if switch_facultatif:\r
- make_f=(num)%myLen\r
- opt[make_f]='f'\r
- #print opt\r
- #if empty_defauts:\r
- # clean_defaut=num%myLen\r
-\r
- 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'),),)"\r
- print myString\r
- return eval(myString)\r
-\r
-ALL_LISTS=OPER(nom="ALL_LISTS",op=18,sd_prod=myModel,\r
- UIinfo={"groupes":("Group1",)},\r
- ang="Model mesh definition EN",\r
- reentrant='n',\r
- #regles=(AU_MOINS_UN('LIST_O_CHECKTEXT','LIST_F_CHECKTEXT','LIST_O_ANY','LIST_F_ANY')),\r
-\r
- #LIST_O_NOREPEAT_CHECKTEXT=SIMP(statut='o',typ=grma,validators=NoRepeat(),min=3, max='**'),\r
- #LIST_F_NOREPEAT_CHECKTEXT=SIMP(statut='f',typ=grma,validators=NoRepeat(),min=3, max='**'),\r
- #LIST_F_REPEAT_CHECKTEXT=SIMP(statut='f',typ=grma,min=3, max='**'),\r
- #LIST_O_REPEAT_CHECKTEXT=SIMP(statut='o',typ=grma,min=3, max='**'),\r
-\r
- #LIST_F_NOREPEAT_ANYTEXT=SIMP(statut='f',typ='TXM',validators=NoRepeat(),min=3, max='**'),\r
- #LIST_O_NOREPEAT_ANYTEXT=SIMP(statut='o',typ='TXM',min=3,validators=NoRepeat(), max='**'),\r
- #LIST_O_REPEAT_ANYTEXT=SIMP(statut='o',typ='TXM',min=3, max='**'),\r
- #LIST_F_REPEAT_ANYTEXT=SIMP(statut='f',typ='TXM',min=3, max='**'),\r
-\r
- #LIST_O_NOREPEAT_CHECKTEXT_ADD=SIMP(statut='o',typ=grma,validators=NoRepeat(), into=("item01","text01","item02","text02","item03","text03",), min=3, max='**'),\r
- #LIST_F_REPEAT_ANYTEXT_ADD=SIMP(statut='f',typ=grma,validators=NoRepeat(), into=("item01","text01","item02","text02","item03","text03",), min=3, max='**'),\r
-\r
- 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='**'),\r
- #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='**'),\r
-)\r
-\r
-Classement_Commandes_Ds_Arbre=('DEBUT','MESH_TYPES','ALL_LISTS','FIN')\r
-\r
-Ordre_Des_Commandes = ('DEBUT','MESH_TYPES','ALL_LISTS','FIN')\r
+++ /dev/null
-# coding: utf-8\r
-from Accas import *\r
-\r
-#class myMesh(ASSD): pass\r
-class myModel(ASSD): pass\r
-\r
-JdC = JDC_CATA(code='PATTERNS',\r
- execmodul=None,\r
- regles=(#AU_PLUS_UN('DEBUT', 'POURSUITE'),\r
- AU_PLUS_UN('ALL_LISTS'),\r
- #AU_PLUS_UN('FIN'),\r
- A_CLASSER(('DEBUT', 'POURSUITE'), 'FIN')\r
- )\r
-)\r
-\r
-\r
-ALL_LISTS=OPER(nom="ALL_LISTS",op=18,sd_prod=myModel,\r
- UIinfo={"groupes":("Group1",)},\r
- ang="Model mesh definition EN",\r
- reentrant='n',\r
- LIST_O_NOREPEAT_CHECKTEXT_ADD_DEFAUT=SIMP(statut='o',typ="TXM",validators=NoRepeat(), \r
- into=("item01","text01","item02","text02","item03","text03","item04","text04","item05","text05",), \r
- defaut=('item01','item02','item03'),\r
- homo="SansOrdreNiDoublon",\r
- min=3, max='**'),\r
-\r
- #regles=(AU_MOINS_UN('LIST_O_CHECKTEXT','LIST_F_CHECKTEXT','LIST_O_ANY','LIST_F_ANY')),\r
-\r
- #LIST_O_NOREPEAT_CHECKTEXT=SIMP(statut='o',typ=grma,validators=NoRepeat(),min=3, max='**'),\r
- #LIST_F_NOREPEAT_CHECKTEXT=SIMP(statut='f',typ=grma,validators=NoRepeat(),min=3, max='**'),\r
- #LIST_F_REPEAT_CHECKTEXT=SIMP(statut='f',typ=grma,min=3, max='**'),\r
- #LIST_O_REPEAT_CHECKTEXT=SIMP(statut='o',typ=grma,min=3, max='**'),\r
-\r
- #LIST_F_NOREPEAT_ANYTEXT=SIMP(statut='f',typ='TXM',validators=NoRepeat(),min=3, max='**'),\r
- #LIST_O_NOREPEAT_ANYTEXT=SIMP(statut='o',typ='TXM',min=3,validators=NoRepeat(), max='**'),\r
- #LIST_O_REPEAT_ANYTEXT=SIMP(statut='o',typ='TXM',min=3, max='**'),\r
- #LIST_F_REPEAT_ANYTEXT=SIMP(statut='f',typ='TXM',min=3, max='**'),\r
-\r
- #LIST_O_NOREPEAT_CHECKTEXT_ADD=SIMP(statut='o',typ=grma,validators=NoRepeat(), into=("item01","text01","item02","text02","item03","text03",), min=3, max='**'),\r
- #LIST_F_REPEAT_ANYTEXT_ADD=SIMP(statut='f',typ=grma,validators=NoRepeat(), into=("item01","text01","item02","text02","item03","text03",), min=3, max='**'),\r
-\r
- #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='**'),\r
-\r
-\r
- #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='**'),\r
-)\r
-\r
-\r
-\r
-Classement_Commandes_Ds_Arbre=('DEBUT','MESH_TYPES','ALL_LISTS','FIN')\r
-\r
-Ordre_Des_Commandes = ('DEBUT','MESH_TYPES','ALL_LISTS','FIN')\r
+++ /dev/null
-# coding: utf-8\r
-from Accas import *\r
-\r
-class myModel(ASSD): pass\r
-\r
-JdC = JDC_CATA(code='PATTERNS',\r
- execmodul=None,\r
- regles=(#AU_PLUS_UN('DEBUT', 'POURSUITE'),\r
- AU_PLUS_UN('ALL_LISTS'),\r
- #AU_PLUS_UN('FIN'),\r
- A_CLASSER(('DEBUT', 'POURSUITE'), 'FIN')\r
- )\r
-)\r
-\r
-class grma():\r
- def __convert__(cls,valeur):\r
- if isinstance(valeur, (str,unicode)) and len(valeur.strip()) <= 12 and ("item" in (valeur.strip()).lower()): #\r
- return valeur.strip()\r
- raise ValueError("Name length does not contain \"test\" and is longer than allowed, 12")\r
- __convert__ = classmethod(__convert__)\r
-\r
-def mySeveral(suffix,num):\r
- out=list()\r
- for i in range(1,num+1):\r
- out.append(suffix+str(i).zfill(2))\r
- return out\r
-\r
-ALL_LISTS=OPER(nom="ALL_LISTS",op=18,sd_prod=myModel,\r
- UIinfo={"groupes":("Group1",)},\r
- fr="All lists definition FR",\r
- ang="All lists definition EN",\r
- reentrant='n',\r
- #regles=(AU_MOINS_UN('LIST_O_CHECKTEXT','LIST_F_CHECKTEXT','LIST_O_ANY','LIST_F_ANY')),\r
-\r
- L1_LIST_O_NOREPEAT_CHECKTEXT=SIMP(statut='o',typ=grma,validators=NoRepeat(),min=3, max='**', ang='Obligatory, No Repetitions, checked text, EN'),\r
- L2_LIST_F_NOREPEAT_CHECKTEXT=SIMP(statut='f',typ=grma,validators=NoRepeat(),min=3, max='**', ang='Optional, No Repetitions, checked text, EN'),\r
- L3_LIST_F_REPEAT_CHECKTEXT=SIMP(statut='f',typ=grma,min=3, max='**',ang='Optional, Allowed Repetitions, checked text, EN'),\r
- L4_LIST_O_REPEAT_CHECKTEXT=SIMP(statut='o',typ=grma,min=3, max='**',ang='Obligatory, Allowed Repetitions, checked text, EN'),\r
-\r
- L5_LIST_F_NOREPEAT_ANYTEXT=SIMP(statut='f',typ='TXM',validators=NoRepeat(),min=3, max='**',ang='Optional, No Repetitions, any text, EN'),\r
- L6_LIST_O_NOREPEAT_ANYTEXT=SIMP(statut='o',typ='TXM',min=3,validators=NoRepeat(), max='**',ang='Obligatory, No Repetitions, any text, EN'),\r
- L7_LIST_O_REPEAT_ANYTEXT=SIMP(statut='o',typ='TXM',min=3, max='**',ang='Obligatory, Allowed Repetitions, any text, EN'),\r
- L8_LIST_F_REPEAT_ANYTEXT=SIMP(statut='f',typ='TXM',min=3, max='**',ang='Optional, Allowed Repetitions, any text, EN'),\r
-\r
- 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',),\r
- 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'),\r
- 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='**'),\r
- 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'),\r
-\r
- 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'),\r
- 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'),\r
- 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'),\r
-)\r
-\r
-\r
-\r
-Classement_Commandes_Ds_Arbre=('DEBUT','MESH_TYPES','ALL_LISTS','FIN')\r
-\r
-Ordre_Des_Commandes = ('DEBUT','MESH_TYPES','ALL_LISTS','FIN')\r
+++ /dev/null
-# coding: utf-8\r
-from Accas import *\r
-\r
-class myModel(ASSD): pass\r
-\r
-JdC = JDC_CATA(code='PATTERNS',\r
- execmodul=None,\r
- regles=(#AU_PLUS_UN('DEBUT', 'POURSUITE'),\r
- AU_PLUS_UN('ALL_LISTS'),\r
- #AU_PLUS_UN('FIN'),\r
- A_CLASSER(('DEBUT', 'POURSUITE'), 'FIN')\r
- )\r
-)\r
-\r
-class grma():\r
- def __convert__(cls,valeur):\r
- if isinstance(valeur, (str,unicode)) and len(valeur.strip()) <= 12 and ("item" in (valeur.strip()).lower()): #\r
- return valeur.strip()\r
- raise ValueError("Name length does not contain \"item\" and is longer than allowed, 12")\r
- __convert__ = classmethod(__convert__)\r
-\r
-def mySeveral(suffix,num):\r
- out=list()\r
- for i in range(1,num+1):\r
- out.append(suffix+str(i).zfill(2))\r
- return out\r
-\r
-ALL_LISTS=OPER(nom="ALL_LISTS",op=18,sd_prod=myModel,\r
- UIinfo={"groupes":("Group1",)},\r
- fr="All lists definition FR",\r
- ang="All lists definition EN",\r
- reentrant='n',\r
- #regles=(AU_MOINS_UN('LIST_O_CHECKTEXT','LIST_F_CHECKTEXT','LIST_O_ANY','LIST_F_ANY')),\r
-\r
- L1_LIST_O_NOREPEAT_CHECKTEXT=SIMP(statut='o',typ=grma,validators=NoRepeat(),min=3, max='**', ang='Obligatory, No Repetitions, checked text, EN'),\r
- L2_LIST_F_NOREPEAT_CHECKTEXT=SIMP(statut='f',typ=grma,validators=NoRepeat(),min=3, max='**', ang='Optional, No Repetitions, checked text, EN'),\r
- L3_LIST_F_REPEAT_CHECKTEXT=SIMP(statut='f',typ=grma,min=3, max='**',ang='Optional, Allowed Repetitions, checked text, EN'),\r
- L4_LIST_O_REPEAT_CHECKTEXT=SIMP(statut='o',typ=grma,min=3, max='**',ang='Obligatory, Allowed Repetitions, checked text, EN'),\r
-\r
- L5_LIST_F_NOREPEAT_ANYTEXT=SIMP(statut='f',typ='TXM',validators=NoRepeat(),min=3, max='**',ang='Optional, No Repetitions, any text, EN'),\r
- L6_LIST_O_NOREPEAT_ANYTEXT=SIMP(statut='o',typ='TXM',min=3,validators=NoRepeat(), max='**',ang='Obligatory, No Repetitions, any text, EN'),\r
- L7_LIST_O_REPEAT_ANYTEXT=SIMP(statut='o',typ='TXM',min=3, max='**',ang='Obligatory, Allowed Repetitions, any text, EN'),\r
- L8_LIST_F_REPEAT_ANYTEXT=SIMP(statut='f',typ='TXM',min=3, max='**',ang='Optional, Allowed Repetitions, any text, EN'),\r
-\r
- 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',),\r
- 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'),\r
- 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='**'),\r
- 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'),\r
-\r
- 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'),\r
- 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'),\r
- 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(),\r
-)\r
-\r
-\r
-\r
-Classement_Commandes_Ds_Arbre=('DEBUT','MESH_TYPES','ALL_LISTS','FIN')\r
-\r
-Ordre_Des_Commandes = ('DEBUT','MESH_TYPES','ALL_LISTS','FIN')\r
+++ /dev/null
-# coding: utf-8\r
-from Accas import *\r
-\r
-class myModel(ASSD): pass\r
-\r
-JdC = JDC_CATA(code='PATTERNS',\r
- execmodul=None,\r
- regles=(#AU_PLUS_UN('DEBUT', 'POURSUITE'),\r
- AU_PLUS_UN('ALL_LISTS'),\r
- #AU_PLUS_UN('FIN'),\r
- A_CLASSER(('DEBUT', 'POURSUITE'), 'FIN')\r
- )\r
-)\r
-\r
-class grma():\r
- def __convert__(cls,valeur):\r
- if isinstance(valeur, (str,unicode)) and len(valeur.strip()) <= 12 and ("item" in (valeur.strip()).lower()): #\r
- return valeur.strip()\r
- raise ValueError("Name length does not contain \"test\" and is longer than allowed, 12")\r
- __convert__ = classmethod(__convert__)\r
-\r
-def mySeveral(suffix,num):\r
- out=list()\r
- for i in range(1,num+1):\r
- out.append(suffix+str(i).zfill(2))\r
- return out\r
-\r
-ALL_LISTS=OPER(nom="ALL_LISTS",op=18,sd_prod=myModel,\r
- UIinfo={"groupes":("Group1",)},\r
- fr="All lists definition FR",\r
- ang="All lists definition EN",\r
- reentrant='n',\r
- #regles=(AU_MOINS_UN('LIST_O_CHECKTEXT','LIST_F_CHECKTEXT','LIST_O_ANY','LIST_F_ANY')),\r
-\r
- L1_LIST_O_NOREPEAT_CHECKTEXT=SIMP(statut='o',typ=grma,validators=NoRepeat(),min=3, max='**', ang='Obligatory, No Repetitions, checked text, EN'),\r
- L2_LIST_F_NOREPEAT_CHECKTEXT=SIMP(statut='f',typ=grma,validators=NoRepeat(),min=3, max='**', ang='Optional, No Repetitions, checked text, EN'),\r
- L3_LIST_F_REPEAT_CHECKTEXT=SIMP(statut='f',typ=grma,min=3, max='**',ang='Optional, Allowed Repetitions, checked text, EN'),\r
- L4_LIST_O_REPEAT_CHECKTEXT=SIMP(statut='o',typ=grma,min=3, max='**',ang='Obligatory, Allowed Repetitions, checked text, EN'),\r
-\r
- L5_LIST_F_NOREPEAT_ANYTEXT=SIMP(statut='f',typ='TXM',validators=NoRepeat(),min=3, max='**',ang='Optional, No Repetitions, any text, EN'),\r
- L6_LIST_O_NOREPEAT_ANYTEXT=SIMP(statut='o',typ='TXM',min=3,validators=NoRepeat(), max='**',ang='Obligatory, No Repetitions, any text, EN'),\r
- L7_LIST_O_REPEAT_ANYTEXT=SIMP(statut='o',typ='TXM',min=3, max='**',ang='Obligatory, Allowed Repetitions, any text, EN'),\r
- L8_LIST_F_REPEAT_ANYTEXT=SIMP(statut='f',typ='TXM',min=3, max='**',ang='Optional, Allowed Repetitions, any text, EN'),\r
-\r
- 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',),\r
- 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'),\r
- 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='**'),\r
- 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'),\r
-\r
- 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'),\r
- 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'),\r
- 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'),\r
-)\r
-\r
-\r
-\r
-Classement_Commandes_Ds_Arbre=('DEBUT','MESH_TYPES','ALL_LISTS','FIN')\r
-\r
-Ordre_Des_Commandes = ('DEBUT','MESH_TYPES','ALL_LISTS','FIN')\r
+++ /dev/null
-# 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')
+++ /dev/null
-# 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')
+++ /dev/null
-# 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')
+++ /dev/null
-# 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')
+++ /dev/null
-# 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')
+++ /dev/null
-# 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" ),
-)
+++ /dev/null
-# 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',)
+++ /dev/null
-# 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',)
+++ /dev/null
-# 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',)
+++ /dev/null
-# 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',)
+++ /dev/null
-# 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',)
+++ /dev/null
-# 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',)
+++ /dev/null
-# 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',)
+++ /dev/null
-# 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',)
+++ /dev/null
-# 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',)
+++ /dev/null
-# 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',)
+++ /dev/null
-# 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',)
+++ /dev/null
-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"),),
- ),
-)
+++ /dev/null
-# 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'),
-);
-
+++ /dev/null
-# 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'),
- ),
- ),
- ),
-);
-
-
+++ /dev/null
-# -*- coding: utf-8 -*-\r
-# maConfiguration MANAGEMENT OF EDF VERSION\r
-# ======================================================================\r
-# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG\r
-# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY\r
-# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY\r
-# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR\r
-# (AT YOUR OPTION) ANY LATER VERSION.\r
-#\r
-# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT\r
-# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF\r
-# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU\r
-# GENERAL PUBLIC LICENSE FOR MORE DETAILS.\r
-#\r
-# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE\r
-# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER,\r
-# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE.\r
-#\r
-#\r
-# ======================================================================\r
-"""\r
- Ce module sert pour charger les paramètres de configuration d'EFICAS\r
-"""\r
-# Modules Python\r
-from InterfaceQT4 import configuration\r
-import os\r
-\r
-\r
-class CONFIG(configuration.configBase):\r
-\r
- #-----------------------------------\r
- def __init__(self,appli,repIni):\r
- #-----------------------------------\r
-\r
- self.labels_user=['catalogues','lang']\r
- self.labels_eficas=['lang','rep_cata','catalogues']\r
-\r
- configuration.configBase.__init__(self,appli,'.Eficas_monCode')\r
-\r
-\r
-def make_config(appli,rep):\r
- return CONFIG(appli,rep)\r
-\r
+++ /dev/null
-"4" "3" "2" "1"
-"4" "5" "6" "7"
\ No newline at end of file
+++ /dev/null
-#!/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.lanceEficas(code=prefs.code)
+++ /dev/null
-# Copyright (C) 2007-2012 EDF R&D
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
-#
-code="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__)))
+++ /dev/null
-# -*- coding: utf-8 -*-
-# maConfiguration MANAGEMENT OF EDF VERSION
-# ======================================================================
-# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG
-# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY
-# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY
-# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR
-# (AT YOUR OPTION) ANY LATER VERSION.
-#
-# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT
-# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF
-# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU
-# GENERAL PUBLIC LICENSE FOR MORE DETAILS.
-#
-# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE
-# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER,
-# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE.
-#
-#
-# ======================================================================
-
-import os,sys
-# repIni sert a localiser le fichier editeur.ini
-# Obligatoire
-repIni=os.path.dirname(os.path.abspath(__file__))
-INSTALLDIR=os.path.join(repIni,'..')
-sys.path[:0]=[INSTALLDIR]
-
-
-# lang indique la langue utilisee pour les chaines d'aide : fr ou ang
-lang='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')
-}
-
+++ /dev/null
-# -*- coding: utf-8 -*-
-# maConfiguration MANAGEMENT OF EDF VERSION
-# ======================================================================
-# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG
-# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY
-# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY
-# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR
-# (AT YOUR OPTION) ANY LATER VERSION.
-#
-# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT
-# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF
-# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU
-# GENERAL PUBLIC LICENSE FOR MORE DETAILS.
-#
-# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE
-# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER,
-# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE.
-#
-#
-# ======================================================================
-
-import os,sys
-# repIni sert a localiser le fichier editeur.ini
-# Obligatoire
-repIni=os.path.dirname(os.path.abspath(__file__))
-INSTALLDIR=os.path.join(repIni,'..')
-sys.path[:0]=[INSTALLDIR]
-
-
-# lang indique la langue utilisee pour les chaines d'aide : fr ou ang
-lang='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'),
-)
-
+++ /dev/null
-#@ MODIF properties Accas DATE 11/06/2008 AUTEUR aster M.ADMINISTRATEUR
-# RESPONSABLE D6BHHHH J-P.LEFEBVRE
-# ======================================================================
-# COPYRIGHT (C) 1991 - 2001 EDF R&D WWW.CODE-ASTER.ORG
-# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY
-# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY
-# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR
-# (AT YOUR OPTION) ANY LATER VERSION.
-#
-# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT
-# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF
-# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU
-# GENERAL PUBLIC LICENSE FOR MORE DETAILS.
-#
-# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE
-# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER,
-# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE.
-# ======================================================================
-# IDENTIFICATION DU GESTIONNAIRE DE COMMANDE ACCAS A PARTIR
-# DE LA VERSION DU CODE_ASTER ASSOCIE
-#----------------------------------------------------------------------
-version = "1.2"
-date = "25/05/2010"
-exploit = False
+++ /dev/null
-#!/usr/bin/env python
-# -*- coding: utf-8 -*-
-# Copyright (C) 2007-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.lanceEficas(code=prefs.code)
+++ /dev/null
-#!/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.lanceEficas(code=prefs.code)
+++ /dev/null
-Le script a débuté sur mar. 29 nov. 2016 15:37:06 CET
-\e]0;A96028@dsp0780471: ~/QT5GitEficasTravail/eficas/monCode\aA96028@dsp0780471:~/QT5GitEficasTravail/eficas/monCode$ ./qtEficas_Med.py /tmp/a.comm\b\b\b\b\b\boo.comm\r
-eficas_en /home/A96028/QT5GitEficasTravail/eficas/monCode/../Extensions/../UiQT4\r
-()\r
-{'typ': 'TXM', 'statut': 'o'}\r
-()\r
-{'typ': 'TXM', 'statut': 'o'}\r
-()\r
-{'typ': 'TXM', 'statut': 'o'}\r
-()\r
-{'max': 1, 'typ': 'I', 'statut': 'o'}\r
-()\r
-{'max': '**', 'typ': 'TXM', 'statut': 'o'}\r
-()\r
-{'max': '**', 'typ': 'I', 'statut': 'o'}\r
-()\r
-{'max': '**', 'typ': 'I', 'statut': 'o'}\r
-()\r
-{'NBR': <Accas.A_SIMP.SIMP instance at 0x7efbe6617b90>, 'IDE': <Accas.A_SIMP.SIMP instance at 0x7efbe6617c20>, 'DES': <Accas.A_SIMP.SIMP instance at 0x7efbe6617bd8>, 'VAL': <Accas.A_SIMP.SIMP instance at 0x7efbe6617c68>, 'statut': 'f'}\r
-()\r
-{'max': 1, 'typ': 'I', 'statut': 'o'}\r
-()\r
-{'max': '**', 'typ': 'TXM', 'statut': 'o'}\r
-()\r
-{'NOM': <Accas.A_SIMP.SIMP instance at 0x7efbe6617e18>, 'NBR': <Accas.A_SIMP.SIMP instance at 0x7efbe6617dd0>, 'statut': 'f'}\r
-()\r
-{'NAME': <Accas.A_SIMP.SIMP instance at 0x7efbe6617b48>, 'statut': 'f', 'max': '**', 'ATT': <Accas.A_FACT.FACT instance at 0x7efbe6617cb0>, 'NUM': <Accas.A_SIMP.SIMP instance at 0x7efbe6617b00>, 'GRO': <Accas.A_FACT.FACT instance at 0x7efbe6617e60>}\r
-()\r
-{'NAME': <Accas.A_SIMP.SIMP instance at 0x7efbe6617ab8>, 'ELEM': <Accas.A_FACT.FACT instance at 0x7efbe6617ea8>, 'statut': 'o'}\r
-()\r
-{'nom': 'FAS', 'FAMILY_MESH_NAME_REF': <Accas.A_FACT.FACT instance at 0x7efbe6617ef0>, 'op': None}\r
-\e]0;A96028@dsp0780471: ~/QT5GitEficasTravail/eficas/monCode\aA96028@dsp0780471:~/QT5GitEficasTravail/eficas/monCode$ exit\r
-
-Script terminé sur mar. 29 nov. 2016 15:37:13 CET
-
-
-
from Accas import *
#
reentrant = 'n',
UIinfo = {"groupes":("Machine tournante",)},
fr = "Description d'une zone (comportant noeuds et elements, et en option masses ponctuelles et fissures)",
- regles = (AU_MOINS_UN("ELEMENTS")),
+ fenetreIhm='deplie1Niveau',
+ #regles = (AU_MOINS_UN("ELEMENTS")),
+ regles=(AU_MOINS_UN('A1','B'),),
+ A1=SIMP(statut='f',typ='TXM',),
+ B=SIMP(statut='f',typ='TXM',),
MASSE = FACT(statut='f',
min=0,
max='**',
oldItem.select()
oldItem.supprimeNoeud()
+def import_zone_from_menu(editor,etape):
+ texte="ZONE(NOEUDS=(_F(NOM='N1',POSITION_AXIALE=0.0,), _F(NOM='N2',POSITION_AXIALE=0.1,), _F(NOM='N3',POSITION_AXIALE=0.2,), _F(NOM='N4',POSITION_AXIALE=0.3,),),),"
+ retour = editor.updateJdcAfterEtape(etape,texte)
+
+def import_ligne(listeparam):
+ print ('in import_ligne')
# le dictionnaire des commandes a la structure suivante :
# la clef est la commande qui va proposer l action
(view_zone,"View",('item',),False,True,"affiche dans Geom la representation de la zone "),
(import_zone,"import_zone",('editor','self'),False,False,"import de fichier zone"),)
}
+
+# le dictionnaire des menus a la structure suivante
+# la clef qui est le titre du menu
+# (pour l instant 1 seul menu) --> devlop si besoin de plusieurs menus
+# une liste de tuple
+#
+
+# Chaque tuple contient
+# - la fonction a appeler
+# - le label dans le menu
+# - un tuple contenant les parametres attendus par la fonction
+dict_menu = {
+ 'Ajout Elts' : (
+ #(import_zone,"import_zone",('editor','self'),False,False,"import de fichier zone"),
+ (import_zone_from_menu,"import_zone",('editor','etapeCourante'),),
+ (import_ligne,"import_ligne",('editor','etapeCourante'),),
+ )
+ }
catalogues=(
('MT','V2017',os.path.join(repIni,'MT_Cata_V2017.py'),'python','python'),
)
-#nombreDeBoutonParLigne=4
+nombreDeBoutonParLigne=4
simpleClic=True
closeFrameRechercheCommande=True
boutonDsMenuBar=True
self.fr = fr
self.ang = ang
self.docu = docu
+ self.fenetreIhm=None
if type(regles) == tuple:
self.regles = regles
else:
list_instance = N_MCLIST.MCList
label = 'FACT'
- def __init__(self, fr="", docu="", regles=(), statut='f', defaut=None,ang="",
+ def __init__(self, fr="", docu="", regles=(), statut='f', defaut=None,ang="",fenetreIhm=None,
min=0, max=1, validators=None, **args):
"""
Un mot-clé facteur est caractérisé par les attributs suivants :
- max
- position
- docu
+ - fenetreIhm
"""
N_ENTITE.ENTITE.__init__(self, validators)
# Initialisation des attributs
self.entites = args
self.position = None
self.affecter_parente()
+ self.fenetreIhm = fenetreIhm
def __call__(self, val, nom, parent):
"""
# courant à None
CONTEXT.unsetCurrentCata()
CONTEXT.setCurrentCata(self)
+ self.fenetreIhm=None
def __call__(self, procedure=None, cata=None, cata_ord_dico=None,
nom='SansNom', parent=None, **args):
nommage = nommage
def __init__(
- self, nom, op, sd_prod=None, reentrant='n', repetable='o', fr="",ang="",
+ self, nom, op, sd_prod=None, reentrant='n', repetable='o', fr="",ang="",fenetreIhm=None,
docu="", regles=(), op_init=None, niveau = None, fichier_ini=0, UIinfo=None, **args):
"""
Méthode d'initialisation de l'objet MACRO. Les arguments sont utilisés pour initialiser
self.ang=ang
self.repetable = repetable
self.docu = docu
+ self.fenetreIhm=fenetreIhm
if type(regles) == tuple:
self.regles = regles
else:
label = 'OPER'
nommage = nommage
- def __init__(self, nom, op, sd_prod, reentrant='n', repetable='o', fr="",ang="",
+ def __init__(self, nom, op, sd_prod, reentrant='n', repetable='o', fr="",ang="",fenetreIhm=None,
docu="", regles=(), op_init=None, niveau = None, UIinfo=None, **args):
"""
Méthode d'initialisation de l'objet OPER. Les arguments sont utilisés pour initialiser
self.ang = ang
self.repetable = repetable
self.docu = docu
+ self.fenetreIhm= fenetreIhm
if type(regles) == tuple:
self.regles = regles
else:
rangés par niveau. Ils apparaissent alors exclusivement dans leur niveau de rangement.
Si niveau vaut None, l'opérateur est rangé au niveau global.
+ - fenetreIhm : specification de la fenetre
+
- entites : dictionnaire dans lequel sont stockés les sous entités de l'opérateur. Il s'agit
des entités de définition pour les mots-clés : FACT, BLOC, SIMP. Cet attribut
est initialisé avec args, c'est à dire les arguments d'appel restants.
class_instance = N_PROC_ETAPE.PROC_ETAPE
label = 'PROC'
- def __init__(self, nom, op=None, reentrant='n', repetable='o', fr="",ang="",
+ def __init__(self, nom, op=None, reentrant='n', repetable='o', fr="",ang="", fenetreIhm=None,
docu="", regles=(), op_init=None, niveau = None, UIinfo=None, **args):
"""
Méthode d'initialisation de l'objet PROC. Les arguments sont utilisés pour initialiser
les attributs de meme nom
"""
- self.nom = nom
- self.op = op
- self.reentrant = reentrant
- self.repetable = repetable
- self.fr = fr
+ self.nom = nom
+ self.op = op
+ self.reentrant = reentrant
+ self.repetable = repetable
+ self.fenetreIhm = fenetreIhm
+ self.fr = fr
#self.ang=""
- self.ang=ang
- self.docu = docu
+ self.ang = ang
+ self.docu = docu
if type(regles) == tuple:
self.regles = regles
else:
self.regles = (regles,)
# Attribut op_init : Fonction a appeler a la construction de l
# operateur sauf si == None
- self.op_init = op_init
- self.entites = args
- current_cata = CONTEXT.getCurrentCata()
+ self.op_init = op_init
+ self.entites = args
+ current_cata = CONTEXT.getCurrentCata()
if niveau == None:
self.niveau = None
current_cata.enregistre(self)
def __init__(self, typ,ang="", fr="", statut='f', into=None, intoSug = None,siValide = None, defaut=None,
min=1, max=1, homo=1, position='local',
val_min=float('-inf'), val_max=float('inf'), docu="", validators=None,
- sug=None):
+ sug=None,fenetreIhm=None):
"""
Un mot-clé simple est caractérisé par les attributs suivants :
- type : cet attribut est obligatoire et indique le type de valeur attendue
- defaut : valeur par défaut
- min : nombre minimal de valeurs
- max : nombre maximal de valeurs
- - homo : ?
+ - homo : un certatin nb de choses qui il faut redispacher ailleurs (information, constant)
- ang : doc
- position : si global, le mot-clé peut-être lu n'importe où dans la commande
- val_min : valeur minimale autorisée
- val_max : valeur maximale autorisée
- - docu : ?
- - sug : ?
+ - docu : clef sur de la documentation utilisateur
+ - sug : valeur suggere
+ - fenetreIhm=None
"""
N_ENTITE.ENTITE.__init__(self, validators)
# Initialisation des attributs
if self.val_max == '**' : self.val_max = float('inf')
if self.min == '**' : self.min = float('-inf')
if self.val_min == '**' : self.val_min = float('-inf')
+ self.fenetreIhm=fenetreIhm
def verifCata(self):
"""
affiche = "ordre"
translatorFichier = os.path.join(repIni,'labelCataToIhm')
closeFrameRecherche=True
+differencieSiDefaut = True
jdcSet.add(commandcible)
#-----------------------------------------------------
-def fusionMotCleToFact(jdc,command,liste_mc,factcible,defaut=0):
+def fusionMotCleToFact(jdc,command,listeMc,factcible,defaut=0):
#-----------------------------------------------------
if command not in jdcSet : return
boolChange=0
list_val=[]
trouveUnMC=0
for mc in c.childNodes:
- if mc.name not in liste_mc : continue
+ if mc.name not in listeMc : continue
val=mc.getText(jdc).split("=")[1].split(",")[0]
list_val.append(val)
trouveUnMC=1
boolChange=1
if boolChange :
jdc.reset(jdc.getSource())
- for mc in liste_mc :
+ for mc in listeMc :
removemocle.removeMotCle(jdc,command,mc)
jdc.reset(jdc.getSource())
#-----------------------------------------------------
-def fusionMotCleInFact(jdc,command,fact,liste_mc,new_name,defaut=0):
+def fusionMotCleInFact(jdc,command,fact,listeMc,new_name,defaut=0):
#-----------------------------------------------------
if command not in jdcSet : return
boolChange=0
if mcF.name != fact: continue
for ll in mcF.childNodes[:]:
for mc in ll.childNodes:
- if mc.name not in liste_mc : continue
+ if mc.name not in listeMc : continue
val=mc.getText(jdc).split("=")[1].split(",")[0]
list_val.append(val)
trouveUnMC=1
boolChange=1
if boolChange :
jdc.reset(jdc.getSource())
- for mc in liste_mc :
+ for mc in listeMc :
removemocle.removeMotCleInFact(jdc,command,fact,mc)
jdc.reset(jdc.getSource())
#-----------------------------------------------------
-def fusionMCFToMCF(jdc,command,liste_mcf,factcible,defaut=0):
+def fusionMCFToMCF(jdc,command,listeMcF,factcible,defaut=0):
#-----------------------------------------------------
if command not in jdcSet : return
boolChange=0
esp1=' '*len(TexteMC)
pp=0
for mcF in c.childNodes:
- if mcF.name not in liste_mcf : continue
+ if mcF.name not in listeMcF : continue
trouveUnMC=1
val=mcF.getText(jdc)
# esp=esp1+(inseremocle.chercheDebutFacteur(jdc,mcF)-len(mcF.name))*' '
boolChange=1
if boolChange :
jdc.reset(jdc.getSource())
- for mcF in liste_mcf :
+ for mcF in listeMcF :
removemocle.removeMotCle(jdc,command,mcF)
jdc.reset(jdc.getSource())
removeMotCleInFact(jdc,"DEFI_MATERIAU","UMAT","NB_VALE",pasDeRegle(),0)
removeMotCleInFact(jdc,"DEFI_MATERIAU","UMAT_FO","NB_VALE",pasDeRegle(),0)
- liste_mc=["C"+str(i) for i in range(1,198)]
- fusionMotCleInFact(jdc,"DEFI_MATERIAU","UMAT",liste_mc,"LISTE_COEF")
- fusionMotCleInFact(jdc,"DEFI_MATERIAU","UMAT_FO",liste_mc,"LISTE_COEF")
+ listeMc=["C"+str(i) for i in range(1,198)]
+ fusionMotCleInFact(jdc,"DEFI_MATERIAU","UMAT",listeMc,"LISTE_COEF")
+ fusionMotCleInFact(jdc,"DEFI_MATERIAU","UMAT_FO",listeMc,"LISTE_COEF")
removeMotCle(jdc,"DEFI_MATERIAU","LABORD_1D",pasDeRegle(),0)
eficas_compile_ui ( desWidgetCommentaire.ui )
eficas_compile_ui ( desWidgetDate.ui )
eficas_compile_ui ( desWidgetFact.ui )
-eficas_compile_ui_2 ( desWidgetFactPlie.ui )
+eficas_compile_ui ( desWidgetFactPlie.ui )
+eficas_compile_ui ( desWidgetFactTableau.ui )
eficas_compile_ui ( desWidgetHeure.ui )
eficas_compile_ui ( desWidgetInactif.ui )
eficas_compile_ui ( desWidgetInformation.ui )
eficas_compile_ui ( desWidgetIntoSug.ui )
eficas_compile_ui ( desWidgetMatrice.ui )
+eficas_compile_ui ( desWidgetNiveauFact.ui )
eficas_compile_ui ( desWidgetParam.ui )
eficas_compile_ui ( desWidgetPlusieursBase.ui )
eficas_compile_ui ( desWidgetPlusieursInto.ui )
<height>669</height>
</rect>
</property>
- <layout class="QVBoxLayout" name="verticalLayout_4">
+ <layout class="QVBoxLayout" name="verticalLayoutCommande">
<property name="spacing">
<number>0</number>
</property>
</property>
<property name="icon">
<iconset>
- <normaloff>../Editeur/icons/plusnode.png</normaloff>../Editeur/icons/plusnode.png</iconset>
+ <normaloff>../Editeur/icons/plusnode.png</normaloff>
+ <disabledoff>../Editeur/icons/ast-red-ball.png</disabledoff>../Editeur/icons/plusnode.png</iconset>
</property>
<property name="iconSize">
<size>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>WidgetNiveauFact</class>
+ <widget class="QWidget" name="WidgetNiveauFact">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>1353</width>
+ <height>596</height>
+ </rect>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="windowTitle">
+ <string>DCommandeUnique</string>
+ </property>
+ <property name="toolTip">
+ <string/>
+ </property>
+ <property name="styleSheet">
+ <string notr="true">background-color : rgb(224,223,222);
+font : 'times' 9px</string>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout_4">
+ <property name="spacing">
+ <number>0</number>
+ </property>
+ <property name="leftMargin">
+ <number>0</number>
+ </property>
+ <property name="topMargin">
+ <number>0</number>
+ </property>
+ <property name="rightMargin">
+ <number>0</number>
+ </property>
+ <property name="bottomMargin">
+ <number>0</number>
+ </property>
+ <item>
+ <widget class="QWidget" name="frameAffichage" native="true">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>130</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>16777215</width>
+ <height>130</height>
+ </size>
+ </property>
+ <property name="styleSheet">
+ <string notr="true">background-color:rgb(224,223,222)</string>
+ </property>
+ <layout class="QGridLayout" name="gridLayout_2">
+ <property name="topMargin">
+ <number>2</number>
+ </property>
+ <property name="bottomMargin">
+ <number>3</number>
+ </property>
+ <property name="verticalSpacing">
+ <number>2</number>
+ </property>
+ <item row="0" column="0">
+ <widget class="QFrame" name="frame_2">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="frameShape">
+ <enum>QFrame::Box</enum>
+ </property>
+ <property name="frameShadow">
+ <enum>QFrame::Raised</enum>
+ </property>
+ <layout class="QHBoxLayout" name="horizontalLayout">
+ <property name="spacing">
+ <number>0</number>
+ </property>
+ <item>
+ <spacer name="horizontalSpacer_5">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>QSizePolicy::Fixed</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>13</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="MonBoutonValide" name="RBValide">
+ <property name="minimumSize">
+ <size>
+ <width>17</width>
+ <height>31</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>21</width>
+ <height>31</height>
+ </size>
+ </property>
+ <property name="focusPolicy">
+ <enum>Qt::ClickFocus</enum>
+ </property>
+ <property name="toolTip">
+ <string>Affiche le rapport de validité de la commande</string>
+ </property>
+ <property name="styleSheet">
+ <string notr="true">border : 0px</string>
+ </property>
+ <property name="text">
+ <string>...</string>
+ </property>
+ <property name="icon">
+ <iconset>
+ <normaloff>../../../.designer/Editeur/icons/ast-green-ball.png</normaloff>../../../.designer/Editeur/icons/ast-green-ball.png</iconset>
+ </property>
+ <property name="iconSize">
+ <size>
+ <width>21</width>
+ <height>31</height>
+ </size>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <spacer name="horizontalSpacer_3">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>QSizePolicy::Fixed</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>13</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="MonLabelClic" name="labelNomCommande">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>150</width>
+ <height>31</height>
+ </size>
+ </property>
+ <property name="frameShape">
+ <enum>QFrame::NoFrame</enum>
+ </property>
+ <property name="frameShadow">
+ <enum>QFrame::Raised</enum>
+ </property>
+ <property name="text">
+ <string><html><head/><body><p><span style=" color:#0000ff;">commande </span></p></body></html></string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <spacer name="toto">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>QSizePolicy::Maximum</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>2</width>
+ <height>40</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <spacer name="horizontalSpacer_7">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>108</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <spacer name="horizontalSpacer_2">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>QSizePolicy::Ignored</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>2</width>
+ <height>40</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout_2">
+ <property name="spacing">
+ <number>4</number>
+ </property>
+ <property name="sizeConstraint">
+ <enum>QLayout::SetFixedSize</enum>
+ </property>
+ <item>
+ <widget class="QToolButton" name="RBRun">
+ <property name="minimumSize">
+ <size>
+ <width>21</width>
+ <height>31</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>21</width>
+ <height>31</height>
+ </size>
+ </property>
+ <property name="focusPolicy">
+ <enum>Qt::ClickFocus</enum>
+ </property>
+ <property name="toolTip">
+ <string>Lance un script associé à la commande</string>
+ </property>
+ <property name="styleSheet">
+ <string notr="true">border : 0px</string>
+ </property>
+ <property name="text">
+ <string>...</string>
+ </property>
+ <property name="icon">
+ <iconset>
+ <normaloff>../../../.designer/Editeur/icons/roue.png</normaloff>../../../.designer/Editeur/icons/roue.png</iconset>
+ </property>
+ <property name="iconSize">
+ <size>
+ <width>21</width>
+ <height>31</height>
+ </size>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QComboBox" name="CBScripts">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>38</height>
+ </size>
+ </property>
+ <property name="frame">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QToolButton" name="RBInfo">
+ <property name="minimumSize">
+ <size>
+ <width>21</width>
+ <height>31</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>31</width>
+ <height>31</height>
+ </size>
+ </property>
+ <property name="focusPolicy">
+ <enum>Qt::ClickFocus</enum>
+ </property>
+ <property name="toolTip">
+ <string>ouvre un navigateur sur l'aide contextuelle</string>
+ </property>
+ <property name="styleSheet">
+ <string notr="true">border : 0px</string>
+ </property>
+ <property name="text">
+ <string>...</string>
+ </property>
+ <property name="icon">
+ <iconset>
+ <normaloff>../../../.designer/Editeur/icons/point-interrogation.png</normaloff>../../../.designer/Editeur/icons/point-interrogation.png</iconset>
+ </property>
+ <property name="iconSize">
+ <size>
+ <width>21</width>
+ <height>31</height>
+ </size>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QToolButton" name="RBRegle">
+ <property name="minimumSize">
+ <size>
+ <width>21</width>
+ <height>31</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>31</width>
+ <height>31</height>
+ </size>
+ </property>
+ <property name="focusPolicy">
+ <enum>Qt::ClickFocus</enum>
+ </property>
+ <property name="toolTip">
+ <string>affiche les régles de validité</string>
+ </property>
+ <property name="styleSheet">
+ <string notr="true">border : 0px</string>
+ </property>
+ <property name="text">
+ <string>...</string>
+ </property>
+ <property name="icon">
+ <iconset>
+ <normaloff>../../../.designer/Editeur/icons/lettreRblanc30.png</normaloff>../../../.designer/Editeur/icons/lettreRblanc30.png</iconset>
+ </property>
+ <property name="iconSize">
+ <size>
+ <width>21</width>
+ <height>31</height>
+ </size>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <spacer name="horizontalSpacer_4">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>QSizePolicy::Fixed</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>13</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QToolButton" name="RBPoubelle">
+ <property name="minimumSize">
+ <size>
+ <width>21</width>
+ <height>31</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>21</width>
+ <height>31</height>
+ </size>
+ </property>
+ <property name="focusPolicy">
+ <enum>Qt::ClickFocus</enum>
+ </property>
+ <property name="toolTip">
+ <string>Détruit la commande</string>
+ </property>
+ <property name="styleSheet">
+ <string notr="true">border : 0px</string>
+ </property>
+ <property name="text">
+ <string>...</string>
+ </property>
+ <property name="icon">
+ <iconset>
+ <normaloff>../../../.designer/Editeur/icons/deleteRond.png</normaloff>../../../.designer/Editeur/icons/deleteRond.png</iconset>
+ </property>
+ <property name="iconSize">
+ <size>
+ <width>21</width>
+ <height>31</height>
+ </size>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ <zorder>RBValide</zorder>
+ <zorder>labelNomCommande</zorder>
+ <zorder>horizontalSpacer_3</zorder>
+ <zorder>horizontalSpacer_4</zorder>
+ <zorder>RBPoubelle</zorder>
+ <zorder>horizontalSpacer_5</zorder>
+ <zorder>horizontalSpacer_7</zorder>
+ </widget>
+ </item>
+ <item row="1" column="0">
+ <widget class="QLabel" name="labelDoc">
+ <property name="text">
+ <string>TextLabel</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1">
+ <layout class="QGridLayout" name="gridLayout">
+ <property name="verticalSpacing">
+ <number>0</number>
+ </property>
+ <item row="0" column="0">
+ <widget class="QPushButton" name="bAvant">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>60</width>
+ <height>24</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>60</width>
+ <height>24</height>
+ </size>
+ </property>
+ <property name="focusPolicy">
+ <enum>Qt::ClickFocus</enum>
+ </property>
+ <property name="toolTip">
+ <string>Affiche le formulaire de la commande précédente</string>
+ </property>
+ <property name="styleSheet">
+ <string notr="true">background-color:rgb(104,110,149);
+color :white;
+border-radius : 12px
+</string>
+ </property>
+ <property name="text">
+ <string><<</string>
+ </property>
+ <property name="shortcut">
+ <string>Shift+A, Alt+A, Alt+A, Alt+A</string>
+ </property>
+ <property name="autoDefault">
+ <bool>true</bool>
+ </property>
+ <property name="default">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1">
+ <widget class="QPushButton" name="bApres">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>60</width>
+ <height>24</height>
+ </size>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>60</width>
+ <height>24</height>
+ </size>
+ </property>
+ <property name="focusPolicy">
+ <enum>Qt::ClickFocus</enum>
+ </property>
+ <property name="toolTip">
+ <string>Affiche le formulaire de la commande suivante</string>
+ </property>
+ <property name="styleSheet">
+ <string notr="true">background-color:rgb(104,110,149);
+color :white;
+border-radius : 12px
+</string>
+ </property>
+ <property name="text">
+ <string>>></string>
+ </property>
+ <property name="shortcut">
+ <string>Shift+A, Alt+A, Alt+A, Alt+A</string>
+ </property>
+ <property name="autoDefault">
+ <bool>true</bool>
+ </property>
+ <property name="default">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0">
+ <spacer name="verticalSpacer_2">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>20</width>
+ <height>0</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <widget class="QScrollArea" name="scrollAreaCommandes">
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>81</height>
+ </size>
+ </property>
+ <property name="styleSheet">
+ <string notr="true">background : rgb(247,247,247)
+
+
+</string>
+ </property>
+ <property name="frameShape">
+ <enum>QFrame::NoFrame</enum>
+ </property>
+ <property name="verticalScrollBarPolicy">
+ <enum>Qt::ScrollBarAsNeeded</enum>
+ </property>
+ <property name="horizontalScrollBarPolicy">
+ <enum>Qt::ScrollBarAsNeeded</enum>
+ </property>
+ <property name="widgetResizable">
+ <bool>true</bool>
+ </property>
+ <widget class="QWidget" name="scrollAreaWidgetContents">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>1353</width>
+ <height>466</height>
+ </rect>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout">
+ <item>
+ <layout class="QVBoxLayout" name="commandesLayout">
+ <property name="spacing">
+ <number>1</number>
+ </property>
+ </layout>
+ </item>
+ <item>
+ <spacer name="verticalSpacer">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>20</width>
+ <height>5</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </widget>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <layoutdefault spacing="6" margin="11"/>
+ <pixmapfunction>qPixmapFromMimeSource</pixmapfunction>
+ <customwidgets>
+ <customwidget>
+ <class>MonBoutonValide</class>
+ <extends>QToolButton</extends>
+ <header>monBoutonValide.h</header>
+ </customwidget>
+ <customwidget>
+ <class>MonLabelClic</class>
+ <extends>QLabel</extends>
+ <header>monLabelClic.h</header>
+ </customwidget>
+ </customwidgets>
+ <resources/>
+ <connections/>
+</ui>
- testglob = booleen 1 si toutes les regles OK, 0 sinon
"""
# On verifie les regles avec les defauts affectes
- dictionnaire = self.dict_mc_presents(restreint='non')
+ dictionnaire = self.dictMcPresents(restreint='non')
texte = ['']
testglob = 1
for r in self.definition.regles:
texte = os.linesep.join(texte)
return texte, testglob
- def dict_mc_presents(self, restreint='non'):
+ def dictMcPresents(self, restreint='non'):
"""
Retourne le dictionnaire {mocle : objet} construit a partir de self.mc_liste
Si restreint == 'non' : on ajoute tous les mots-cles simples du catalogue qui ont
)
""",re.VERBOSE|re.MULTILINE)
-def construitGenea(texte,liste_mc):
+def construitGenea(texte,listeMc):
"""
Retourne un dictionnaire dont les cles sont des reels et les valeurs sont leurs representations textuelles.
Realise un filtrage sur les reels :
- Ne garde que les reels pour lesquels str ne donne pas une bonne representation.
- - Ne garde que les reels derriere un argument keyword dont le nom est dans liste_mc
+ - Ne garde que les reels derriere un argument keyword dont le nom est dans listeMc
>>> s = '''a=+21.3e-5*85,b=-.1234,c=81.6 , d= -8 , e=_F(x=342.67,y=-1), f=+1.1, g=(1.3,-5,1.54E-3),
... #POMPE_PRIMA._BOUCLE_N._2_ELEMENT_NUMERO:0239
#argument keyword
mot=m[:-1]
else:
- if mot not in liste_mc:continue
+ if mot not in listeMc:continue
#valeur
key=eval(m)
if str(key) != m: d[key]=m
Tous les mots-cles facteurs sont convertis en sections
Un mot-cle facteur ne peut contenir que des mots-cles simples. Sinon => erreur
"""
- liste_mcfact=[]
+ listeMcFact=[]
sect_defaut=''
if isinstance(obj,MCList):
if len(obj.data) > 1:
if len(mocle.data) > 1:
raise EficasException(tr("Pas supporte"))
else:
- liste_mcfact.append(self.generMCFACT(mocle.data[0]))
+ listeMcFact.append(self.generMCFACT(mocle.data[0]))
elif isinstance(mocle,MCFACT):
- liste_mcfact.append(self.generMCFACT(mocle))
+ listeMcFact.append(self.generMCFACT(mocle))
elif isinstance(mocle,MCSIMP):
sect_defaut=sect_defaut+self.generMCSIMP(mocle)
else:
self.text=''
if sect_defaut != '':
self.text="[DEFAULT]\n"+sect_defaut
- self.text=self.text + ''.join(liste_mcfact,'\n')
+ self.text=self.text + ''.join(listeMcFact,'\n')
return self.text
def generMCFACT(self,obj):
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>\r
+<cata xmlns="http://chercheurs.edf.com/logiciels/efficas" xmlns:efficas="http://chercheurs.edf.com/logiciels/efficas" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://chercheurs.edf.com/logiciels/efficas file:///Z:/home_fayolle/MED_SVN/PASCALE/XSD/Model%20Efficas%20(1.1)%20%20v6%20ext.xsd">\r
+ <commandes>\r
+ <PROC xmlns:efficas="http://chercheurs.edf.com/logiciels/efficas" efficas:nom="FAS">\r
+ <efficas:FACT efficas:nom="FAMILY_MESH_NAME_REF" efficas:statut="o" efficas:min_occurs="1" efficas:max_occurs="-1">\r
+ <SIMP efficas:nom="NAME" efficas:statut="o" attribut="o">\r
+ <typeAttendu>TXM</typeAttendu>\r
+ </SIMP>\r
+ <efficas:FACT efficas:nom="ELEME" efficas:statut="f" efficas:min_occurs="1" efficas:max_occurs="1">\r
+ <efficas:FACT efficas:nom="FAMILY_NAME_ELEM" efficas:statut="f" efficas:min_occurs="1" efficas:max_occurs="-1">\r
+ <!-- <efficas:regles>\r
+ -->\r
+ <!-- Ajouter des contraintes de vérification de la présence ATT et GRO -->\r
+ <!--\r
+ <efficas:PRESENT_PRESENT>ATT GRO</efficas:PRESENT_PRESENT>\r
+ </efficas:regles>-->\r
+ <efficas:SIMP efficas:nom="NUM" efficas:statut="o" efficas:max_occurs="1" attribut="o">\r
+ <typeAttendu>I</typeAttendu>\r
+ </efficas:SIMP>\r
+ <efficas:SIMP efficas:nom="NAME" efficas:statut="o" efficas:max_occurs="1" attribut="o">\r
+ <typeAttendu>TXM</typeAttendu>\r
+ </efficas:SIMP>\r
+ <efficas:FACT efficas:nom="ATT" efficas:statut="f" efficas:max_occurs="1">\r
+ <efficas:regles>\r
+ <efficas:ENSEMBLE>DES IDE VAL</efficas:ENSEMBLE>\r
+ </efficas:regles>\r
+ <SIMP efficas:nom="NBR" efficas:statut="o" efficas:max_occurs="1" attribut="o">\r
+ <typeAttendu>I</typeAttendu>\r
+ </SIMP>\r
+ <SIMP efficas:nom="DES" efficas:statut="o" efficas:max_occurs="-1">\r
+ <typeAttendu>TXM</typeAttendu>\r
+ </SIMP>\r
+ <SIMP efficas:nom="IDE" efficas:statut="o" efficas:max_occurs="-1">\r
+ <typeAttendu>I</typeAttendu>\r
+ </SIMP>\r
+ <SIMP efficas:nom="VAL" efficas:statut="o" efficas:max_occurs="-1">\r
+ <typeAttendu>I</typeAttendu>\r
+ </SIMP>\r
+ </efficas:FACT>\r
+ <efficas:FACT efficas:nom="GRO" efficas:statut="f" efficas:max_occurs="1">\r
+ <SIMP efficas:nom="NBR" efficas:statut="o" efficas:max_occurs="1" attribut="o">\r
+ <typeAttendu>I</typeAttendu>\r
+ </SIMP>\r
+ <SIMP efficas:nom="NOM" efficas:statut="o" efficas:max_occurs="-1">\r
+ <typeAttendu>TXM</typeAttendu>\r
+ </SIMP>\r
+ </efficas:FACT>\r
+ </efficas:FACT>\r
+ </efficas:FACT>\r
+ <efficas:FACT efficas:nom="FAMILLE_ZERO" efficas:min_occurs="1" efficas:max_occurs="1" efficas:statut="o">\r
+ <efficas:SIMP efficas:nom="NUM" efficas:statut="o" efficas:max_occurs="1" attribut="o">\r
+ <efficas:valeurDef>\r
+ <efficas:typesimple>0</efficas:typesimple>\r
+ </efficas:valeurDef>\r
+ <efficas:plageValeur>\r
+ <efficas:into>\r
+ <efficas:typesimple>0</efficas:typesimple>\r
+ </efficas:into>\r
+ </efficas:plageValeur>\r
+ <typeAttendu>I</typeAttendu>\r
+ </efficas:SIMP>\r
+ <efficas:FACT efficas:nom="ATT" efficas:statut="f" efficas:max_occurs="1">\r
+ <efficas:regles>\r
+ <efficas:ENSEMBLE>DES IDE VAL</efficas:ENSEMBLE>\r
+ </efficas:regles>\r
+ <SIMP efficas:nom="NBR" efficas:statut="o" efficas:max_occurs="1" attribut="o">\r
+ <typeAttendu>I</typeAttendu>\r
+ </SIMP>\r
+ <SIMP efficas:nom="DES" efficas:statut="o" efficas:max_occurs="-1">\r
+ <typeAttendu>TXM</typeAttendu>\r
+ </SIMP>\r
+ <SIMP efficas:nom="IDE" efficas:statut="o" efficas:max_occurs="-1">\r
+ <typeAttendu>I</typeAttendu>\r
+ </SIMP>\r
+ <SIMP efficas:nom="VAL" efficas:statut="o" efficas:max_occurs="-1">\r
+ <typeAttendu>I</typeAttendu>\r
+ </SIMP>\r
+ </efficas:FACT>\r
+ </efficas:FACT>\r
+ <efficas:FACT efficas:nom="NOEUD" efficas:statut="f" efficas:min_occurs="1" efficas:max_occurs="-1">\r
+ <efficas:FACT efficas:nom="FAMILY_NAME_NOE" efficas:statut="f" efficas:min_occurs="1" efficas:max_occurs="-1">\r
+ <!--<efficas:regles>-->\r
+ <!-- Ajouter des contraintes de vérification de la présence ATT et GRO -->\r
+ <!--<efficas:PRESENT_PRESENT>ATT GRO</efficas:PRESENT_PRESENT> -->\r
+ <!--</efficas:regles>-->\r
+ <efficas:SIMP efficas:nom="NUM" efficas:statut="o" efficas:max_occurs="1" attribut="o">\r
+ <typeAttendu>I</typeAttendu>\r
+ </efficas:SIMP>\r
+ <efficas:SIMP efficas:nom="NAME" efficas:statut="o" efficas:max_occurs="1" attribut="o">\r
+ <typeAttendu>TXM</typeAttendu>\r
+ </efficas:SIMP>\r
+ <efficas:FACT efficas:nom="ATT" efficas:statut="f" efficas:max_occurs="1">\r
+ <efficas:regles>\r
+ <efficas:ENSEMBLE>DES IDE VAL</efficas:ENSEMBLE>\r
+ </efficas:regles>\r
+ <SIMP efficas:nom="NBR" efficas:statut="o" efficas:max_occurs="1" attribut="o">\r
+ <typeAttendu>I</typeAttendu>\r
+ </SIMP>\r
+ <SIMP efficas:nom="DES" efficas:statut="o" efficas:max_occurs="-1">\r
+ <typeAttendu>TXM</typeAttendu>\r
+ </SIMP>\r
+ <SIMP efficas:nom="IDE" efficas:statut="o" efficas:max_occurs="-1">\r
+ <typeAttendu>I</typeAttendu>\r
+ </SIMP>\r
+ <SIMP efficas:nom="VAL" efficas:statut="o" efficas:max_occurs="-1">\r
+ <typeAttendu>I</typeAttendu>\r
+ </SIMP>\r
+ </efficas:FACT>\r
+ <efficas:FACT efficas:nom="GRO" efficas:statut="f" efficas:max_occurs="1">\r
+ <SIMP efficas:nom="NBR" efficas:statut="o" efficas:max_occurs="1" attribut="o">\r
+ <typeAttendu>I</typeAttendu>\r
+ </SIMP>\r
+ <SIMP efficas:nom="NOM" efficas:statut="o" efficas:max_occurs="-1">\r
+ <typeAttendu>TXM</typeAttendu>\r
+ </SIMP>\r
+ </efficas:FACT>\r
+<!-- <efficas:FACT efficas:nom="GRO" efficas:statut="f" efficas:max_occurs="1">\r
+ <SIMP efficas:nom="NBR" efficas:statut="o" efficas:max_occurs="1" attribut="o">\r
+ <typeAttendu>I</typeAttendu>\r
+ </SIMP>\r
+ <SIMP efficas:nom="NOM" efficas:statut="o" efficas:max_occurs="-1">\r
+ <typeAttendu>TXM</typeAttendu>\r
+ </SIMP>\r
+ </efficas:FACT>\r
+--> </efficas:FACT>\r
+ </efficas:FACT>\r
+ </efficas:FACT>\r
+ </PROC>\r
+ </commandes>\r
+</cata>\r
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>\r
+<cata xmlns="http://chercheurs.edf.com/logiciels/efficas" xmlns:efficas="http://chercheurs.edf.com/logiciels/efficas" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://chercheurs.edf.com/logiciels/efficas file:///Z:/home_fayolle/MED_SVN/PASCALE/XSD/Model%20Efficas%20(1.1)%20%20v6%20ext.xsd">\r
+<commandes>\r
+<PROC xmlns:efficas="http://chercheurs.edf.com/logiciels/efficas" efficas:nom="FAS">\r
+ <efficas:FACT efficas:nom="FAMILY_MESH_NAME_REF" efficas:statut="o" efficas:min_occurs="1" efficas:max_occurs="-1">\r
+ <SIMP efficas:nom="NAME" efficas:statut="o" attribut="o" ><typeAttendu>TXM</typeAttendu></SIMP>\r
+ <efficas:FACT efficas:nom="ELEM" efficas:statut="f" efficas:min_occurs="1" efficas:max_occurs="-1">\r
+<!-- <efficas:regles>\r
+ --><!-- Ajouter des contraintes de vérification de la présence ATT et GRO --><!--\r
+ <efficas:PRESENT_PRESENT>ATT GRO</efficas:PRESENT_PRESENT>\r
+ </efficas:regles>-->\r
+ <efficas:SIMP efficas:nom="NUM" efficas:statut="o" efficas:max_occurs="1" attribut="n"><typeAttendu>TXM</typeAttendu></efficas:SIMP>\r
+ <efficas:SIMP efficas:nom="NAME" efficas:statut="o" efficas:max_occurs="1"><typeAttendu>TXM</typeAttendu></efficas:SIMP>\r
+ <efficas:FACT efficas:nom="ATT" efficas:statut="f" efficas:max_occurs="1">\r
+ <efficas:regles><efficas:ENSEMBLE>DES IDE VAL</efficas:ENSEMBLE></efficas:regles>\r
+ <SIMP efficas:nom="NBR" efficas:statut="o" efficas:max_occurs="1" attribut="o"><typeAttendu>I</typeAttendu></SIMP>\r
+ <SIMP efficas:nom="DES" efficas:statut="o" efficas:max_occurs="-1"><typeAttendu>TXM</typeAttendu></SIMP>\r
+ <SIMP efficas:nom="IDE" efficas:statut="o" efficas:max_occurs="-1"><typeAttendu>I</typeAttendu></SIMP>\r
+ <SIMP efficas:nom="VAL" efficas:statut="o" efficas:max_occurs="-1"><typeAttendu>I</typeAttendu></SIMP>\r
+ </efficas:FACT>\r
+ <efficas:FACT efficas:nom="GRO" efficas:statut="f" efficas:max_occurs="1">\r
+ <SIMP efficas:nom="NBR" efficas:statut="o" efficas:max_occurs="1"><typeAttendu>I</typeAttendu></SIMP>\r
+ <SIMP efficas:nom="NOM" efficas:statut="o" efficas:max_occurs="-1"><typeAttendu>TXM</typeAttendu></SIMP>\r
+ </efficas:FACT>\r
+ </efficas:FACT>\r
+ <SIMP efficas:nom="NAMEbis" efficas:statut="o" attribut="n"><typeAttendu>TXM</typeAttendu></SIMP>\r
+ </efficas:FACT>\r
+ <efficas:FACT efficas:nom="ELEM2">\r
+ <SIMP efficas:nom="TEST2">\r
+ <typeAttendu>TXM</typeAttendu>\r
+ </SIMP>\r
+ </efficas:FACT>\r
+</PROC>\r
+</commandes>\r
+</cata>\r
+++ /dev/null
-# 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')
+++ /dev/null
-# 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')
+++ /dev/null
-# 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" ),
-)
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>\r
+<!-- edited with XMLSpy v2015 rel. 4 (http://www.altova.com) by USER1 (EDF-DSP) -->\r
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning" xmlns="http://chercheurs.edf.com/logiciels/efficas" xmlns:efficas="http://chercheurs.edf.com/logiciels/efficas" xmlns:altova="http://www.altova.com/xml-schema-extensions" targetNamespace="http://chercheurs.edf.com/logiciels/efficas" elementFormDefault="qualified" attributeFormDefault="unqualified" version="0" vc:minVersion="1.1">\r
+ <!--<xs:import schemaLocation="./Model Efficas (1.1) v5.xsd" namespace="http://chercheurs.edf.com/logiciels/efficas"/>\r
+-->\r
+ <xs:override schemaLocation="./Model Efficas (1.1) v6.xsd">\r
+ <xs:attribute name="attribut" type="AT_attribut"/>\r
+ <xs:simpleType name="AT_attribut">\r
+ <xs:restriction base="xs:string">\r
+ <xs:enumeration value="n"/>\r
+ <xs:enumeration value="o"/>\r
+ </xs:restriction>\r
+ </xs:simpleType>\r
+\r
+<!-- <xs:complexType name="essai">\r
+ <xs:sequence>\r
+ <xs:element ref="valeurDef" minOccurs="0"/>\r
+ </xs:sequence>\r
+ <xs:attribute ref="attribut" default="n"/>\r
+ </xs:complexType>\r
+--> \r
+ <xs:complexType name="T_SIMP">\r
+ <xs:sequence>\r
+ <xs:element ref="doc" minOccurs="0"/>\r
+ <xs:element ref="portee" minOccurs="0">\r
+ <xs:annotation>\r
+ <xs:documentation>La portée pouurait devenir un attribut de SIMP. Une autre solution consisterait a créer un SIMPG pour distinguer les @nom uniques des SIMP a portée globale des autres.</xs:documentation>\r
+ </xs:annotation>\r
+ </xs:element>\r
+ <xs:element ref="valeurDef" minOccurs="0"/>\r
+ <xs:element ref="valeurSugg" minOccurs="0"/>\r
+ <xs:element ref="plageValeur" minOccurs="0"/>\r
+ <xs:element ref="typeAttendu"/>\r
+ <xs:element ref="validators" minOccurs="0"/>\r
+ </xs:sequence>\r
+ <xs:attribute ref="nom" use="required"/>\r
+ <xs:attribute ref="statut" default="o"/>\r
+ <xs:attribute ref="min_occurs" default="1"/>\r
+ <xs:attribute ref="max_occurs" default="1">\r
+ <xs:annotation>\r
+ <xs:documentation>La valeur -1 equivaut à oo</xs:documentation>\r
+ </xs:annotation>\r
+ </xs:attribute>\r
+ <xs:attribute name="attribut" default="n">\r
+ <xs:simpleType>\r
+ <xs:restriction base="xs:string">\r
+ <xs:enumeration value="n"/>\r
+ <xs:enumeration value="o"/>\r
+ </xs:restriction>\r
+ </xs:simpleType>\r
+ </xs:attribute>\r
+ <!-- Les deux lignes suivantes ne fonctionnent pas car il faut que la cible référencée soit déjà définie dans le fichier importé ? -->\r
+ <!-- <xs:attribute default="n" ref="attribut"/>-->\r
+ <!-- <xs:attribute default="n" name="attribut" type="AT_attribut" />-->\r
+ </xs:complexType>\r
+ </xs:override>\r
+ </xs:schema>\r
+
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>\r
+<!-- édité avec XMLSpy v2018 sp1 (http://www.altova.com) par Fayolle (EDF R&D) -->\r
+<!-- edited with XMLSpy v2015 rel. 4 (http://www.altova.com) by USER1 (EDF-DSP) -->\r
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning" xmlns="http://chercheurs.edf.com/logiciels/efficas" xmlns:efficas="http://chercheurs.edf.com/logiciels/efficas" xmlns:altova="http://www.altova.com/xml-schema-extensions" targetNamespace="http://chercheurs.edf.com/logiciels/efficas" elementFormDefault="qualified" attributeFormDefault="unqualified" version="0" vc:minVersion="1.1">\r
+ <xs:element name="doc" type="T_doc"/>\r
+ <xs:element name="cata" type="T_cata"/>\r
+ <xs:element name="regles" type="T_regles"/>\r
+ <xs:element name="typeCree" type="T_classe_utilisateur"/>\r
+ <xs:element name="valeurDef" type="T_typeAttendu"/>\r
+ <xs:element name="valeurSugg" type="T_typeAttendu"/>\r
+ <xs:element name="fonction_utilisateur" type="T_fonction_python"/>\r
+ <xs:element name="commandes" type="T_commandes">\r
+ <!-- La contrainte suivante fonctionne -->\r
+ <xs:unique name="Uniq_Command">\r
+ <xs:selector xpath="*"/>\r
+ <xs:field xpath="@efficas:nom"/>\r
+ </xs:unique>\r
+ </xs:element>\r
+ <xs:element name="validators" type="T_validators"/>\r
+ <xs:element name="plageValeur" type="T_plageValeur"/>\r
+ <xs:element name="typeAttendu" type="T_name"/>\r
+ <xs:element name="classeUtilisateurName" type="T_classe_utilisateur_username" abstract="true" substitutionGroup="typeAttendu"/>\r
+ <xs:element name="SIMP" type="T_SIMP"/>\r
+ <xs:element name="portee" type="T_portee" default="None"/>\r
+ <xs:element name="condition" type="T_fonction_python"/>\r
+ <xs:element name="borne_sup" type="T_typeAttendu"/>\r
+ <xs:element name="borne_inf" type="T_typeAttendu"/>\r
+ <!-- <xs:element name="into" type="T_into"/>-->\r
+ <xs:element name="into" type="T_into"/>\r
+ <!-- <xs:element name="into_plus_fonction" type="T_into" abstract="true" substitutionGroup="into"/>-->\r
+ <xs:attribute name="nom" type="AT_nom"/>\r
+ <xs:attribute name="ag" type="AT_ag"/>\r
+ <xs:attribute name="fr" type="xs:string"/>\r
+ <xs:attribute name="ang" type="xs:string"/>\r
+ <xs:attribute name="docu" type="AT_docu"/>\r
+ <xs:attribute name="valeur_sugg" type="AT_valeur_sugg"/>\r
+ <xs:attribute name="statut" type="AT_statut" default="o"/>\r
+ <xs:attribute name="max_occurs" type="AT_max_occurs"/>\r
+ <xs:attribute name="min_occurs" type="AT_min_occurs"/>\r
+ <xs:attribute name="subroutine" type="AT_subroutine" default="None"/>\r
+ <xs:complexType name="T_doc">\r
+ <xs:attribute ref="fr" use="optional"/>\r
+ <xs:attribute ref="ang"/>\r
+ <xs:attribute ref="docu"/>\r
+ </xs:complexType>\r
+ <xs:complexType name="T_cata">\r
+ <xs:sequence>\r
+ <xs:element ref="commandes" minOccurs="0" maxOccurs="unbounded"/>\r
+ </xs:sequence>\r
+ </xs:complexType>\r
+ <xs:complexType name="T_commandes">\r
+ <xs:choice minOccurs="0" maxOccurs="unbounded">\r
+ <xs:element ref="OPER"/>\r
+ <xs:element ref="PROC"/>\r
+ </xs:choice>\r
+ </xs:complexType>\r
+ <xs:complexType name="T_Cardinalite"/>\r
+ <xs:complexType name="T_plageValeur">\r
+ <xs:choice>\r
+ <xs:sequence>\r
+ <xs:element ref="borne_sup" minOccurs="0"/>\r
+ <xs:element ref="borne_inf" minOccurs="0"/>\r
+ </xs:sequence>\r
+ <xs:element ref="into"/>\r
+ </xs:choice>\r
+ </xs:complexType>\r
+ <xs:complexType name="T_Accas_Common">\r
+ <xs:sequence>\r
+ <xs:element ref="regles" minOccurs="0"/>\r
+ <xs:element ref="doc" minOccurs="0"/>\r
+ <xs:choice maxOccurs="unbounded">\r
+ <xs:element ref="BLOC"/>\r
+ <xs:element ref="FACT"/>\r
+ <xs:element ref="SIMP"/>\r
+ </xs:choice>\r
+ </xs:sequence>\r
+ <xs:attribute ref="nom" use="required"/>\r
+ </xs:complexType>\r
+ <xs:element name="OPER" type="T_OPER">\r
+ <!-- La contrainte fonctionne uniquement si l'on n'oublie pas le prefix dans l'expression du selector ! -->\r
+ <!-- aucun nom identique ne doit apparaître dans les sous élements d'un même niveau dans OPER ou PROC -->\r
+ <xs:key name="Key_Name_In_Oper">\r
+ <xs:annotation>\r
+ <xs:documentation>SIMP devrait être selectionné que si .//SIMP[portee='Global']</xs:documentation>\r
+ </xs:annotation>\r
+ <xs:selector xpath="./efficas:BLOC |./efficas:FACT|./efficas:SIMP"/>\r
+ <xs:field xpath="@efficas:nom"/>\r
+ </xs:key>\r
+ <xs:keyref name="Oper_Ref_A_Name_In_Exclus" refer="Key_Name_In_Oper">\r
+ <xs:selector xpath="./efficas:regles/efficas:EXCLUS"/>\r
+ <xs:field xpath="."/>\r
+ </xs:keyref>\r
+ <xs:unique name="Oper_Uniq_Name_In_Exclus">\r
+ <xs:selector xpath="./efficas:regles/efficas:EXCLUS"/>\r
+ <xs:field xpath="."/>\r
+ </xs:unique>\r
+ <xs:keyref name="Oper_Ref_A_Name_In_A_Classer" refer="Key_Name_In_Oper">\r
+ <xs:selector xpath="./efficas:regles/efficas:A_CLASSER/efficas:p1 | ./efficas:regles/efficas:A_CLASSER/efficas:p2"/>\r
+ <xs:field xpath="."/>\r
+ </xs:keyref>\r
+ <xs:unique name="Oper_Uniq_Name_In_A_Classer">\r
+ <xs:selector xpath="./efficas:regles/efficas:A_CLASSER/efficas:p1 | ./efficas:regles/efficas:A_CLASSER/efficas:p2"/>\r
+ <xs:field xpath="."/>\r
+ </xs:unique>\r
+ <xs:keyref name="Oper_Ref_A_Name_In_Au_Moins_Un" refer="Key_Name_In_Oper">\r
+ <xs:selector xpath="./efficas:regles/efficas:AU_MOINS_UN"/>\r
+ <xs:field xpath="."/>\r
+ </xs:keyref>\r
+ <xs:unique name="Oper_Uniq_Name_In_Au_Moins_Un">\r
+ <xs:selector xpath="./efficas:regles/efficas:AU_MOINS_UN"/>\r
+ <xs:field xpath="."/>\r
+ </xs:unique>\r
+ <xs:keyref name="Oper_Ref_A_Name_In_Au_Plus_Un" refer="Key_Name_In_Oper">\r
+ <xs:selector xpath="./efficas:regles/efficas:AU_PLUS_UN"/>\r
+ <xs:field xpath="."/>\r
+ </xs:keyref>\r
+ <xs:unique name="Oper_Uniq_Name_In_Au_Plus_Un">\r
+ <xs:selector xpath="./efficas:regles/efficas:AU_PLUS_UN"/>\r
+ <xs:field xpath="."/>\r
+ </xs:unique>\r
+ <xs:keyref name="Oper_Ref_A_Name_In_Ensemble" refer="Key_Name_In_Oper">\r
+ <xs:selector xpath="./efficas:regles/efficas:ENSEMBLE"/>\r
+ <xs:field xpath="."/>\r
+ </xs:keyref>\r
+ <xs:unique name="Oper_Uniq_Name_In_Ensemble">\r
+ <xs:selector xpath="./efficas:regles/efficas:ENSEMBLE"/>\r
+ <xs:field xpath="."/>\r
+ </xs:unique>\r
+ <xs:keyref name="Oper_Ref_A_Name_In_Present_Absent" refer="Key_Name_In_Oper">\r
+ <xs:selector xpath="./efficas:regles/efficas:PRESENT_ABSENT"/>\r
+ <xs:field xpath="."/>\r
+ </xs:keyref>\r
+ <xs:unique name="Oper_Uniq_Name_In_Present_Absent">\r
+ <xs:selector xpath="./efficas:regles/efficas:PRESENT_ABSENT"/>\r
+ <xs:field xpath="."/>\r
+ </xs:unique>\r
+ <xs:keyref name="Oper_Ref_A_Name_In_Present_Present" refer="Key_Name_In_Oper">\r
+ <xs:selector xpath="./efficas:regles/efficas:PRESENT_PRESENT"/>\r
+ <xs:field xpath="."/>\r
+ </xs:keyref>\r
+ <xs:unique name="Oper_Uniq_Name_In_Present_Present">\r
+ <xs:selector xpath="./efficas:regles/efficas:PRESENT_PRESENT"/>\r
+ <xs:field xpath="."/>\r
+ </xs:unique>\r
+ <xs:keyref name="Oper_Ref_A_Name_In_Un_Parmi" refer="Key_Name_In_Oper">\r
+ <xs:selector xpath="./efficas:regles/efficas:UN_PARMI"/>\r
+ <xs:field xpath="."/>\r
+ </xs:keyref>\r
+ <xs:unique name="Oper_Uniq_Name_In_Un_Parmi">\r
+ <xs:selector xpath="./efficas:regles/efficas:UN_PARMI"/>\r
+ <xs:field xpath="."/>\r
+ </xs:unique>\r
+ </xs:element>\r
+ \r
+ <xs:complexType name="T_OPER">\r
+ <xs:complexContent>\r
+ <xs:extension base="T_Accas_Common">\r
+ <xs:sequence>\r
+ <xs:element ref="typeCree"/>\r
+ </xs:sequence>\r
+ <xs:attribute ref="subroutine"/>\r
+ </xs:extension>\r
+ </xs:complexContent>\r
+ </xs:complexType>\r
+ <xs:element name="PROC" type="T_PROC">\r
+ <!-- La contrainte fonctionne pour toutes les PROC adjacentes et devrait être par PROC -->\r
+ <xs:key name="Key_Name_In_Proc">\r
+ <xs:annotation>\r
+ <xs:documentation>SIMP devrait être selectionné que si .//SIMP[portee='Global']</xs:documentation>\r
+ </xs:annotation>\r
+ <xs:selector xpath="./efficas:BLOC | ./efficas:FACT| ./efficas:SIMP"/>\r
+ <xs:field xpath="@efficas:nom"/>\r
+ </xs:key>\r
+ <xs:keyref name="Proc_Ref_A_Name_In_Exclus" refer="Key_Name_In_Proc">\r
+ <xs:selector xpath="./efficas:regles/efficas:EXCLUS"/>\r
+ <xs:field xpath="."/>\r
+ </xs:keyref>\r
+ <xs:unique name="Proc_Uniq_Name_In_Exclus">\r
+ <xs:selector xpath="./efficas:regles/efficas:EXCLUS"/>\r
+ <xs:field xpath="."/>\r
+ </xs:unique>\r
+ <xs:keyref name="Proc_Ref_A_Name_In_A_Classer" refer="Key_Name_In_Proc">\r
+ <xs:selector xpath="./efficas:regles/efficas:A_CLASSER/efficas:p1 | ./efficas:regles/efficas:A_CLASSER/efficas:p2"/>\r
+ <xs:field xpath="."/>\r
+ </xs:keyref>\r
+ <xs:unique name="Proc_Uniq_Name_In_A_Classer">\r
+ <xs:selector xpath="./efficas:regles/efficas:A_CLASSER/efficas:p1 | ./efficas:regles/efficas:A_CLASSER/efficas:p2"/>\r
+ <xs:field xpath="."/>\r
+ </xs:unique>\r
+ <xs:keyref name="Proc_Ref_A_Name_In_Au_Moins_Un" refer="Key_Name_In_Proc">\r
+ <xs:selector xpath="./efficas:regles/efficas:AU_MOINS_UN"/>\r
+ <xs:field xpath="."/>\r
+ </xs:keyref>\r
+ <xs:unique name="Proc_Uniq_Name_In_Au_Moins_Un">\r
+ <xs:selector xpath="./efficas:regles/efficas:AU_MOINS_UN"/>\r
+ <xs:field xpath="."/>\r
+ </xs:unique>\r
+ <xs:keyref name="Proc_Ref_A_Name_In_Au_Plus_Un" refer="Key_Name_In_Proc">\r
+ <xs:selector xpath="./efficas:regles/efficas:AU_PLUS_UN"/>\r
+ <xs:field xpath="."/>\r
+ </xs:keyref>\r
+ <xs:unique name="Proc_Uniq_Name_In_Au_Plus_Un">\r
+ <xs:selector xpath="./efficas:regles/efficas:AU_PLUS_UN"/>\r
+ <xs:field xpath="."/>\r
+ </xs:unique>\r
+ <xs:keyref name="Proc_Ref_A_Name_In_Ensemble" refer="Key_Name_In_Proc">\r
+ <xs:selector xpath="./efficas:regles/efficas:ENSEMBLE"/>\r
+ <xs:field xpath="."/>\r
+ </xs:keyref>\r
+ <xs:unique name="Proc_Uniq_Name_In_Ensemble">\r
+ <xs:selector xpath="./efficas:regles/efficas:ENSEMBLE"/>\r
+ <xs:field xpath="."/>\r
+ </xs:unique>\r
+ <xs:keyref name="Proc_Ref_A_Name_In_Present_Absent" refer="Key_Name_In_Proc">\r
+ <xs:selector xpath="./efficas:regles/efficas:PRESENT_ABSENT"/>\r
+ <xs:field xpath="."/>\r
+ </xs:keyref>\r
+ <xs:unique name="Proc_Uniq_Name_In_Present_Absent">\r
+ <xs:selector xpath="./efficas:regles/efficas:PRESENT_ABSENT"/>\r
+ <xs:field xpath="."/>\r
+ </xs:unique>\r
+ <xs:keyref name="Proc_Ref_A_Name_In_Present_Present" refer="Key_Name_In_Proc">\r
+ <xs:selector xpath="./efficas:regles/efficas:PRESENT_PRESENT"/>\r
+ <xs:field xpath="."/>\r
+ </xs:keyref>\r
+ <xs:unique name="Proc_Uniq_Name_In_Present_Present">\r
+ <xs:selector xpath="./efficas:regles/efficas:PRESENT_PRESENT"/>\r
+ <xs:field xpath="."/>\r
+ </xs:unique>\r
+ <xs:keyref name="Ref_A_Name_In_Un_Parmi" refer="Key_Name_In_Proc">\r
+ <xs:selector xpath="./efficas:regles/efficas:UN_PARMI"/>\r
+ <xs:field xpath="."/>\r
+ </xs:keyref>\r
+ <xs:unique name="Proc_Uniq_Name_In_Un_Parmi">\r
+ <xs:selector xpath="./efficas:regles/efficas:UN_PARMI"/>\r
+ <xs:field xpath="."/>\r
+ </xs:unique>\r
+ </xs:element>\r
+ <xs:complexType name="T_PROC">\r
+ <xs:complexContent>\r
+ <xs:extension base="T_Accas_Common">\r
+ <xs:attribute ref="subroutine"/>\r
+ </xs:extension>\r
+ </xs:complexContent>\r
+ </xs:complexType>\r
+ <xs:element name="FACT" type="T_FACT">\r
+ <!-- La contrainte fonctionne uniquement si l'on n'oublie pas le prefix dans l'expression du selector ! -->\r
+ <!-- aucun nom identique ne doit apparaître dans les sous élements d'un même niveau de FACT -->\r
+ <xs:key name="Key_Name_In_Fact">\r
+ <xs:annotation>\r
+ <xs:documentation>SIMP devrait être selectionné que si .//SIMP[portee='Global']</xs:documentation>\r
+ </xs:annotation>\r
+ <xs:selector xpath="./efficas:BLOC |./efficas:FACT|./efficas:SIMP"/>\r
+ <xs:field xpath="@efficas:nom"/>\r
+ </xs:key>\r
+ <xs:keyref name="Ref_A_Name_In_Fact" refer="Key_Name_In_Fact">\r
+ <xs:selector xpath="./efficas:regles/efficas:EXCLUS"/>\r
+ <xs:field xpath="."/>\r
+ </xs:keyref>\r
+ </xs:element>\r
+ <!-- Définition par restriction -->\r
+ <!-- <xs:complexType name="T_FACT">\r
+ <xs:complexContent>\r
+ <xs:restriction base="T_Accas_Common">\r
+ <xs:sequence>\r
+ <xs:element ref="regles" minOccurs="0"/>\r
+ <xs:element ref="doc" minOccurs="0"/>\r
+ <xs:choice maxOccurs="unbounded">\r
+ <xs:element ref="BLOC"/>\r
+ <xs:element ref="FACT"/>\r
+ <xs:element ref="SIMP"/>\r
+ </xs:choice>\r
+ </xs:sequence>\r
+ </xs:restriction>\r
+ </xs:complexContent>\r
+ </xs:complexType>-->\r
+ <xs:complexType name="T_FACT">\r
+ <xs:complexContent>\r
+ <xs:extension base="T_Accas_Common">\r
+ <xs:attribute ref="statut"/>\r
+ <xs:attribute ref="min_occurs" default="1"/>\r
+ <xs:attribute ref="max_occurs" default="1">\r
+ <xs:annotation>\r
+ <xs:documentation>La valeur -1 equivaut à oo</xs:documentation>\r
+ </xs:annotation>\r
+ </xs:attribute>\r
+ </xs:extension>\r
+ <!-- <xs:assert test=".[exists(@efficas:max_occurs) and exists(@efficas:min_occurs) and @efficas:max_occurs gt @efficas:min_occurs]"/>\r
+-->\r
+ <!--<xs:assert test="if (.[exists(@efficas:max_occurs)] and .[exists(@efficas:min_occurs)] ) then (@efficas:max_occurs gt @efficas:min_occurs) or @efficas:max_occurs = -1 else true" altova:message="Erreur max_occurs > min_occurs "/>-->\r
+ </xs:complexContent>\r
+ </xs:complexType>\r
+ <xs:simpleType name="T_fonction_python">\r
+ <xs:restriction base="xs:string"/>\r
+ </xs:simpleType>\r
+ <xs:element name="BLOC" type="T_BLOC">\r
+ <xs:key name="Key_Name_In_Bloc">\r
+ <xs:annotation>\r
+ <xs:documentation>SIMP devrait être selectionné que si .//SIMP[portee='Global']</xs:documentation>\r
+ </xs:annotation>\r
+ <xs:selector xpath="./efficas:BLOC |./efficas:FACT|./efficas:SIMP"/>\r
+ <xs:field xpath="@efficas:nom"/>\r
+ </xs:key>\r
+ <xs:keyref name="Ref_A_Name_In_Bloc" refer="Key_Name_In_Bloc">\r
+ <xs:selector xpath="./efficas:regles/efficas:EXCLUS"/>\r
+ <xs:field xpath="."/>\r
+ </xs:keyref>\r
+ </xs:element>\r
+ <xs:complexType name="T_BLOC">\r
+ <xs:complexContent>\r
+ <xs:extension base="T_Accas_Common">\r
+ <xs:sequence>\r
+ <xs:element ref="condition"/>\r
+ </xs:sequence>\r
+ </xs:extension>\r
+ </xs:complexContent>\r
+ </xs:complexType>\r
+ <xs:complexType name="T_SIMP">\r
+ <xs:sequence>\r
+ <xs:element ref="doc" minOccurs="0"/>\r
+ <xs:element ref="portee" minOccurs="0">\r
+ <xs:annotation>\r
+ <xs:documentation>La portée pouurait devenir un attribut de SIMP. Une autre solution consisterait a créer un SIMPG pour distinguer les @nom uniques des SIMP a portée globale des autres.</xs:documentation>\r
+ </xs:annotation>\r
+ </xs:element>\r
+ <xs:element ref="valeurDef" minOccurs="0"/>\r
+ <xs:element ref="valeurSugg" minOccurs="0"/>\r
+ <xs:element ref="plageValeur" minOccurs="0"/>\r
+ <xs:element ref="typeAttendu"/>\r
+ <xs:element ref="validators" minOccurs="0"/>\r
+ </xs:sequence>\r
+ <xs:attribute ref="nom" use="required"/>\r
+ <xs:attribute ref="statut" default="o"/>\r
+ <xs:attribute ref="min_occurs" default="1"/>\r
+ <xs:attribute ref="max_occurs" default="1">\r
+ <xs:annotation>\r
+ <xs:documentation>La valeur -1 equivaut à oo</xs:documentation>\r
+ </xs:annotation>\r
+ </xs:attribute>\r
+ </xs:complexType>\r
+ <xs:simpleType name="AT_statut">\r
+ <xs:restriction base="xs:string">\r
+ <xs:enumeration value="f"/>\r
+ <xs:enumeration value="o"/>\r
+ </xs:restriction>\r
+ </xs:simpleType>\r
+ <!--<xs:simpleType name="T_repetable">\r
+ <xs:restriction base="xs:string">\r
+ <xs:enumeration value="n"/>\r
+ <xs:enumeration value="o"/>\r
+ </xs:restriction>\r
+ </xs:simpleType>-->\r
+ <xs:simpleType name="T_portee">\r
+ <xs:restriction base="xs:string">\r
+ <xs:enumeration value="None"/>\r
+ <xs:enumeration value="Global"/>\r
+ </xs:restriction>\r
+ </xs:simpleType>\r
+ <xs:simpleType name="AT_max_occurs">\r
+ <xs:restriction base="xs:long">\r
+ <xs:minInclusive value="-1"/>\r
+ </xs:restriction>\r
+ </xs:simpleType>\r
+ <xs:simpleType name="AT_min_occurs">\r
+ <xs:restriction base="xs:long">\r
+ <xs:minExclusive value="0"/>\r
+ </xs:restriction>\r
+ </xs:simpleType>\r
+ <!-- Comparable -->\r
+ <!-- <xs:simpleType name="AT_borne_sup">\r
+ <xs:atomic base="xs:double"/>\r
+ </xs:simpleType>\r
+ <xs:simpleType name="AT_borne_inf">\r
+ <xs:restriction base="xs:double"/>\r
+ </xs:simpleType>\r
+-->\r
+ <xs:simpleType name="AT_ag">\r
+ <xs:restriction base="xs:string">\r
+ <xs:enumeration value="No comment"/>\r
+ </xs:restriction>\r
+ </xs:simpleType>\r
+ <xs:simpleType name="AT_docu">\r
+ <xs:annotation>\r
+ <xs:documentation>Référence une position dans un fichier maître contenant une liste de références à des pages de documentations</xs:documentation>\r
+ </xs:annotation>\r
+ <xs:restriction base="xs:string"/>\r
+ </xs:simpleType>\r
+ <xs:simpleType name="AT_valeur_sugg">\r
+ <xs:restriction base="xs:string"/>\r
+ </xs:simpleType>\r
+ <!-- TODO: Exclure mots clés python|efficas -->\r
+ <xs:simpleType name="AT_nom">\r
+ <xs:restriction base="xs:string">\r
+ <xs:pattern value="([A-Z]|[a-z]|_)([A-Z]|[a-z]|_|[0-9])*"/>\r
+ </xs:restriction>\r
+ </xs:simpleType>\r
+ <xs:simpleType name="T_predicat1">\r
+ <xs:list itemType="AT_nom"/>\r
+ <!-- TODO: Supprimer la liste -->\r
+ </xs:simpleType>\r
+ <xs:complexType name="T_predicat2">\r
+ <xs:sequence>\r
+ <xs:element name="p1" type="T_predicat1" minOccurs="1"/>\r
+ <xs:element name="p2" type="AT_nom" minOccurs="1"/>\r
+ </xs:sequence>\r
+ <!-- TODO: Supprimer la séquence -->\r
+ </xs:complexType>\r
+ <xs:element name="A_CLASSER" type="T_predicat2"/>\r
+ <xs:element name="AU_MOINS_UN" type="T_predicat1"/>\r
+ <xs:element name="AU_PLUS_UN" type="T_predicat1"/>\r
+ <xs:element name="ENSEMBLE" type="T_predicat1"/>\r
+ <xs:element name="EXCLUS" type="T_predicat1"/>\r
+ <xs:element name="PRESENT_ABSENT" type="T_predicat1"/>\r
+ <xs:element name="PRESENT_PRESENT" type="T_predicat1"/>\r
+ <xs:element name="UN_PARMI" type="T_predicat1"/>\r
+ <xs:group name="predicat">\r
+ <xs:choice>\r
+ <xs:element ref="A_CLASSER"/>\r
+ <xs:element ref="AU_MOINS_UN"/>\r
+ <xs:element ref="AU_PLUS_UN"/>\r
+ <xs:element ref="ENSEMBLE"/>\r
+ <xs:element ref="EXCLUS"/>\r
+ <xs:element ref="PRESENT_ABSENT"/>\r
+ <xs:element ref="PRESENT_PRESENT"/>\r
+ <xs:element ref="UN_PARMI"/>\r
+ </xs:choice>\r
+ </xs:group>\r
+ <xs:complexType name="T_regles">\r
+ <xs:sequence maxOccurs="unbounded">\r
+ <xs:group ref="predicat"/>\r
+ </xs:sequence>\r
+ </xs:complexType>\r
+ <!-- <xs:simpleType name="T_typeCree">\r
+ <xs:restriction base="T_classe_utilisateur"/>\r
+ </xs:simpleType>\r
+-->\r
+ <xs:simpleType name="AT_subroutine">\r
+ <xs:restriction base="AT_nom"/>\r
+ </xs:simpleType>\r
+ <xs:simpleType name="T_validators">\r
+ <xs:restriction base="xs:string">\r
+ <xs:enumeration value="NoRepeat"/>\r
+ <xs:enumeration value="OnlyStr"/>\r
+ <xs:enumeration value="VerifExiste"/>\r
+ <xs:enumeration value="VerifTypeTuple"/>\r
+ </xs:restriction>\r
+ </xs:simpleType>\r
+ <xs:simpleType name="T_Bool">\r
+ <xs:restriction base="xs:boolean"/>\r
+ </xs:simpleType>\r
+ <xs:simpleType name="T_list_Bool">\r
+ <xs:list itemType="T_Bool"/>\r
+ </xs:simpleType>\r
+ <xs:simpleType name="T_I">\r
+ <xs:restriction base="xs:int"/>\r
+ </xs:simpleType>\r
+ <xs:simpleType name="T_list_I">\r
+ <xs:list itemType="T_I"/>\r
+ </xs:simpleType>\r
+ <xs:simpleType name="T_R">\r
+ <xs:restriction base="xs:double"/>\r
+ </xs:simpleType>\r
+ <xs:simpleType name="T_list_R">\r
+ <xs:list itemType="T_R"/>\r
+ </xs:simpleType>\r
+ <xs:simpleType name="T_TXM">\r
+ <xs:restriction base="AT_nom"/>\r
+ </xs:simpleType>\r
+ <xs:simpleType name="T_list_TXM">\r
+ <xs:list itemType="T_TXM"/>\r
+ </xs:simpleType>\r
+ <!--fonctionne mais ne permet pas de créer une liste de liste -->\r
+ <xs:simpleType name="T_C">\r
+ <xs:restriction>\r
+ <xs:simpleType>\r
+ <xs:list itemType="xs:double"/>\r
+ </xs:simpleType>\r
+ <xs:minLength value="2"/>\r
+ <xs:maxLength value="2"/>\r
+ </xs:restriction>\r
+ </xs:simpleType>\r
+ <!-- Ajouter une contrainte : taille pair -->\r
+ <!-- Il n'est pas possible de définir des listes de listes -->\r
+ <xs:simpleType name="T_list_C">\r
+ <xs:list itemType="xs:double"/>\r
+ </xs:simpleType>\r
+ <xs:simpleType name="T_name_base">\r
+ <xs:restriction base="AT_nom"/>\r
+ </xs:simpleType>\r
+ <xs:simpleType name="T_simple_name">\r
+ <xs:restriction base="T_name_base">\r
+ <xs:enumeration value="Fichier"/>\r
+ <xs:enumeration value="Repertoire"/>\r
+ <xs:enumeration value="TXM"/>\r
+ <xs:enumeration value="I"/>\r
+ <xs:enumeration value="R"/>\r
+ <xs:enumeration value="C"/>\r
+ <xs:enumeration value="Bool"/>\r
+ <xs:enumeration value="grma"/>\r
+ <xs:enumeration value="grno"/>\r
+ <xs:enumeration value="SalomeEntry"/>\r
+ </xs:restriction>\r
+ </xs:simpleType>\r
+ <!-- On ne peut pas rendre abstrait un simpleType && \r
+ Il n'est pas possible de dériver par restriction un simplecontent d'un type complex qui\r
+ lui peut être abstrait.\r
+ -->\r
+ <xs:simpleType name="T_classe_utilisateur_name">\r
+ <xs:restriction base="T_name">\r
+ <xs:enumeration value="T_classe_utilisateur"/>\r
+ </xs:restriction>\r
+ </xs:simpleType>\r
+ <xs:complexType name="T_classe_utilisateur_username">\r
+ <xs:simpleContent>\r
+ <xs:extension base="T_classe_utilisateur_name">\r
+ <xs:attribute ref="nom" use="required"/>\r
+ </xs:extension>\r
+ </xs:simpleContent>\r
+ </xs:complexType>\r
+ <xs:simpleType name="T_name">\r
+ <xs:union memberTypes="T_simple_name">\r
+ <xs:simpleType>\r
+ <xs:restriction base="AT_nom">\r
+ <xs:enumeration value="T_Matrice_double"/>\r
+ <xs:enumeration value="T_Matrice_Symetrique_double"/>\r
+ <xs:enumeration value="T_tuple"/>\r
+ <xs:enumeration value="T_classe_utilisateur"/>\r
+ </xs:restriction>\r
+ </xs:simpleType>\r
+ </xs:union>\r
+ </xs:simpleType>\r
+ <xs:complexType name="T_grma"/>\r
+ <xs:complexType name="T_grno"/>\r
+ <xs:complexType name="T_SalomeEntry"/>\r
+ <xs:complexType name="T_Fichier"/>\r
+ <!-- <xs:complexType name="T_Repertoire"/>-->\r
+ <xs:simpleType name="T_Repertoire">\r
+ <xs:list>\r
+ <xs:simpleType>\r
+ <xs:restriction base="xs:string">\r
+ <xs:whiteSpace value="preserve"/>\r
+ </xs:restriction>\r
+ </xs:simpleType>\r
+ </xs:list>\r
+ </xs:simpleType>\r
+ <xs:simpleType name="T_simple">\r
+ <xs:union memberTypes="T_I T_list_I T_R T_list_R T_C T_list_C T_TXM T_list_TXM T_Bool T_list_Bool T_Repertoire"/>\r
+ </xs:simpleType>\r
+ <!-- <xs:complexType name="T_TXM"/>-->\r
+ <!-- <xs:simpleType name="T_simple">\r
+ <xs:restriction base="xs:string">\r
+ <xs:enumeration value="Fichier"/>\r
+ <xs:enumeration value="Repertoire"/>\r
+ <xs:enumeration value="TXM"/>\r
+ <xs:enumeration value="I"/>\r
+ <xs:enumeration value="R"/>\r
+ <xs:enumeration value="C"/>\r
+ <xs:enumeration value="Bool"/>\r
+ <xs:enumeration value="grma"/>\r
+ <xs:enumeration value="grno"/>\r
+ <xs:enumeration value="SalomeEntry"/>\r
+ </xs:restriction>\r
+ </xs:simpleType>\r
+-->\r
+ <xs:simpleType name="T_list_double">\r
+ <xs:list itemType="xs:double"/>\r
+ </xs:simpleType>\r
+ <!-- Possibilité d'utiliser un type paramétré ? -->\r
+ <xs:complexType name="T_Matrice_double">\r
+ <xs:simpleContent>\r
+ <xs:extension base="T_list_double">\r
+ <xs:attribute name="n" type="xs:integer" use="required"/>\r
+ <xs:attribute name="m" type="xs:integer" use="required"/>\r
+ </xs:extension>\r
+ </xs:simpleContent>\r
+ </xs:complexType>\r
+ <!-- Faire l'exercice de dériver de T_Matrice_double -->\r
+ <xs:complexType name="T_Matrice_Symetrique_double">\r
+ <xs:simpleContent>\r
+ <xs:extension base="T_list_double">\r
+ <xs:attribute name="n" type="xs:int" use="required"/>\r
+ </xs:extension>\r
+ </xs:simpleContent>\r
+ </xs:complexType>\r
+ <!-- Une liste est aussi un type simple ! -->\r
+ <!-- <xs:simpleType name="T_list_anySimpleType">\r
+ <xs:list itemType="xs:anySimpleType"/>\r
+ </xs:simpleType>\r
+-->\r
+ <!-- Le fait de ne pas déclarer une liste risque d'être problématique pour le parsing : A voir-->\r
+ <xs:complexType name="T_tuple">\r
+ <xs:simpleContent>\r
+ <xs:extension base="xs:anySimpleType">\r
+ <xs:attribute name="n" type="xs:int" use="required"/>\r
+ </xs:extension>\r
+ </xs:simpleContent>\r
+ </xs:complexType>\r
+ <xs:simpleType name="T_classe_utilisateur">\r
+ <xs:restriction base="AT_nom"/>\r
+ </xs:simpleType>\r
+ <xs:element name="typesimple" type="T_simple"/>\r
+ <xs:element name="matrice_double" type="T_Matrice_double"/>\r
+ <xs:element name="matrice_symetrique_double" type="T_Matrice_Symetrique_double"/>\r
+ <xs:element name="tuple" type="T_tuple"/>\r
+ <xs:element name="classe_utilisateur" type="T_classe_utilisateur"/>\r
+ <!-- Essai -->\r
+ <!-- <xs:group name="T_Attendu_group1">\r
+ <xs:choice>\r
+ <xs:element ref="typesimple"/>\r
+ <xs:element ref="matrice_double"/>\r
+ <xs:element ref="matrice_symetrique_double"/>\r
+ <xs:element ref="tuple"/>\r
+ <xs:element ref="classe_utilisateur"/>\r
+ </xs:choice>\r
+ </xs:group>\r
+\r
+ <xs:group name="T_Attendu_group2">\r
+ <xs:choice>\r
+ <xs:element ref="typesimple"/>\r
+ <xs:element ref="matrice_double"/>\r
+ <xs:element ref="matrice_symetrique_double"/>\r
+ <xs:element ref="tuple"/>\r
+ <xs:element ref="classe_utilisateur"/>\r
+ <xs:element ref="fonction_utilisateur" minOccurs="1" maxOccurs="unbounded"/>\r
+ </xs:choice>\r
+ </xs:group>\r
+\r
+ <xs:complexType name="T_typeAttendu">\r
+ <xs:group ref="T_Attendu_group1"/>\r
+ </xs:complexType>\r
+ -->\r
+ <!-- Faire plutot un groupe de substitution pour ne pas croiser les choix -->\r
+ <!--\r
+ <xs:complexType name="T_into">\r
+ <xs:group ref="T_Attendu_group2"/>\r
+ </xs:complexType>\r
+ -->\r
+ <xs:complexType name="T_into">\r
+ <xs:choice>\r
+ <!-- <xs:element ref="typesimple" type="T_Base"/>-->\r
+ <xs:element ref="typesimple" minOccurs="0" maxOccurs="unbounded"/>\r
+ <xs:element ref="matrice_double" minOccurs="0" maxOccurs="unbounded"/>\r
+ <xs:element ref="matrice_symetrique_double" minOccurs="0" maxOccurs="unbounded"/>\r
+ <xs:element ref="tuple" minOccurs="0" maxOccurs="unbounded"/>\r
+ <xs:element ref="classe_utilisateur" minOccurs="0" maxOccurs="unbounded"/>\r
+ <xs:element ref="fonction_utilisateur" minOccurs="1" maxOccurs="unbounded"/>\r
+ </xs:choice>\r
+ </xs:complexType>\r
+ <xs:complexType name="T_typeAttendu">\r
+ <xs:complexContent>\r
+ <xs:restriction base="T_into">\r
+ <xs:choice>\r
+ <xs:element ref="typesimple" minOccurs="0" maxOccurs="unbounded"/>\r
+ <xs:element ref="matrice_double" minOccurs="0" maxOccurs="unbounded"/>\r
+ <xs:element ref="matrice_symetrique_double" minOccurs="0" maxOccurs="unbounded"/>\r
+ <xs:element ref="tuple" minOccurs="0" maxOccurs="unbounded"/>\r
+ <xs:element ref="classe_utilisateur" minOccurs="0" maxOccurs="unbounded"/>\r
+ </xs:choice>\r
+ </xs:restriction>\r
+ </xs:complexContent>\r
+ </xs:complexType>\r
+</xs:schema>\r
+<!-- Catalogue EFFICAS équivalent\r
+\r
+# coding: utf-8\r
+from Accas import *\r
+\r
+class carte (ASSD) : pass\r
+class maille (ASSD) : pass\r
+class carte_flux_r (carte):pass\r
+\r
+class NOM_CHAM_INTO:\r
+ def __call__(self, *l_typ_cham, **kwargs):\r
+ return tuple(('A','B','C'))\r
+C_NOM_CHAM_INTO = NOM_CHAM_INTO()\r
+\r
+JdC = JDC_CATA(code='MAP',\r
+ execmodul=None,\r
+ regles=ENSEMBLE('E1','E2','E3')\r
+ )\r
+\r
+CREECARTE = OPER(nom="CREECARTE",op=None, sd_prod=carte, UNITE=SIMP(statut='f',typ='I',defaut=21),);\r
+\r
+CREECARTEFLUX = OPER(nom="CREECARTEFLUX",op=None, sd_prod=carte_flux_r,\r
+ NOMFLUX=SIMP(statut='o',typ='TXM',defaut='monFlux'),\r
+ );\r
+\r
+CREEMAILLE = OPER(nom="CREEMAILLE",op=None, sd_prod=maille,\r
+ NOEUDS=SIMP(statut='o',typ='I',defaut=(1,2),min=2,max=2)\r
+ );\r
+\r
+E1=PROC(nom="E1",\r
+ op=None,\r
+ regles = (EXCLUS('ETAT_INIT','RESULTAT',),),\r
+ ETAT_INIT = FACT(statut='f', max='**',\r
+ GROUP_MA_1=SIMP(statut='o',typ='I',validators=NoRepeat(),max='**'),\r
+ GROUP_NO_2=SIMP(statut='f',typ='I',validators=NoRepeat(),max='**'),\r
+ ),\r
+\r
+ RESULTAT = FACT(statut='f',\r
+ DEPL=SIMP(statut='o', typ='R', validators=NoRepeat()),\r
+ VITE=SIMP(statut='f', typ='R', validators=NoRepeat()),\r
+ ACCE=SIMP(statut='f', typ='R', validators=NoRepeat()),\r
+ ), \r
+ );\r
+\r
+E2=PROC(nom="E2", op=None,\r
+ regles = (UN_PARMI('CONCEPT','CHAINE','TOUT' ),),\r
+ CONCEPT = FACT(statut='f',max='**',\r
+ NOM = SIMP(statut='o',typ=assd,validators=NoRepeat(),max='**'),\r
+ ),\r
+ CHAINE = SIMP(statut='f',typ='TXM'),\r
+ POSITION = SIMP(statut='f',typ='I',defaut=1),\r
+ TOUT = SIMP(statut='f',typ='TXM',into=("OUI",) ),\r
+ );\r
+\r
+E3=PROC(nom="E3",op=None,\r
+ DEFORMATION = SIMP(statut='f',typ='TXM',defaut="PETIT",\r
+ into=("PETIT","PETIT_REAC","GROT_GDEP","SIMO_MIEHE","GDEF_HYPO_ELAS","GDEF_LOG")),\r
+ b_blocIn = BLOC(condition = "DEFORMATION in ('PETIT','PETIT_REAC','GROT_GDEP')",\r
+ ITER_INTE_PAS = SIMP(statut='f',typ='I',defaut= 0 ),\r
+ ALGO_INTE = SIMP(statut='f',typ='TXM',into=("ANALYTIQUE", "SECANTE", "DEKKER", "NEWTON_1D","BRENT",),),\r
+ CARTE = SIMP(statut='f',typ=carte,),\r
+ b_carte = BLOC(condition= "(AsType(CARTE) != carte_flux_r)",\r
+ CONTRAINTE = SIMP(statut='f',typ='TXM',validators=NoRepeat(),max='**',\r
+ fr="Options pour le calcul de contraintes et efforts generalises",\r
+ into=C_NOM_CHAM_INTO(phenomene='CONTRAINTE',categorie='lin'),)\r
+ ),\r
+ ), \r
+ );\r
+\r
+-->\r
--- /dev/null
+# -*- coding: utf-8 -*-
+#
+# Copyright (C) 2008-2016 EDF R&D
+#
+# This file is part of SALOME ADAO module
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
+"""
+ Ce module sert pour charger les paramètres de configuration d'EFICAS
+"""
+# Modules Python
+import os, sys, string, types, re
+
+
+# Modules Eficas
+from InterfaceQT4 import configuration
+
+# Classe de base permettant de lire, afficher
+# et sauvegarder les fichiers utilisateurs
+
+class CONFIG(configuration.configBase):
+
+ def __init__(self,appli,repIni):
+
+ self.labels_eficas=['lang','rep_cata','catalogues','closeAutreCommande','closeFrameRechercheCommande','closeEntete','taille']
+ configuration.configBase.__init__(self,appli,repIni)
+
+ self.rep_user = os.environ["HOME"]
+ self.appli = appli
+ self.code = appli.code
+ self.rep_ini = repIni
+ self.savedir = self.rep_user
+
+def make_config(appli,rep):
+ return CONFIG(appli,rep)
+
--- /dev/null
+# Copyright (C) 2007-2012 EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+code="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__)))
--- /dev/null
+# -*- 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
+
+#
+typeDeCata='XML'
+catalogues=(
+ ('med','med',os.path.join(repIni,'cata_med.py'),'dico','xml'),
+)
+
+++ /dev/null
-# -*- 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
-fileName="docMonCode.png"
-image=1
-
-#
-catalogues=(
- ('monCode','53038',os.path.join(repIni,'Matrix_Cata.py'),'dico','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'),
-)
--- /dev/null
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+# Copyright (C) 2007-2017 EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+"""
+"""
+# Modules Python
+
+# Modules Eficas
+import prefs
+name='prefs_'+prefs.code
+__import__(name)
+
+#import sys
+#reload(sys)
+#sys.setdefaultencoding('latin1')
+
+from InterfaceQT4 import eficas_go
+print eficas_go
+eficas_go.lanceEficas(code=prefs.code)