import qt
import notifqt
# -----------------------------------------------------------------------------
-import sys, os, re, types
+import sys, os, re,types
def destroy(self):
global appli
appli = None
- print "hhhhhhhhhhhhhhhhhhhhh"
Tkinter.Toplevel.destroy(self)
def __studySync( self ):
"""
#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")
return selMeshEntry, keep
+
def __selectMainShape( self, groupeMaNamesIn, groupeNoNamesIn, jdcID ):
"""
Sélection intéractive de la main shape
pass
return groupeMaNamesOut, groupeNoNamesOut
-
+
+
+
def __selectShape( self, jdcID, selectedEntry, kwType = None ):
"""
"""
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
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
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()