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