当前位置: 首页>>代码示例>>Python>>正文


Python PartModuleVis.PartModuleVis类代码示例

本文整理汇总了Python中PartModuleVis.PartModuleVis的典型用法代码示例。如果您正苦于以下问题:Python PartModuleVis类的具体用法?Python PartModuleVis怎么用?Python PartModuleVis使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了PartModuleVis类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

    def __init__(self):
        PartModuleVis.__init__(self, VectorField, VIS_VECTORFIELD, self.__class__.__name__,['meshIn'],[],[],[],['vdataIn'])
        PartColoredVis.__init__(self)
        PartTransform.__init__(self, True)

        self.params = PartVectorFieldVisParams()
        self.__initBase()
开发者ID:nixz,项目名称:covise,代码行数:7,代码来源:PartVectorFieldVis.py

示例2: __init

    def __init(self, negMsgHandler):
        """ __init is called from __update"""
        if self.__firstTime == True:
            self.__firstTime = False

            PartModuleVis._init(self, negMsgHandler)
            PartColoredVis._initColor(self, negMsgHandler)
开发者ID:nixz,项目名称:covise,代码行数:7,代码来源:Part2DRawVis.py

示例3: __init__

 def __init__(self):
     PartModuleVis.__init__(self,Collect, VIS_2D_RAW, self.__class__.__name__,['GridIn0'],[],[],[],[],[],[],1,False, False)
     PartColoredVis.__init__(self, False)
     PartTransform.__init__(self)
     self.params = Part2DRawVisParams()
     self.params.isVisible = True
     self.__initBase()
开发者ID:nixz,项目名称:covise,代码行数:7,代码来源:Part2DRawVis.py

示例4: run

    def run(self, runmode, negMsgHandler=None):
        if os.getenv('VR_PREPARE_DEBUG_RUN'):
            print("coColorCreator.run")
        if runmode==RUN_ALL:
            _infoer.function = str(self.run)
            _infoer.write("go Part2DRawVis")


            self.__update(negMsgHandler)


            #if a variable is chosen, run PartColoredVis
            if self.params.variable!=None and self.params.variable!= 'Select a variable' and self.params.color == VARIABLE:
                # At the moment the collect might be executed twice.
                # The "pre-run"-disconnect of PartColoredVis does not work here,
                # because our collect is connected to a different port of the colors module (compared to all the other visualizers).
                colorExecuted = PartColoredVis.run(self, runmode, negMsgHandler, self._module)

            PartModuleVis.run(self, runmode, negMsgHandler)

            if self.params.color==MATERIAL:
                self.__sendMaterial()
            elif self.params.color==RGB_COLOR:
                    self.__sendColor()
            self.__sendTransparency()
            if (self.params.shaderFilename != ""):
                self.__sendShader()

            self.__runChildren(runmode, negMsgHandler)
开发者ID:nixz,项目名称:covise,代码行数:29,代码来源:Part2DRawVis.py

示例5: __init

    def __init(self, negMsgHandler):
        """ __init is called from __update
            + start _module module if it does not already exist and connect output to COVER
            + set default parameters of module
            + set default boundingBox which is also used in the GUI to set borders of the float sliders
            + set color inport and corresponding module
            + send params to the gui
        """
        if self.__firstTime == True:
            self.__firstTime = False
            PartModuleVis._init(self, negMsgHandler)
            PartColoredVis._init(self, negMsgHandler, self.__myColors, 'ColormapIn0')
            self.__register(negMsgHandler)

            # make my custom connections between further self created modules here
            theNet().connect(self._module, 'linesOut', self.__myCollect, 'GridIn0')
            theNet().connect(self.__myColors, 'DataOut0', self.__myCollect, 'DataIn0')
            theNet().connect(self._module, 'dataOut', self.__myColors, 'DataIn0')

            # adjust slider range from bounding box
            # done only once, range wont change anymore
#            maxSideLength = self.params.boundingBox.getMaxEdgeLength()
#            self.params.minScalingValue = -maxSideLength
#            self.params.maxScalingValue =  maxSideLength

            # append variable name to real name if not fromRecreation
            if not self.fromRecreation:
                self.params.name = self.params.name + " (" + self.params.variable + ")"

            # send params to gui
            self.sendParams()
开发者ID:nixz,项目名称:covise,代码行数:31,代码来源:PartVectorFieldVis.py

示例6: recreate

 def recreate(self, negMsgHandler, parentKey, offset):
     """ recreate is called after all classes of the session have been unpickled """
     PartMagmaTraceVisParams.mergeDefaultParams(self.params) # explicitly call mergeDefaultParams of this class
     self.__initBase()
     PartModuleVis.recreate(self, negMsgHandler, parentKey, offset, MagmaTrace, ['geo_in'],[],[],[],['data_in'] )
     PartColoredVis.recreate(self, negMsgHandler, parentKey, offset)
     PartColoredVis.setColorMap(self,True)
开发者ID:nixz,项目名称:covise,代码行数:7,代码来源:PartMagmaTraceVis.py

示例7: setParams

    def setParams( self, params, negMsgHandler=None, sendToCover=True):
        """ set parameters from outside
            + init cutting surface module if necessary
            + mainly receive parameter changes from Gui
            + send status messages to COVER if state has changed
        """
        _infoer.function = str(self.setParams)
        _infoer.write("setParams")

        realChange = ParamsDiff( self.params, params )

        PartModuleVis.setParams(self, params, negMsgHandler, sendToCover, realChange)
        PartColoredVis.setParams(self, params, negMsgHandler, sendToCover, realChange)
        PartInteractorVis.setParams(self, params, negMsgHandler, sendToCover, realChange)
        
        if 'isVisible' in realChange:
            if self.params.isVisible:
                self.sendClipPlane()
            else:
                self.sendClipPlaneOFF()

        if (   ('attachedClipPlane_index' in realChange)
            or ('attachedClipPlane_offset' in realChange)
            or ('attachedClipPlane_flip' in realChange)):
            self.sendClipPlane()
开发者ID:nixz,项目名称:covise,代码行数:25,代码来源:PartCuttingSurfaceVis.py

示例8: __update

    def __update(self, negMsgHandler):
        """ __update is called from the run method to update the module parameter before execution
            + do init if the cutting surface module if necessary
            + update module parameters """
        self.__init(negMsgHandler)
        PartModuleVis._update(self, negMsgHandler)
        PartColoredVis._update(self, negMsgHandler)
        PartInteractorVis._update(self, negMsgHandler)
        
        # other parameters
        aRectangleIn3d1Mid1Norm = convertAlignedRectangleToCutRectangle( self.params.alignedRectangle)
        self._module.set_point(*aRectangleIn3d1Mid1Norm.point)
        self._module.set_vertex(*aRectangleIn3d1Mid1Norm.normal)
        self._module.set_option(1)
        self._module.set_vector(self.params.vector)
        if globalKeyHandler().getObject(self.params.colorTableKey[self.currentVariable()]).params.mode==coColorTableParams.LOCAL :
            self._module.set_autoScales('TRUE')
        else :
            self._module.set_autoScales('FALSE')
        self._module.setTitle( self.params.name )

        # init params in case of arrows
        if hasattr(self.params, 'length'): self._module.set_length(self.params.length)
        if hasattr(self.params, 'scale'):
            self._module.set_scale(0.0, 1.0, self.params.scale)
            self._module.set_num_sectors(3)
        if hasattr(self.params, 'arrow_head_factor'): self._module.set_arrow_head_factor(self.params.arrow_head_factor)
        if hasattr(self.params, 'project_arrows'): self._module.set_project_lines(str(self.params.project_arrows))
开发者ID:nixz,项目名称:covise,代码行数:28,代码来源:PartCuttingSurfaceVis.py

示例9: recreate

 def recreate(self, negMsgHandler, parentKey, offset):
     """ recreate is called after all classes of the session have been unpickled """
     PartClipIntervalVisParams.mergeDefaultParams(self.params) # explicitly call mergeDefaultParams of this class
     self.__initBase()
     PartModuleVis.recreate(self, negMsgHandler, parentKey, offset, ClipInterval, ['GridIn0'],[],[],[],['DataIn0'] )
     PartColoredVis.recreate(self, negMsgHandler, parentKey, offset)
     PartColoredVis.setColorMap(self,True)
开发者ID:nixz,项目名称:covise,代码行数:7,代码来源:PartClipIntervalVis.py

示例10: recreate

 def recreate(self, negMsgHandler, parentKey, offset):
     self.__initBase()
     PartTransform.recreate(self, negMsgHandler, parentKey, offset)
     PartModuleVis.recreate(self, negMsgHandler, parentKey, offset, BoundingBox, ['GridIn0'],[],[],[],[],[],[])
     if (self.params.name == "Part3DBoundingBoxVisParams") or (self.params.name == "BoundingBox"):
         # The name of Part3DBoundingBoxVis was never changed in previous versions. Copy it from parent if it's the default name.
         self.params.name = globalKeyHandler().getObject(parentKey).params.name
开发者ID:nixz,项目名称:covise,代码行数:7,代码来源:Part3DBoundingBoxVis.py

示例11: recreate

 def recreate(self, negMsgHandler, parentKey, offset):
     """ recreate is called after all classes of the session have been unpickled """
     PartIsoCutterVisParams.mergeDefaultParams(self.params) # explicitly call mergeDefaultParams of this class
     self.__initBase()
     PartModuleVis.recreate(self, negMsgHandler, parentKey,offset,IsoCutter, ['inPolygons'],[],[],[],['inData'] )
     PartColoredVis.recreate(self, negMsgHandler, parentKey, offset)
     PartColoredVis.setColorMap(self,True)
开发者ID:nixz,项目名称:covise,代码行数:7,代码来源:PartIsoCutterVis.py

示例12: __init__

 def __init__(self):
     if os.getenv('VR_PREPARE_DEBUG_RUN'):
         print("PartIsoSurfaceVis.__init__")
     PartModuleVis.__init__(self,IsoSurfaceComp, VIS_ISOPLANE, self.__class__.__name__,['GridIn0'],[],[],[],['DataIn0'],['DataIn1'])
     PartColoredVis.__init__(self)
     self.params = PartIsoSurfaceVisParams()
     self.__initBase()
开发者ID:nixz,项目名称:covise,代码行数:7,代码来源:PartIsoSurfaceVis.py

示例13: recreate

 def recreate(self, negMsgHandler, parentKey, offset):
     """ overload recreate() since Sampling inputs arent used """
     self.PartTracerVisinitBase()    # call __initBase from PartTracerVis
     PartModuleVis.recreate(self, negMsgHandler, parentKey, offset, TracerComp,
                           ['meshIn'],['octtreesIn'],[],[],['dataIn'],['fieldIn'],['pointsIn'] )
     PartColoredVis.recreate(self, negMsgHandler, parentKey, offset)
     PartColoredVis.setColorMap(self,True)
开发者ID:nixz,项目名称:covise,代码行数:7,代码来源:PartTracerVis.py

示例14: __update

    def __update(self, negMsgHandler):
        """ __update is called from the run method to update the module parameter before execution
            + do init if the tracer module if necessary
            + update module parameters """
        self.__init(negMsgHandler)
        PartModuleVis._update(self, negMsgHandler)
        PartColoredVis._update(self, negMsgHandler)
        PartInteractorVis._update(self, negMsgHandler)

        if not hasattr(self, 'importModule'):
            return

        #update params
        # no of starting points
        if self.params.no_startp<12:
            min_start = 1
            max_start = 20
        elif self.params.no_startp<100:
            min_start = 1
            max_start = 2*self.params.no_startp
        else:
            min_start = 0.5 * self.params.no_startp
            max_start = 4 * self.params.no_startp
        self._module.set_no_startp( min_start, max_start, self.params.no_startp )
        # other parameters
        if self.params.alignedRectangle.orthogonalAxis=='line':
            s0 = self.params.alignedRectangle.getStartPoint()
            s1 = self.params.alignedRectangle.getEndPoint()
            self._module.set_startpoint1(s0[0], s0[1], s0[2] )
            self._module.set_startpoint2(s1[0], s1[1], s1[2] )
        else :
            aRectangleIn3d2Ps1Dir = convertAlignedRectangleToGeneral( self.params.alignedRectangle)
            self._module.set_startpoint1(*aRectangleIn3d2Ps1Dir.pointA)
            self._module.set_startpoint2(*aRectangleIn3d2Ps1Dir.pointC)
            self._module.set_direction(*aRectangleIn3d2Ps1Dir.direction)
        self._module.set_trace_len(self.params.len)
        self._module.set_trace_eps(self.params.eps)
        self._module.set_trace_abs(self.params.abs)
        self._module.set_min_vel(self.params.min_vel)
        self._module.set_tdirection(self.params.direction)
        self._module.set_grid_tol(self.params.grid_tol)
        self._module.set_maxOutOfDomain(self.params.maxOutOfDomain)

        if PartColoredVis.currentVariable(self) and PartColoredVis.currentVariable(self) in self.params.colorTableKey and globalKeyHandler().getObject(self.params.colorTableKey[self.currentVariable()]).params.mode==coColorTableParams.LOCAL :
            self._module.set_autoScales('TRUE')
        else :
            self._module.set_autoScales('FALSE')

        self._module.setTitle( self.params.name )
        # init params in case of moving points or pathlines
        if hasattr(self.params, 'duration' ):     self._module.set_stepDuration(self.params.duration)
        if hasattr(self.params, 'sphereRadius' ): self._module.set_SphereRadius(self.params.sphereRadius)
        if hasattr(self.params, 'tubeWidth' ): self._module.set_TubeWidth(self.params.tubeWidth)
        if hasattr(self.params, 'numSteps' ): self._module.set_MaxPoints(self.params.numSteps)
        if hasattr(self.params, 'start_style'): self._module.set_startStyle(self.params.start_style)
        if hasattr(self.params, 'freeStartPoints'): 
            if self.params.freeStartPoints == '':
                if hasattr(self, 'oldFreeStartPoints'):
                    self.params.freeStartPoints = self.oldFreeStartPoints
            self._module.set_FreeStartPoints(self.params.freeStartPoints)
开发者ID:nixz,项目名称:covise,代码行数:60,代码来源:PartTracerVis.py

示例15: recreate

 def recreate(self, negMsgHandler, parentKey, offset):
     """ recreate is called after all classes of the session have been unpickled """
     Part__TEMPLATE__VisParams.mergeDefaultParams(self.params) # explicitly call mergeDefaultParams of this class
     self.__initBase()
     PartModuleVis.recreate(self, negMsgHandler, parentKey, offset, __TEMPLATE__, ['Geometry_in'],[],[],[],['Scalar_in'] )
     PartColoredVis.recreate(self, negMsgHandler, parentKey, offset)
     PartColoredVis.setColorMap(self,True)
开发者ID:nixz,项目名称:covise,代码行数:7,代码来源:Part__TEMPLATE__Vis.py


注:本文中的PartModuleVis.PartModuleVis类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。