예제 #1
0
 def __init__(self):
     VisItemParams.__init__(self)
     PartTransformParams.__init__(self)
     self.name = 'SceneGraphItem'
     self.isVisible = True
     coSceneGraphItemParams.mergeDefaultParams(
         self)  # explicitly call mergeDefaultParams of this class
예제 #2
0
 def __init__(self):
     VisItemParams.__init__(self)
     self.name = 'Part2DStaticColorVisParams'
     self.r = 255
     self.g = 255
     self.b = 255
     self.a = 255
예제 #3
0
 def __init__(self):
     VisItemParams.__init__(self)
     self.name = 'Part2DStaticColorVisParams'
     self.r = 255
     self.g = 255
     self.b = 255
     self.a = 255
예제 #4
0
 def __init__(self):
     VisItemParams.__init__(self)
     self.name = 'DocumentMgrParams'
     self.singlePage = False
     self.changed = False
     coDocumentMgrParams.mergeDefaultParams(
         self)  # explicitly call mergeDefaultParams of this class
예제 #5
0
 def __init__(self):
     VisItemParams.__init__(self)
     self.name    = 'Viewpoint'
     self.view    = None
     self.id      = None
     self.confirmed = True # viewpoint id need to be confirmed from cover
     self.changed = False
     coViewpointParams.mergeDefaultParams(self) # explicitly call mergeDefaultParams of this class
예제 #6
0
 def __init__(self):
     VisItemParams.__init__(self)
     self.name = 'CoviseVisParams'
     self.filename = ''
     self.stepNo = 0
     self.rotate_output = False
     self.rotation_axis = 3
     self.rot_speed = 2.0
예제 #7
0
 def __init__(self):
     VisItemParams.__init__(self)
     self.name = 'Viewpoint'
     self.view = None
     self.id = None
     self.confirmed = True  # viewpoint id need to be confirmed from cover
     self.changed = False
     coViewpointParams.mergeDefaultParams(
         self)  # explicitly call mergeDefaultParams of this class
예제 #8
0
파일: coDNAMgr.py 프로젝트: nixz/covise
 def __init__(self):
     VisItemParams.__init__(self)
     PartTransformParams.__init__(self)
     self.name   = 'DNAItem'
     self.isVisible = True
     self.connectionPoints = {}
     self.connectionPointsDisable = {}            
     self.connectedUnit = {}
     self.matrix = [1,0,0,0 ,0,1,0,0 ,0,0,1,0 ,0,0,0,1]
     coDNAItemParams.mergeDefaultParams(self) # explicitly call mergeDefaultParams of this class
예제 #9
0
파일: coDNAMgr.py 프로젝트: zyzwhdx/covise
 def __init__(self):
     VisItemParams.__init__(self)
     PartTransformParams.__init__(self)
     self.name = 'DNAItem'
     self.isVisible = True
     self.connectionPoints = {}
     self.connectionPointsDisable = {}
     self.connectedUnit = {}
     self.matrix = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]
     coDNAItemParams.mergeDefaultParams(
         self)  # explicitly call mergeDefaultParams of this class
예제 #10
0
 def isStaticParam(self, paramname):
     if VisItemParams.isStaticParam(self, paramname):
         return True
     return paramname in ["filename"]
예제 #11
0
 def isStaticParam(self, paramname):
     if VisItemParams.isStaticParam(self, paramname):
         return True
     return paramname in ["openCOVER2key"]
예제 #12
0
 def isStaticParam(self, paramname):
     if VisItemParams.isStaticParam(self, paramname):
         return True
     return paramname in [
         "filename", "sensorIDs", "sceneGraphItems_startIndex"
     ]
예제 #13
0
 def __init__(self):
     VisItemParams.__init__(self)
     self.name = 'SceneObjectVisParams'
     SceneObjectVisParams.mergeDefaultParams(
         self)  # explicitly call mergeDefaultParams of this class
예제 #14
0
def testRequest():
    """Example for requesting something at the theGuiMsgHandler()."""
    keepReference = QApplication(sys.argv)

    initHandlers()

    g = theGuiMsgHandler()

    g.registerAddCallback(SESSION_KEY, createProjectPanel)
    reqId = g.requestObject(TYPE_PROJECT)
    g.waitforAnswer(reqId)

    reqId = g.requestObject(TYPE_CASE, None, project_key)
    g.waitforAnswer(reqId)

    caseP = coCaseMgrParams()
    nameAndCase = NameAndCoviseCase()
    nameAndCase.setFromFile('/work/common/Projekte/DC-CFDGui/datasets/'
                            'TINY/CoviseDaten/TINY.cocase')
    #nameAndCase.setFromFile(
    #        '/work/common/Projekte/DC-CFDGui/datasets/'
    #        'msport/CoviseDaten/msport.cocase')

    caseP.origDsc = caseP.filteredDsc = coviseCase2DimensionSeperatedCase(
        nameAndCase.case, nameAndCase.name, nameAndCase.pathToCaseFile)
    g.setParams(case_key1, caseP)

    # testing static coloring
    if testMode == VIS_2D_STATIC_COLOR:
        colP = Part2DStaticColorVisParams()
        colP.g = 0
        g.setParams(VisColor_key, colP)

        status()

        reqId = g.runObject(case_key1)
        g.waitforAnswer(reqId)

        colP.r = 255
        colP.g = 0
        colP.b = 0
        g.setParams(VisColor_key, colP)
        g.runObject(case_key1)

    #testing scalar coloring
    elif testMode == VIS_2D_SCALAR_COLOR:
        colP = Part2DScalarColorVisParams()
        colP.variable = scalar_variable
        g.setParams(VisColor_key, colP)
        g.runObject(case_key1)

    elif testMode == VIS_STREAMLINE:
        streamP = PartStreamlineVisParams()
        streamP.variable = vector_variable
        """
        colorP = coColorCreator()
        ctableP = coColorTableParams()
        ctableP.min = 98
        ctableP.max = 100
        ctableP.colorMapIdx = 2

        ctable = coColorTable()
        ctable.params = ctableP
        colorP.params.colorTable = ctable
        streamP.colorCreator = colorP
        colorP.run(RUN_ALL)
        """
        g.setParams(Tracer_key, streamP)
        r = g.runObject(case_key1, RUN_OCT)
        g.waitforAnswer(r)
        g.runObject(Tracer_key)

        #g.saveObject(0, "/work/sk_te/test.coprj")
        theNet().save("/work/ko_te/testgui.net")

    elif testMode == VIS_STREAMLINE_2D:
        streamP = PartStreamline2DVisParams()
        streamP.variable = vector_variable
        streamP.alignedRectangle = Line3D()
        streamP.alignedRectangle.setStartEndPoint(0.1, -0.6, 0., 0.5, -0.8, 0.)

        g.setParams(Tracer_key, streamP)
        r = g.runObject(case_key1, RUN_OCT)
        g.waitforAnswer(r)
        g.runObject(Tracer_key)
        theNet().save("/work/sk_te/test.net")
        status()

    elif testMode == VIS_PLANE:
        planeP = PartPlaneVisParams()
        planeP.variable = vector_variable
        planeP.alignedRectangle.middle = (0, 0, 1)
        """
        colorP = coColorCreator()
        ctableP = coColorTableParams()
        ctableP.min = 98
        ctableP.max = 100
        ctableP.colorMapIdx = 2

        ctable = coColorTable()
        ctable.params = ctableP
        colorP.params.colorTable = ctable
        streamP.colorCreator = colorP
        colorP.run(RUN_ALL)
        """
        g.setParams(Tracer_key, planeP)
        r = g.runObject(case_key1, RUN_OCT)
        g.waitforAnswer(r)
        g.runObject(Tracer_key)

        #g.saveObject(0, "/work/ko_te/test.coprj")
        theNet().save("/work/ko_te/testgui.net")

    elif testMode == VIS_VECTOR:
        vectorP = PartVectorVisParams()
        vectorP.variable = vector_variable
        """
        colorP = coColorCreator()
        ctableP = coColorTableParams()
        ctableP.min = 98
        ctableP.max = 100
        ctableP.colorMapIdx = 2

        ctable = coColorTable()
        ctable.params = ctableP
        colorP.params.colorTable = ctable
        streamP.colorCreator = colorP
        colorP.run(RUN_ALL)
        """
        g.setParams(Tracer_key, vectorP)
        r = g.runObject(case_key1, RUN_OCT)
        g.waitforAnswer(r)
        g.runObject(Tracer_key)

        #g.saveObject(0, "/work/ko_te/test.coprj")
        theNet().save("/work/ko_te/testgui.net")

    elif testMode == VIS_ISOPLANE:
        isoplaneP = PartIsoSurfaceVisParams()
        isoplaneP.variable = vector_variable
        """
        colorP = coColorCreator()
        ctableP = coColorTableParams()
        ctableP.min = 98
        ctableP.max = 100
        ctableP.colorMapIdx = 2

        ctable = coColorTable()
        ctable.params = ctableP
        colorP.params.colorTable = ctable
        streamP.colorCreator = colorP
        colorP.run(RUN_ALL)
        """
        g.setParams(Tracer_key, isoplaneP)
        r = g.runObject(case_key1, RUN_OCT)
        g.waitforAnswer(r)
        g.runObject(Tracer_key)

        #g.saveObject(0, "/work/ko_te/test.coprj")
        theNet().save("/work/ko_te/testgui.net")

    else:
        status()
        g.runObject(case_key1)
        vP = VisItemParams()
        vP.isVisible = True
        g.setParams(VisColor_key, vP)
        theNet().save("/work/sk_te/testgui.net")

    if False:  # True:
        reqId = g.requestObject(TYPE_CASE, None, project_key)
        g.waitforAnswer(reqId)
        caseP = coCaseMgrParams()
        caseP.filename = ('/work/common/Projekte/DC-CFDGui/datasets/'
                          'msport/CoviseDaten/msport.cocase')
        g.setParams(case_key1, caseP)
예제 #15
0
 def isStaticParam(self, paramname):
     if VisItemParams.isStaticParam(self, paramname):
         return True
     return paramname in ["openCOVER2key"]
예제 #16
0
 def __init__(self):
     VisItemParams.__init__(self)
     self.name = 'Part2DScalarColorVisParams'
     self.variable = 'T'
     self.numSteps = 16
     self.colorTable = 0
예제 #17
0
 def __init__(self):
     VisItemParams.__init__(self)
     self.boundingBox = None
     self.variable = None
     PartModuleVisParams.mergeDefaultParams(
         self)  # explicitly call mergeDefaultParams of this class
예제 #18
0
파일: VrmlVis.py 프로젝트: nixz/covise
 def isStaticParam(self, paramname):
     if VisItemParams.isStaticParam(self, paramname):
         return True
     return paramname in ["filename", "sensorIDs", "sceneGraphItems_startIndex"]
예제 #19
0
 def isStaticParam(self, paramname):
     if VisItemParams.isStaticParam(self, paramname):
         return True
     return paramname in ["filename"]
예제 #20
0
 def isStaticParam(self, paramname):
     if VisItemParams.isStaticParam(self, paramname):
         return True
     return paramname in ["nodeClassName"]
예제 #21
0
 def forward(self, key, isOn):
     aux = VisItemParams()
     aux.isVisible = isOn
     theGuiMsgHandler().setParams(key, aux)
예제 #22
0
 def __init__(self):
     VisItemParams.__init__(self)
     self.name         = 'SceneGraphMgrParams'
     coSceneGraphMgrParams.mergeDefaultParams(self) # explicitly call mergeDefaultParams of this class
예제 #23
0
 def __init__(self):
     VisItemParams.__init__(self)
     self.boundingBox = None
     self.variable = None
     PartModuleVisParams.mergeDefaultParams(self) # explicitly call mergeDefaultParams of this class
예제 #24
0
 def __init__(self):
     VisItemParams.__init__(self)
     self.name = 'Part2DScalarColorVisParams'
     self.variable    = 'T'
     self.numSteps    = 16
     self.colorTable  = 0
예제 #25
0
 def forward(self, key, isOn):
     aux = VisItemParams()
     aux.isVisible = isOn
     theGuiMsgHandler().setParams(key, aux)
예제 #26
0
 def __init__(self):
     VisItemParams.__init__(self)
     PartTransformParams.__init__(self)
     self.name   = 'SceneGraphItem'
     self.isVisible = True
     coSceneGraphItemParams.mergeDefaultParams(self) # explicitly call mergeDefaultParams of this class
예제 #27
0
파일: VrmlVis.py 프로젝트: nixz/covise
 def __init__(self):
     VisItemParams.__init__(self)
     self.name = "VrmlVisParams"
     VrmlVisParams.mergeDefaultParams(self)  # explicitly call mergeDefaultParams of this class
예제 #28
0
 def isStaticParam(self, paramname):
     if VisItemParams.isStaticParam(self, paramname):
         return True
     return paramname in ["nodeClassName"]
예제 #29
0
 def __init__(self):
     VisItemParams.__init__(self)
     self.name = 'SceneObjectVisParams'
     SceneObjectVisParams.mergeDefaultParams(self) # explicitly call mergeDefaultParams of this class
예제 #30
0
파일: coDNAMgr.py 프로젝트: zyzwhdx/covise
 def __init__(self):
     VisItemParams.__init__(self)
     self.name = 'DNAMgrParams'
     coDNAMgrParams.mergeDefaultParams(
         self)  # explicitly call mergeDefaultParams of this class
예제 #31
0
def testRequest():
    """Example for requesting something at the theGuiMsgHandler()."""
    keepReference = QApplication(sys.argv)

    initHandlers()

    g = theGuiMsgHandler()

    g.registerAddCallback(SESSION_KEY, createProjectPanel)
    reqId = g.requestObject(TYPE_PROJECT)
    g.waitforAnswer(reqId)

    reqId = g.requestObject(TYPE_CASE, None, project_key)
    g.waitforAnswer(reqId)

    caseP = coCaseMgrParams()
    nameAndCase = NameAndCoviseCase()
    nameAndCase.setFromFile('/work/common/Projekte/DC-CFDGui/datasets/'
                            'TINY/CoviseDaten/TINY.cocase')
    #nameAndCase.setFromFile(
    #        '/work/common/Projekte/DC-CFDGui/datasets/'
    #        'msport/CoviseDaten/msport.cocase')

    caseP.origDsc = caseP.filteredDsc = coviseCase2DimensionSeperatedCase(nameAndCase.case, nameAndCase.name, nameAndCase.pathToCaseFile)
    g.setParams(case_key1, caseP)

    # testing static coloring
    if testMode==VIS_2D_STATIC_COLOR:
        colP = Part2DStaticColorVisParams()
        colP.g = 0
        g.setParams( VisColor_key, colP )

        status()

        reqId = g.runObject( case_key1 )
        g.waitforAnswer(reqId)

        colP.r = 255
        colP.g = 0
        colP.b = 0
        g.setParams( VisColor_key, colP )
        g.runObject( case_key1 )


    #testing scalar coloring
    elif testMode==VIS_2D_SCALAR_COLOR:
        colP = Part2DScalarColorVisParams()
        colP.variable = scalar_variable
        g.setParams( VisColor_key, colP )
        g.runObject( case_key1 )

    elif testMode==VIS_STREAMLINE:
        streamP = PartStreamlineVisParams()
        streamP.variable = vector_variable
        """
        colorP = coColorCreator()
        ctableP = coColorTableParams()
        ctableP.min = 98
        ctableP.max = 100
        ctableP.colorMapIdx = 2

        ctable = coColorTable()
        ctable.params = ctableP
        colorP.params.colorTable = ctable
        streamP.colorCreator = colorP
        colorP.run(RUN_ALL)
        """
        g.setParams( Tracer_key, streamP )
        r = g.runObject( case_key1, RUN_OCT )
        g.waitforAnswer(r)
        g.runObject( Tracer_key )

        #g.saveObject(0, "/work/sk_te/test.coprj")
        theNet().save("/work/ko_te/testgui.net")
    
    elif testMode==VIS_STREAMLINE_2D:
        streamP = PartStreamline2DVisParams()
        streamP.variable = vector_variable
        streamP.alignedRectangle = Line3D()
        streamP.alignedRectangle.setStartEndPoint(0.1, -0.6, 0., 0.5, -0.8, 0. )
        
        g.setParams( Tracer_key, streamP )
        r = g.runObject( case_key1, RUN_OCT )
        g.waitforAnswer(r)
        g.runObject( Tracer_key )
        theNet().save("/work/sk_te/test.net")
        status()
        
    elif testMode==VIS_PLANE:
        planeP = PartPlaneVisParams()
        planeP.variable = vector_variable
        planeP.alignedRectangle.middle = (0, 0, 1)
        """
        colorP = coColorCreator()
        ctableP = coColorTableParams()
        ctableP.min = 98
        ctableP.max = 100
        ctableP.colorMapIdx = 2

        ctable = coColorTable()
        ctable.params = ctableP
        colorP.params.colorTable = ctable
        streamP.colorCreator = colorP
        colorP.run(RUN_ALL)
        """
        g.setParams( Tracer_key, planeP )
        r = g.runObject( case_key1, RUN_OCT )
        g.waitforAnswer(r)
        g.runObject( Tracer_key )

        #g.saveObject(0, "/work/ko_te/test.coprj")
        theNet().save("/work/ko_te/testgui.net")

    elif testMode==VIS_VECTOR:
        vectorP = PartVectorVisParams()
        vectorP.variable = vector_variable
        """
        colorP = coColorCreator()
        ctableP = coColorTableParams()
        ctableP.min = 98
        ctableP.max = 100
        ctableP.colorMapIdx = 2

        ctable = coColorTable()
        ctable.params = ctableP
        colorP.params.colorTable = ctable
        streamP.colorCreator = colorP
        colorP.run(RUN_ALL)
        """
        g.setParams( Tracer_key, vectorP )
        r = g.runObject( case_key1, RUN_OCT )
        g.waitforAnswer(r)
        g.runObject( Tracer_key )

        #g.saveObject(0, "/work/ko_te/test.coprj")
        theNet().save("/work/ko_te/testgui.net")

    elif testMode==VIS_ISOPLANE:
        isoplaneP = PartIsoSurfaceVisParams()
        isoplaneP.variable = vector_variable
        """
        colorP = coColorCreator()
        ctableP = coColorTableParams()
        ctableP.min = 98
        ctableP.max = 100
        ctableP.colorMapIdx = 2

        ctable = coColorTable()
        ctable.params = ctableP
        colorP.params.colorTable = ctable
        streamP.colorCreator = colorP
        colorP.run(RUN_ALL)
        """
        g.setParams( Tracer_key, isoplaneP )
        r = g.runObject( case_key1, RUN_OCT )
        g.waitforAnswer(r)
        g.runObject( Tracer_key )

        #g.saveObject(0, "/work/ko_te/test.coprj")
        theNet().save("/work/ko_te/testgui.net")

    else :
        status()
        g.runObject( case_key1 )
        vP = VisItemParams()
        vP.isVisible=True
        g.setParams( VisColor_key, vP )
        theNet().save("/work/sk_te/testgui.net")

    if False: # True:
        reqId = g.requestObject(TYPE_CASE, None, project_key)
        g.waitforAnswer(reqId)
        caseP = coCaseMgrParams()
        caseP.filename = (
            '/work/common/Projekte/DC-CFDGui/datasets/'
            'msport/CoviseDaten/msport.cocase')
        g.setParams(case_key1, caseP)
예제 #32
0
 def __init__(self):
     VisItemParams.__init__(self)
     self.name         = 'DocumentMgrParams'
     self.singlePage = False
     self.changed = False
     coDocumentMgrParams.mergeDefaultParams(self) # explicitly call mergeDefaultParams of this class