コード例 #1
0
ファイル: ObjectMgr.py プロジェクト: nixz/covise
 def getScalarVariablesIntersectionForType(self, key):
     myObject = globalKeyHandler().getObject(key)
     while (myObject.typeNr == TYPE_2D_CUTGEOMETRY_PART):
         myObject = globalKeyHandler().getObject(myObject.parentKey)
     intersection = []
     if myObject and hasattr(myObject, 'importModule') and hasattr(myObject.importModule, 'getParts'):
         for curImportModule in myObject.importModule.getParts():
             if hasattr(curImportModule, 'getPartCase'):
                 partWithVars = curImportModule.getPartCase()
                 if intersection == []:
                     intersection = set( coviseCase.getScalarVariableNames(partWithVars) )
                 else:
                     intersection = intersection & set( coviseCase.getScalarVariableNames(partWithVars) )
     return list(intersection)
コード例 #2
0
ファイル: ObjectMgr.py プロジェクト: zyzwhdx/covise
 def getScalarVariablesIntersectionForType(self, key):
     myObject = globalKeyHandler().getObject(key)
     while (myObject.typeNr == TYPE_2D_CUTGEOMETRY_PART):
         myObject = globalKeyHandler().getObject(myObject.parentKey)
     intersection = []
     if myObject and hasattr(myObject, 'importModule') and hasattr(
             myObject.importModule, 'getParts'):
         for curImportModule in myObject.importModule.getParts():
             if hasattr(curImportModule, 'getPartCase'):
                 partWithVars = curImportModule.getPartCase()
                 if intersection == []:
                     intersection = set(
                         coviseCase.getScalarVariableNames(partWithVars))
                 else:
                     intersection = intersection & set(
                         coviseCase.getScalarVariableNames(partWithVars))
     return list(intersection)
コード例 #3
0
ファイル: ObjectMgr.py プロジェクト: zyzwhdx/covise
 def getPossibleScalarVariablesForType(self, key):
     params = self.getRealParamsOfObject(key)
     if hasattr(params, 'partcase') and (params.partcase != None):
         partWithVars = params.partcase
     else:
         return self.getScalarVariablesIntersectionForType(key)
         #return []
     if type(partWithVars) == type(None):
         return []
     return coviseCase.getScalarVariableNames(partWithVars)
コード例 #4
0
ファイル: ObjectMgr.py プロジェクト: nixz/covise
 def getPossibleScalarVariablesForType( self, key ):
     params = self.getRealParamsOfObject(key)
     if hasattr(params, 'partcase') and (params.partcase != None):
         partWithVars = params.partcase
     else :
         return self.getScalarVariablesIntersectionForType(key)
         #return []
     if type(partWithVars) == type(None):
         return []
     return coviseCase.getScalarVariableNames(partWithVars)