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


Python PartColoredVis._update方法代码示例

本文整理汇总了Python中PartColoredVis.PartColoredVis._update方法的典型用法代码示例。如果您正苦于以下问题:Python PartColoredVis._update方法的具体用法?Python PartColoredVis._update怎么用?Python PartColoredVis._update使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PartColoredVis.PartColoredVis的用法示例。


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

示例1: __update

# 需要导入模块: from PartColoredVis import PartColoredVis [as 别名]
# 或者: from PartColoredVis.PartColoredVis import _update [as 别名]
    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,代码行数:62,代码来源:PartTracerVis.py

示例2: __update

# 需要导入模块: from PartColoredVis import PartColoredVis [as 别名]
# 或者: from PartColoredVis.PartColoredVis import _update [as 别名]
    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,代码行数:30,代码来源:PartCuttingSurfaceVis.py

示例3: __update

# 需要导入模块: from PartColoredVis import PartColoredVis [as 别名]
# 或者: from PartColoredVis.PartColoredVis import _update [as 别名]
    def __update(self, negMsgHandler):
        """ __update is called from the run method to update the module parameter before execution
            + do init of the IsoCutter module if necessary
            + update module parameters """
        self.__init(negMsgHandler)
        PartModuleVis._update(self, negMsgHandler)
        PartColoredVis._update(self, negMsgHandler)

        # other parameters
        self._module.set_len(self.params.length)
        self._module.set_skip(self.params.skip)
        self._module.setTitle( self.params.name )
开发者ID:nixz,项目名称:covise,代码行数:14,代码来源:PartMagmaTraceVis.py

示例4: __update

# 需要导入模块: from PartColoredVis import PartColoredVis [as 别名]
# 或者: from PartColoredVis.PartColoredVis import _update [as 别名]
    def __update(self, negMsgHandler):
        """ __update is called from the run method to update the module parameter before execution
            + do init of the IsoCutter module if necessary
            + update module parameters """
        self.__init(negMsgHandler)
        PartModuleVis._update(self, negMsgHandler)
        PartColoredVis._update(self, negMsgHandler)

        # other parameters
        self._module.set_iso_value(self.params.isomin, self.params.isomax, self.params.isovalue)
        self._module.set_cutoff_side(str(self.params.cutoff_side))   # must be done so for bool
        self._module.setTitle( self.params.name )
开发者ID:nixz,项目名称:covise,代码行数:14,代码来源:PartIsoCutterVis.py

示例5: __update

# 需要导入模块: from PartColoredVis import PartColoredVis [as 别名]
# 或者: from PartColoredVis.PartColoredVis import _update [as 别名]
    def __update(self, negMsgHandler):
        """ __update is called from the run method to update the module parameter before execution
            + do init of the IsoCutter module if necessary
            + update module parameters """
        self.__init(negMsgHandler)
        PartModuleVis._update(self, negMsgHandler)
        PartColoredVis._update(self, negMsgHandler)

        # other parameters
        self._module.set_min_Slider(self.params.low_isomin,  self.params.low_isomax,  self.params.low_isovalue)
        self._module.set_max_Slider(self.params.high_isomin, self.params.high_isomax, self.params.high_isovalue)
        self._module.setTitle( self.params.name )
开发者ID:nixz,项目名称:covise,代码行数:14,代码来源:Part__TEMPLATE__Vis.py

示例6: __update

# 需要导入模块: from PartColoredVis import PartColoredVis [as 别名]
# 或者: from PartColoredVis.PartColoredVis import _update [as 别名]
 def __update(self, negMsgHandler):
     """ __update is called from the run method to update the module parameter before execution
         + do init of the IsoCutter module if necessary
         + update module parameters """
     self.__init(negMsgHandler)
     PartModuleVis._update(self, negMsgHandler)
     if not self.params.variable == 'unset': 
         PartColoredVis._update(self, negMsgHandler)
     else: 
         self._dataInputNames = []
         theNet().disconnect(self.__myColors, 'DataOut0', self.__myCollect, 'DataIn0')
         theNet().disconnect(self._module, 'DataOut0', self.__myColors, 'DataIn0')    
开发者ID:nixz,项目名称:covise,代码行数:14,代码来源:PartDomainSurfaceVis.py

示例7: __update

# 需要导入模块: from PartColoredVis import PartColoredVis [as 别名]
# 或者: from PartColoredVis.PartColoredVis import _update [as 别名]
    def __update(self, negMsgHandler):
        """ __update is called from the run method to update the module parameter before execution
            + do init of the IsoCutter module if necessary
            + update module parameters """
        self.__init(negMsgHandler)
        PartModuleVis._update(self, negMsgHandler)
        PartColoredVis._update(self, negMsgHandler)

#        self._module.set_scale(self.params.minScalingValue, self.params.maxScalingValue, self.params.scalingValue)
        self._module.set_scale(self.params.scalingValue-1.0, self.params.scalingValue+1.0, self.params.scalingValue)
        self._module.set_length(self.params.scalingType + 1)    # +1 because covise choices start from 1
        self._module.set_arrow_head_factor(self.params.arrowHeadFactor)
        self._module.set_num_sectors(3)
        self._module.setTitle( self.params.name )
开发者ID:nixz,项目名称:covise,代码行数:16,代码来源:PartVectorFieldVis.py

示例8: __update

# 需要导入模块: from PartColoredVis import PartColoredVis [as 别名]
# 或者: from PartColoredVis.PartColoredVis import _update [as 别名]
    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

        self._module.set_startpoint1(self.params.startpoint[0],self.params.startpoint[1],self.params.startpoint[2])
        self._module.set_startpoint2(self.params.startpoint[0],self.params.startpoint[1],self.params.startpoint[2])

        self._module.setTitle( self.params.name )
开发者ID:nixz,项目名称:covise,代码行数:19,代码来源:PartPointProbingVis.py

示例9: __update

# 需要导入模块: from PartColoredVis import PartColoredVis [as 别名]
# 或者: from PartColoredVis.PartColoredVis import _update [as 别名]
    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)
        
        #colorTable = globalKeyHandler().getObject(self.params.colorTableKey[self.params.variable])
        #if colorTable.params.mode==coColorTableParams.LOCAL :
        #    self._module.set_autominmax('TRUE')
        #else :
        #    self._module.set_autominmax('FALSE')

        # other parameters
        self._module.set_isovalue(self.params.isomin,self.params.isomax,self.params.isovalue)
        self._module.setTitle( self.params.name )
开发者ID:nixz,项目名称:covise,代码行数:20,代码来源:PartIsoSurfaceVis.py

示例10: __update

# 需要导入模块: from PartColoredVis import PartColoredVis [as 别名]
# 或者: from PartColoredVis.PartColoredVis import _update [as 别名]
    def __update(self, negMsgHandler):
        """ __update is called from the run method to update the module parameter before execution
            + do init
            + update module parameters """
        self.__init(negMsgHandler)

        PartModuleVis._update(self, negMsgHandler)
        if self.params.color==VARIABLE:
            PartColoredVis._update(self, negMsgHandler)
        self._setTransform()

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

        #set color for variable
        if not self.__lastColorConnection==None:
            disconnect(self.__lastColorConnection, ConnectionPoint(self._module, 'DataIn0'))
            self.__lastColorConnection=None
        if self.__lastColorConnection==None and self.params.variable!=None \
            and self.params.variable!='Select a variable' and self.params.color == VARIABLE and len(self.objects)>0:
            _infoer.function = str(self.__update)
            _infoer.write("connection color for variable %s " % self.params.variable)
            self.__lastColorConnection =  (self.objects[0]).colorContConnectionPoint()
            connect(self.__lastColorConnection, ConnectionPoint(self._module, 'DataIn0'))
开发者ID:nixz,项目名称:covise,代码行数:26,代码来源:Part2DRawVis.py


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