Ejemplo n.º 1
0
 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)
Ejemplo n.º 2
0
 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)
Ejemplo n.º 3
0
 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)
Ejemplo n.º 4
0
 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)