當前位置: 首頁>>代碼示例>>Python>>正文


Python PartColoredVis.PartColoredVis類代碼示例

本文整理匯總了Python中PartColoredVis.PartColoredVis的典型用法代碼示例。如果您正苦於以下問題:Python PartColoredVis類的具體用法?Python PartColoredVis怎麽用?Python PartColoredVis使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了PartColoredVis類的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: 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

示例3: __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

示例4: __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

示例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: __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

示例7: 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

示例8: 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

示例9: __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

示例10: __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

示例11: 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

示例12: 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

示例13: 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

示例14: __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')
            
            # make my custom connections between further self created modules here
            theNet().connect(self._module, 'GridOut0', self.__myCollect, 'GridIn0')
            if not self.params.variable == 'unset': 
                theNet().connect(self.__myColors, 'DataOut0', self.__myCollect, 'DataIn0')
                theNet().connect(self._module, 'DataOut0', self.__myColors, 'DataIn0')
            else: 
                theNet().disconnect(self.__myColors, 'DataOut0', self.__myCollect, 'DataIn0')
                theNet().disconnect(self._module, 'DataOut0', self.__myColors, 'DataIn0')
                    

            # send params to gui
            self.sendParams()
開發者ID:nixz,項目名稱:covise,代碼行數:25,代碼來源:PartDomainSurfaceVis.py

示例15: recreate

    def recreate(self, negMsgHandler, parentKey, offset):

        return # TODO: probe is not working at the moment: stuck in saveExecute (data or grid missing)

        """ recreate is called after all classes of the session have been unpickled """
        self.__initBase()
        PartModuleVis.recreate(self, negMsgHandler, parentKey, offset, Probe3D, ['meshIn'],['gOcttreesIn'],[],[],['gdataIn'],['gdataIn'])
        PartColoredVis.recreate(self, negMsgHandler, parentKey, offset)
開發者ID:nixz,項目名稱:covise,代碼行數:8,代碼來源:PartPointProbingVis.py


注:本文中的PartColoredVis.PartColoredVis類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。