本文整理汇总了Python中PartModuleVis.PartModuleVis._update方法的典型用法代码示例。如果您正苦于以下问题:Python PartModuleVis._update方法的具体用法?Python PartModuleVis._update怎么用?Python PartModuleVis._update使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PartModuleVis.PartModuleVis
的用法示例。
在下文中一共展示了PartModuleVis._update方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __update
# 需要导入模块: from PartModuleVis import PartModuleVis [as 别名]
# 或者: from PartModuleVis.PartModuleVis 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)
示例2: __update
# 需要导入模块: from PartModuleVis import PartModuleVis [as 别名]
# 或者: from PartModuleVis.PartModuleVis 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))
示例3: __update
# 需要导入模块: from PartModuleVis import PartModuleVis [as 别名]
# 或者: from PartModuleVis.PartModuleVis 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)
self._setTransform()
示例4: __update
# 需要导入模块: from PartModuleVis import PartModuleVis [as 别名]
# 或者: from PartModuleVis.PartModuleVis 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 )
示例5: __update
# 需要导入模块: from PartModuleVis import PartModuleVis [as 别名]
# 或者: from PartModuleVis.PartModuleVis 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 )
示例6: __update
# 需要导入模块: from PartModuleVis import PartModuleVis [as 别名]
# 或者: from PartModuleVis.PartModuleVis 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 )
示例7: __update
# 需要导入模块: from PartModuleVis import PartModuleVis [as 别名]
# 或者: from PartModuleVis.PartModuleVis 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')
示例8: __update
# 需要导入模块: from PartModuleVis import PartModuleVis [as 别名]
# 或者: from PartModuleVis.PartModuleVis 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 )
示例9: __update
# 需要导入模块: from PartModuleVis import PartModuleVis [as 别名]
# 或者: from PartModuleVis.PartModuleVis 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 )
示例10: __update
# 需要导入模块: from PartModuleVis import PartModuleVis [as 别名]
# 或者: from PartModuleVis.PartModuleVis 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 )
示例11: __update
# 需要导入模块: from PartModuleVis import PartModuleVis [as 别名]
# 或者: from PartModuleVis.PartModuleVis 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'))
示例12: __update
# 需要导入模块: from PartModuleVis import PartModuleVis [as 别名]
# 或者: from PartModuleVis.PartModuleVis 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)