]> SALOME platform Git repositories - tools/eficas.git/blob - OldCodes/MED/cata_diapo.py
Salome HOME
chgt Copyrigth
[tools/eficas.git] / OldCodes / MED / cata_diapo.py
1 # coding: utf-8
2
3 from Accas import *
4 class Tuple:
5    def __init__(self,ntuple):
6      self.ntuple=ntuple
7
8    def __convert__(self,valeur):
9      import types
10      if type(valeur) == types.StringType:
11        return None
12      if len(valeur) != self.ntuple:
13        return None
14      return valeur
15
16    def info(self):
17      return "Tuple de %s elements" % self.ntuple
18
19    __repr__=info
20    __str__=info
21
22
23
24 class forme ( ASSD ) : pass
25
26 JdC = JDC_CATA (code = 'MED',
27                 execmodul = None,
28                 )
29
30 FORME_GEOMETRIQUE=OPER(nom='FORME_GEOMETRIQUE',sd_prod =forme ,op=None,
31            Forme=SIMP(statut="o",typ='TXM',into=[ 'carre', 'cercle', 'triangle' ],defaut='carre'),
32            bloc_pour_Carre =  BLOC (condition = "Forme=='carre'",
33               Cote=SIMP(statut="o",typ='I'), ) , # fin bloc_pour_carre
34            bloc_pour_cercle =  BLOC (condition ="Forme=='cercle'",
35               rayon=SIMP(statut="o",typ='I'), ) , # fin bloc_pour_cercle
36
37            DE_NOMBREUSES_WIDGETS= FACT(statut="o",
38                 Stop_Criteria = SIMP(statut = 'o',typ = Tuple(3),validators = VerifTypeTuple(('R','R','R'))),
39                 Fichier_Med = SIMP( statut = 'o', typ = ('Fichier', 'Med Files (*.med);;All Files (*)',),),
40                 ListeDeChoixPlusGrande=SIMP(statut="o",typ='TXM',into=['a','b,','c','d','e','f','g','h'],
41                 homo="SansOrdreNiDoublon",),
42                 Un_Parametre_Facultatif=SIMP(statut="f",typ='TXM')
43                 
44            ),
45           Couleur=SIMP(statut = 'f',typ='TXM'),
46           Matiere=SIMP(statut = 'f',typ='TXM'),
47 );
48