From: bourcier <> Date: Mon, 21 May 2007 07:45:40 +0000 (+0000) Subject: Mis à niveau avec la branche V3_2_0_maintenance,tag V3_2_6. X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=5a1e0a69235ceb5509f5e1320a5d4917bb65c297;p=modules%2Feficas.git Mis à niveau avec la branche V3_2_0_maintenance,tag V3_2_6. --- diff --git a/src/EFICASGUI/eficasSalome.py b/src/EFICASGUI/eficasSalome.py index 1977d49a..b159cb7a 100644 --- a/src/EFICASGUI/eficasSalome.py +++ b/src/EFICASGUI/eficasSalome.py @@ -5,7 +5,7 @@ from Logger import ExtLogger import qt import notifqt # ----------------------------------------------------------------------------- -import sys, os, re, types +import sys, os, re,types @@ -248,7 +248,6 @@ class MyEficas( Tkinter.Toplevel, eficas.EFICAS ): def destroy(self): global appli appli = None - print "hhhhhhhhhhhhhhhhhhhhh" Tkinter.Toplevel.destroy(self) def __studySync( self ): @@ -280,24 +279,25 @@ class MyEficas( Tkinter.Toplevel, eficas.EFICAS ): """ #salome.salome_init() import iparameters - + # On détermine le nombre de GUI states déjà présents dans l'arbre d'étude GUIStateID = 1 - + ipar = iparameters.IParameters(salome.myStudy.GetCommonParameters("Interface Applicative", GUIStateID)) properties = ipar.getProperties() - + while properties != []: GUIStateID += 1 ipar = iparameters.IParameters(salome.myStudy.GetCommonParameters("Interface Applicative", GUIStateID)) properties = ipar.getProperties() - + print "GUIStateID: ", GUIStateID - + #Set up visual properties: ipar.setProperty("AP_ACTIVE_VIEW", "OCCViewer_0_0") ipar.setProperty("AP_WORKSTACK_INFO", "(splitter orientation=0 sizes=1045 (views active='OCCViewer_0_0' 'OCCViewer_0_0'))") ipar.setProperty("AP_SAVEPOINT_NAME", "GUI state: %i"%(GUIStateID)) + #Set up lists: # fill list AP_VIEWERS_LIST ipar.append("AP_VIEWERS_LIST", "OCCViewer_1") @@ -322,6 +322,7 @@ class MyEficas( Tkinter.Toplevel, eficas.EFICAS ): return selMeshEntry, keep + def __selectMainShape( self, groupeMaNamesIn, groupeNoNamesIn, jdcID ): """ Sélection intéractive de la main shape @@ -374,7 +375,9 @@ class MyEficas( Tkinter.Toplevel, eficas.EFICAS ): pass return groupeMaNamesOut, groupeNoNamesOut - + + + def __selectShape( self, jdcID, selectedEntry, kwType = None ): """ @@ -475,22 +478,33 @@ class MyEficas( Tkinter.Toplevel, eficas.EFICAS ): """ groupMa = () try: - itemName = item.get_nom() + itemName = item.get_nom() if 'GROUP_MA' in itemName: + #print 'CS_pbruno itemName',itemName itemValue = item.get_valeur() if type( itemValue ) == str: groupMa += ( itemValue , ) elif type( itemValue ) == tuple: - groupMa += itemValue - elif type( itemValue ) == types.InstanceType and itemValue.has_key('GROUP_MA'): + groupMa += itemValue + elif type( itemValue ) == list: + groupMa += tuple(itemValue) + elif type( itemValue ) == types.InstanceType and itemValue.has_key('GROUP_MA'): # pour créer le groupe de mailles dans DEFI_GROUP> CREA_GROUP_MA> GROUP_MA - groupMa += ( itemValue['GROUP_MA'], ) + groupMa += ( itemValue['GROUP_MA'], ) else: children = item._GetSubList() for child in children: groupMa += self.__getAllGroupeMa( child ) except: - pass + # traitement des MCLIST Pour CREA_GROUP_MA + try: + itemName = item.get_nom() + if 'GROUP_MA' in itemName: + children = item._GetSubList() + for child in children: + groupMa += self.__getAllGroupeMa( child ) + except: + pass return groupMa @@ -502,20 +516,30 @@ class MyEficas( Tkinter.Toplevel, eficas.EFICAS ): try: itemName = item.get_nom() if 'GROUP_NO' in itemName: - itemValue = item.get_valeur() + itemValue = item.get_valeur() if type( itemValue ) == str: groupNo += ( itemValue , ) elif type( itemValue ) == tuple: groupNo += itemValue - elif type( itemValue ) == types.InstanceType and itemValue.has_key('GROUP_NO'): - # pour créer le groupe de noeuds dans DEFI_GROUP> CREA_GROUP_NO> GROUP_NO - groupNo += ( itemValue['GROUP_NO'], ) + elif type( itemValue ) == list: + groupNo += tuple(itemValue) + elif type( itemValue ) == types.InstanceType and itemValue.has_key('GROUP_NO'): + # pour créer le groupe de Noeuds dans DEFI_GROUP> CREA_GROUP_NO> GROUP_NO + groupNo += ( itemValue['GROUP_NO'], ) else: children = item._GetSubList() for child in children: groupNo += self.__getAllGroupeNo( child ) except: - pass + # traitement des MCLIST Pour CREA_GROUP_NO dans DEFI_GROUP + try: + itemName = item.get_nom() + if 'GROUP_NO' in itemName: + children = item._GetSubList() + for child in children: + groupNo += self.__getAllGroupeNo( child ) + except: + pass return groupNo @@ -741,7 +765,7 @@ class MyEficas( Tkinter.Toplevel, eficas.EFICAS ): ok, msgError = self.displayMeshGroups(shapeName) else: #geometrie print 'Vue courante = OCC : affichage element geometrique' -# self.__createOCCView() + #self.__createOCCView() current_color = COLORS[ self.icolor % LEN_COLORS ] ok = studyManager.palStudy.displayShapeByName( shapeName, current_color ) salome.sg.FitAll()