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


Python PartColoredVis._init方法代码示例

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


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

示例1: __init

# 需要导入模块: from PartColoredVis import PartColoredVis [as 别名]
# 或者: from PartColoredVis.PartColoredVis 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()
开发者ID:nixz,项目名称:covise,代码行数:27,代码来源:PartDomainSurfaceVis.py

示例2: __init

# 需要导入模块: from PartColoredVis import PartColoredVis [as 别名]
# 或者: from PartColoredVis.PartColoredVis 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()
开发者ID:nixz,项目名称:covise,代码行数:33,代码来源:PartVectorFieldVis.py

示例3: __init

# 需要导入模块: from PartColoredVis import PartColoredVis [as 别名]
# 或者: from PartColoredVis.PartColoredVis 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()
开发者ID:nixz,项目名称:covise,代码行数:20,代码来源:Part__TEMPLATE__Vis.py

示例4: __init

# 需要导入模块: from PartColoredVis import PartColoredVis [as 别名]
# 或者: from PartColoredVis.PartColoredVis 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()
开发者ID:nixz,项目名称:covise,代码行数:24,代码来源:PartPointProbingVis.py

示例5: __init

# 需要导入模块: from PartColoredVis import PartColoredVis [as 别名]
# 或者: from PartColoredVis.PartColoredVis 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()
开发者ID:nixz,项目名称:covise,代码行数:24,代码来源:PartIsoSurfaceVis.py

示例6: __init

# 需要导入模块: from PartColoredVis import PartColoredVis [as 别名]
# 或者: from PartColoredVis.PartColoredVis 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()
开发者ID:nixz,项目名称:covise,代码行数:41,代码来源:PartTracerVis.py

示例7: __init

# 需要导入模块: from PartColoredVis import PartColoredVis [as 别名]
# 或者: from PartColoredVis.PartColoredVis 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()
开发者ID:nixz,项目名称:covise,代码行数:39,代码来源:PartCuttingSurfaceVis.py


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