本文整理汇总了Python中PartModuleVis.PartModuleVis._init方法的典型用法代码示例。如果您正苦于以下问题:Python PartModuleVis._init方法的具体用法?Python PartModuleVis._init怎么用?Python PartModuleVis._init使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PartModuleVis.PartModuleVis
的用法示例。
在下文中一共展示了PartModuleVis._init方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init
# 需要导入模块: from PartModuleVis import PartModuleVis [as 别名]
# 或者: from PartModuleVis.PartModuleVis import _init [as 别名]
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()
示例2: __init
# 需要导入模块: from PartModuleVis import PartModuleVis [as 别名]
# 或者: from PartModuleVis.PartModuleVis import _init [as 别名]
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()
示例3: __init
# 需要导入模块: from PartModuleVis import PartModuleVis [as 别名]
# 或者: from PartModuleVis.PartModuleVis import _init [as 别名]
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
# 需要导入模块: from PartModuleVis import PartModuleVis [as 别名]
# 或者: from PartModuleVis.PartModuleVis import _init [as 别名]
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._module, 'cmapIn')
self.__register(negMsgHandler)
# make my custom connections between further self created modules here
# send params to gui
self.sendParams()
示例5: __init
# 需要导入模块: from PartModuleVis import PartModuleVis [as 别名]
# 或者: from PartModuleVis.PartModuleVis import _init [as 别名]
def __init(self, negMsgHandler):
""" __init is called from __update
+ start probe3D module if it does not already exist and connect output to COVER
+ set default parameters of Tracer
+ set default boundingBox which is also used in the GUI to set borders of the float sliders
+ send params to the gui
"""
if self.__firstTime==True:
PartModuleVis._init(self, negMsgHandler)
PartColoredVis._init(self, negMsgHandler, self._module, 'colorMapIn')
PartInteractorVis._init(self, negMsgHandler)
self.__register(negMsgHandler)
#init params
self._module.set_dimensionality(1)
self._module.set_probe_type(self.params.type)
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])
# send params to gui
self.sendParams()
示例6: __init
# 需要导入模块: from PartModuleVis import PartModuleVis [as 别名]
# 或者: from PartModuleVis.PartModuleVis import _init [as 别名]
def __init(self, negMsgHandler):
if os.getenv('VR_PREPARE_DEBUG_RUN'):
print("PartIsoSurfaceVis.__init")
""" __init is called from __update
+ start _module module if it does not already exist and connect output to COVER
+ set default parameters of Tracer
+ set default boundingBox which is also used in the GUI to set borders of the float sliders
+ send params to the gui
"""
if self.__firstTime == True:
self.__firstTime = False
PartModuleVis._init(self, negMsgHandler)
PartColoredVis._init(self, negMsgHandler, self._module)
self.__register(negMsgHandler)
#init params, the both are static at the moment
self._module.set_Interactor(self.params.Interactor)
self._module.set_vector(self.params.vector)
# send params to gui
self.sendParams()
示例7: __init
# 需要导入模块: from PartModuleVis import PartModuleVis [as 别名]
# 或者: from PartModuleVis.PartModuleVis import _init [as 别名]
def __init(self, negMsgHandler):
if os.getenv('VR_PREPARE_DEBUG_RUN'):
print("PartTracerVis.__init")
""" __init is called from __update
+ start TracerComp module if it does not already exist and connect output to COVER
+ set default parameters of Tracer
+ set default boundingBox which is also used in the GUI to set borders of the float sliders
+ send params to the gui
"""
if self.__firstTime==True:
self.__firstTime = False
# disable sampling if import is transient
if self.importModule.getIsTransient():
self._geoSampleNames = []
self._dataSampleNames = []
PartModuleVis._init(self, negMsgHandler, USER_DEFINED)
PartColoredVis._init(self, negMsgHandler, self._module, 'colorMapIn')
PartInteractorVis._init(self, negMsgHandler)
self.__register(negMsgHandler)
#init params
self._module.set_taskType(self.params.taskType)
# spread initial line in between bounding box
# but not when unpickled or values will be overwritten
if hasattr(self.params, 'start_style') and self.params.start_style == 1 and not self.fromRecreation:
self.params.alignedRectangle.setStartEndPoint(self.params.boundingBox.getXMin() / 2.0,
self.params.boundingBox.getYMin() / 2.0,
self.params.boundingBox.getZMax(),
self.params.boundingBox.getXMax() / 2.0,
self.params.boundingBox.getYMax() / 2.0,
self.params.boundingBox.getZMax())
# send params to gui
self.sendParams()
示例8: __init
# 需要导入模块: from PartModuleVis import PartModuleVis [as 别名]
# 或者: from PartModuleVis.PartModuleVis import _init [as 别名]
def __init(self, negMsgHandler):
if os.getenv('VR_PREPARE_DEBUG_RUN'):
print("PartCuttingSurfaceVis.__init")
""" __init is called from __update
+ start CuttingSurfaceComp module if it does not already exist and connect output to COVER
+ set default parameters of cuttingsurface
+ set default boundingBox which is also used in the GUI to set borders of the float sliders
+ send params to the gui
"""
if self.__firstTime==True:
self.__firstTime = False
# disable sampling if import is transient
if self.importModule.getIsTransient():
self._geoSampleNames = []
self._dataSampleNames = []
# special case for PartVectorVis:
# transient data cannot have sample modules attached to, so do not try to connect CuttingSurface module to sample modules
if self.params.vector == 3:
PartModuleVis._initBase(self, CuttingSurfaceComp, ['GridIn0'], [], [], [], ['DataIn0'], [], [], USER_DEFINED)
PartModuleVis._init(self, negMsgHandler)
PartColoredVis._init(self, negMsgHandler, self._module)
PartInteractorVis._init(self, negMsgHandler)
self.__register(negMsgHandler)
#init params
self._module.set_option(1) # plane
self._module.set_vector(self.params.vector)
if hasattr(self.params.boundingBox, 'getXMin' ) and hasattr(self.params, 'scale'):
if self.params.scale < 0:
self.params.scale = self.params.boundingBox.getMaxEdgeLength() * 0.1
# send params to gui
self.sendParams()
示例9: __init
# 需要导入模块: from PartModuleVis import PartModuleVis [as 别名]
# 或者: from PartModuleVis.PartModuleVis import _init [as 别名]
def __init(self, negMsgHandler):
""" start COVISE Module and connect output to COVER """
if self.__firstTime == True:
self.__firstTime = False
PartModuleVis._init(self, negMsgHandler)