本文整理汇总了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()
示例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)
示例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)
示例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()
示例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()
示例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()
示例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)
示例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)
示例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)
示例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))
示例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()
示例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)
示例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)
示例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()
示例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)