return object
+ #-------------------------------------
+ def giveMeshGroups( self,entry):
+ #-------------------------------------
+ msg=None
+ names=[]
+ import SMESH
+ try:
+ monMaillage =self.getCORBAObjectInComponent(entry,"SMESH")
+ if monMaillage != None : # selection d'un groupe de SMESH
+ if monMaillage._narrow(SMESH.SMESH_Mesh):
+ mailSO = self.editor.study.FindObjectID(entry)
+ if mailSO == None : return names, msg
+
+# on ajoute deja le maillage
+ name=mailSO.GetName()
+ names.append(name)
+
+# on ajoute deja le maillage
+ subIt = self.editor.study.NewChildIterator(mailSO)
+ while subIt.More():
+ subSO = subIt.Value()
+ subIt.Next()
+
+ if (subSO.GetName()[0:9]!="SubMeshes") : continue
+ subSSMeshit=self.editor.study.NewChildIterator(subSO)
+ while subSSMeshit.More():
+ subSSMeshSO = subSSMeshit.Value()
+ subSSMeshit.Next()
+ if subSSMeshSO.GetObject()._narrow(SMESH.SMESH_subMesh):
+ names.append(subSSMeshSO.GetName())
+ else :
+ msg=entry + " n est pas un maillage"
+ except :
+ logger.debug(' giveMeshGroups pb avec ( entry = %s ) ' %entry )
+ msg=' giveMeshGroup pb avec ( entry = %s ) '+ entry
+ return names, msg
+
#-------------------------------------
def isMeshGroup( self,entry):
#-------------------------------------
import SMESH
try:
monObjet =self.getCORBAObjectInComponent(entry,"SMESH")
- #print monObjet
if monObjet != None : # selection d'un groupe de SMESH
if monObjet._narrow(SMESH.SMESH_GroupBase):
result = True
- #print result
except :
logger.debug(' isMeshGroup pb avec ( entry = %s ) ' %entry )
return result
'OPENTURNS': "FICHIER_EFICAS_OPENTURNS",
'OPENTURNS_STUDY': "FICHIER_EFICAS_OPENTURNS_STUDY",
'OPENTURNS_WRAPPER': "FICHIER_EFICAS_OPENTURNS_WRAPPER",
+ 'CARMEL3D': "FICHIER_EFICAS_OPENTURNS_WRAPPER",
}
folderName = { 'ASTER' : 'AsterFiles',
'SEP' : 'OMFiles' ,
+ 'CARMEL3D' : 'CARMEL3DFiles' ,
'MAP' : 'MapFiles' ,
'OPENTURNS_STUDY': 'OpenturnsFiles',
'OPENTURNS_WRAPPER': 'OpenturnsFiles'}
folderType = { 'ASTER': "ASTER_FILE_FOLDER",
'SEP': "SEP_FILE_FOLDER",
'MAP': "MAP_FILE_FOLDER",
+ 'CARMEL3D': "CARMEL3D_FILE_FOLDER",
'OPENTURNS_STUDY':"OPENTURNS_FILE_FOLDER",
'OPENTURNS_WRAPPER': "OPENTURNS_FILE_FOLDER"}
logger.debug(50*'=')
return ok, msgError
+ #---------------------------------------
+ def ChercheGrpMeshInSalome(self):
+ print "je passe par la"
+ names, msg = [], ''
+ #try :
+ if 1 :
+ entries = salome.sg.getAllSelected()
+ nbEntries = len( entries )
+ names, msg = None, "Selection SALOME non autorisee."
+ if nbEntries == 1:
+ for entry in entries:
+ print entry
+ names,msg=self.giveMeshGroups(entry)
+ print names
+ #except :
+ else :
+ print "bim bam boum"
+ return(msg,names)
+
+ #---------------------------------------
# def buildCabriGeom( self, name, **param ):
"""