def check_FSVK(self, checker): # objet .FSVK #=============================================================== fsvk = self.FSVK.get() fsvi = self.FSVI.get() type_faisceau, couplage = self.u_veri1() if type_faisceau == 1: # FAISCEAU_TRANS #----------------------------------------- nbzone = fsvi[1] assert len(fsvk) == 4 + nbzone, fsvk carel = fsvk[0].strip() assert carel != '', fsvk sd2 = sd_cara_elem(carel) sd2.check(checker) assert fsvk[1].strip() in ('DX', 'DY', 'DZ'), fsvk for k in range(2, 4 + nbzone): sd2 = sd_fonction(fsvk[k]) sd2.check(checker) elif type_faisceau == 2: # GRAPPE #----------------------------------------- if couplage: assert len(fsvk) == 4, (fsvk, self) assert fsvk[0] != '', (fsvk, self) # on pourrait vérifier que fsvk[1] est un nom de noeud assert fsvk[1] != '', (fsvk, self) sd2 = sd_cara_elem(fsvk[2].strip()) sd2.check(checker) sd2 = sd_modele(fsvk[3].strip()) sd2.check(checker) else: assert not fsvk, (fsvk, self) elif type_faisceau == 3: # FAISCEAU_AXIAL #----------------------------------------- lsimplif = fsvi[0] if not lsimplif: assert len(fsvk) == 3, (fsvk, self) sd2 = sd_fonction(fsvk[0].strip()) sd2.check(checker) sd2 = sd_fonction(fsvk[1].strip()) sd2.check(checker) sd2 = sd_cara_elem(fsvk[2].strip()) sd2.check(checker) else: assert len(fsvk) == 2, (fsvk, self) sd2 = sd_fonction(fsvk[0].strip()) sd2.check(checker) sd2 = sd_fonction(fsvk[1].strip()) sd2.check(checker) elif type_faisceau == 4: # COQUE_COAX #----------------------------------------- assert len(fsvk) == 3, (fsvk, self) sd2 = sd_cara_elem(fsvk[0].strip()) sd2.check(checker) sd2 = sd_mater(fsvk[1].strip()) sd2.check(checker) sd2 = sd_mater(fsvk[2].strip()) sd2.check(checker)
def check_CIMPO_FONC(self, checker): if self.CIMPO.VALE.ltyp != 24: return vale = self.CIMPO.VALE.get() for x in vale: if x.strip() == '': continue nomfon = x[:19] sd2 = sd_fonction(nomfon) sd2.check(checker)
def check_table_fonction_i_COL_FONC(self, checker): shape = self.TBNP.get() if shape is None: return desc = self.TBLP.get() for n in range(shape[0]): nomcol = desc[4 * n].strip() if not (nomcol == 'FONCTION' or nomcol == 'FONCTION_C'): continue col_d, col_m = self.get_column_name(nomcol) lnom = col_d.data.get() if not lnom: return for nom1 in lnom: if not nom1.strip(): continue sd2 = sd_fonction(nom1) sd2.check(checker)
def check_VALE(self, checker): if not self.exists(): return n1 = self.VALE.lonmax desc = self.DESC.get() n_gd_max = desc[1] numgd = desc[0] ncmp_max = len(sdu_licmp_gd(numgd)) assert n1 == ncmp_max * n_gd_max, (n1, ncmp_max, n_gd_max) # parfois, la carte contient des fonctions crees pendant la commande : if self.VALE.type == 'K': nom_concept = self.nomj()[:8] vale = self.VALE.get() for nom in vale: if len(nom.strip()) == 0: continue nom8 = nom[:8] if nom8 == nom_concept: sd2 = sd_fonction(nom) if sd2.PROL.exists: sd2.check(checker)
def check_VATE(self, checker): #------------------------------- vate = self.VATE.get_stripped() type = self.u_type() if type == 'SPEC_EXCI_POINT': #--------------------------------- intesp, nbno = self.u_nbno() if intesp == 0: assert len(vate) == 4 + nbno, vate else: assert len(vate) == 5, vate sd2 = sd_cara_elem(vate[1]) sd2.check(checker) sd2 = sd_modele(vate[2]) sd2.check(checker) if vate[3] == 'GRAPPE_2': assert vate[4] in ('ASC_CEN', 'ASC_EXC', 'DES_CEN', 'DES_EXC') else: for x in vate[4:]: assert x in ('FORCE', 'MOMENT') elif type == 'SPEC_FONC_FORME': #--------------------------------- intesp, nbno = self.u_nbno() if intesp == 0: nbfonc = len(vate) - 4 assert nbfonc > 0, vate else: assert len(vate) == 5, vate sd2 = sd_cara_elem(vate[1]) sd2.check(checker) sd2 = sd_modele(vate[2]) sd2.check(checker) if vate[3] == 'GRAPPE_1': assert vate[4] in ('DEBIT_180', 'DEBIT_300') else: for x in vate[4:]: sd2 = sd_table_fonction(x) sd2.check(checker) elif type == 'SPEC_LONG_COR_1': #--------------------------------- sd2 = sd_fonction(vate[2]) sd2.check(checker) assert vate[3] == 'VISC_CINE' elif type == 'SPEC_LONG_COR_2': #--------------------------------- sd2 = sd_fonction(vate[2]) sd2.check(checker) assert vate[5] == 'BETA' elif type == 'SPEC_LONG_COR_3': #--------------------------------- sd2 = sd_fonction(vate[2]) sd2.check(checker) assert vate[7] == 'BETA_2' elif type == 'SPEC_LONG_COR_4': #--------------------------------- sd2 = sd_fonction(vate[2]) sd2.check(checker) assert vate[5] == 'GAMMA' elif type == 'SPEC_CORR_CONV_1': #--------------------------------- assert vate[9] == 'COEF_VITE_FLUI_O' assert vate[10] in ('GENERALE', 'CORCOS', 'AU_YANG') elif type == 'SPEC_CORR_CONV_2': #--------------------------------- sd2 = sd_fonction(vate[1]) sd2.check(checker) assert vate[4] in ('GENERALE', 'CORCOS', 'AU_YANG') assert vate[6] == 'COEF_VITE_FLUI_O' elif type == 'SPEC_CORR_CONV_3': #--------------------------------- sd2 = sd_table_fonction(vate[1]) sd2.check(checker)