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


Python common.debugMsg函数代码示例

本文整理汇总了Python中pyvisi.renderers.vtk.common.debugMsg函数的典型用法代码示例。如果您正苦于以下问题:Python debugMsg函数的具体用法?Python debugMsg怎么用?Python debugMsg使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: setDepth

    def setDepth(self, depth):
        """
        Set the box depth
        """
        debugMsg("Called Box.setDepth()")
        # get the current depth
        oldDepth = self.getDepth()

        # get the current bounds
        (xmin, xmax, ymin, ymax, zmin, zmax) = self.getBounds()

        # add half the difference between the new depth and the old depth
        # to the zmin and zmax variables
        halfDiff = (depth - oldDepth)/2.0

        zminNew = zmin - halfDiff
        zmaxNew = zmax + halfDiff

        # reset the bounds
        self.setBounds(xmin, xmax, ymin, ymax, zminNew, zmaxNew)

        # set the depth
        self.depth = zmaxNew - zminNew

        # do a check to make sure the calculated depth is what was asked
        # for
        if __debug__:
            newDepth = self.getDepth()
            assert abs(newDepth - depth) < self.tolerance, \
                    "Depth not set to within tolerance"

        return
开发者ID:paultcochrane,项目名称:pyvisi,代码行数:32,代码来源:box.py

示例2: setBLF

    def setBLF(self, bottom, left, front):
        """
        Set the position of the bottom, left, front corner
        """
        debugMsg("Called Box.setBLF()")
        # get the current bounds
        (xmin, xmax, ymin, ymax, zmin, zmax) = self.getBounds()

        # make sure that the bounds aren't silly
        if bottom > xmax:
            warnString = "bottom set too large for maximum x dimension."
            warnString += "  Resetting to xMin."
            warnings.warn(warnString)
            bottom = xmin

        if left > ymax:
            warnString = "left set too large for maximum y dimension."
            warnString += "  Resetting to yMin."
            warnings.warn(warnString)
            left = ymin

        if front > zmax:
            warnString = "front set too large for maximum z dimension."
            warnString += "  Resetting to zMin."
            warnings.warn(warnString)
            front = zmin

        # set the new bounds
        self.setBounds(bottom, xmax, left, ymax, front, zmax)

        # set the blf variable
        self.blf = (bottom, left, front)
        return
开发者ID:paultcochrane,项目名称:pyvisi,代码行数:33,代码来源:box.py

示例3: setWidth

    def setWidth(self, width):
        """
        Set the width of the box
        """
        debugMsg("Called Box.setWidth()")
        # get the current width
        oldWidth = self.getWidth()

        # get the current bounds
        (xmin, xmax, ymin, ymax, zmin, zmax) = self.getBounds()

        # add half the difference between the new width and the old width
        # to the xmin and xmax variables
        halfDiff = (width - oldWidth)/2.0

        xminNew = xmin - halfDiff
        xmaxNew = xmax + halfDiff

        # reset the bounds
        self.setBounds(xminNew, xmaxNew, ymin, ymax, zmin, zmax)

        # set the width
        self.width = xmaxNew - xminNew

        # do a check to make sure the calculated width is what was asked for
        if __debug__:
            newWidth = self.getWidth()
            assert abs(newWidth - width) < self.tolerance, \
                    "Width not set to within tolerance"

        return
开发者ID:paultcochrane,项目名称:pyvisi,代码行数:31,代码来源:box.py

示例4: setHeight

    def setHeight(self, height):
        """
        Set the box height
        """
        debugMsg("Called Box.setHeight()")
        # get the current height
        oldHeight = self.getHeight()

        # get the current bounds
        (xmin, xmax, ymin, ymax, zmin, zmax) = self.getBounds()

        # add half the difference between the new height and the old height
        # to the ymin and ymax variables
        halfDiff = (height - oldHeight)/2.0

        yminNew = ymin - halfDiff
        ymaxNew = ymax + halfDiff

        # reset the bounds
        self.setBounds(xmin, xmax, yminNew, ymaxNew, zmin, zmax)

        # set the height
        self.height = ymaxNew - yminNew

        # do a check to make sure the calculated height is what was asked
        # for
        if __debug__:
            newHeight = self.getHeight()
            assert abs(newHeight - height) < self.tolerance, \
                    "Height not set to within tolerance"

        return
开发者ID:paultcochrane,项目名称:pyvisi,代码行数:32,代码来源:box.py

示例5: __init__

    def __init__(self, scene):
        """
        Initialisation of the OffsetPlot class
        
        @param scene: The Scene to render the plot in
        @type scene: Scene object
        """
        debugMsg("Called OffsetPlot.__init__()")
        Plot.__init__(self, scene)

        self.renderer = scene.renderer
        self.renderer.addToInitStack("# OffsetPlot.__init__()")
        self.renderer.addToInitStack("_plot = vtk.vtkXYPlotActor()")

        self.title = None
        self.xlabel = None
        self.ylabel = None

        # the extra separation between curves (user set)
        self.sep = None

        # the default values for shared info
        self.fname = None
        self.format = None
        self.scalars = None

        # add the plot to the scene
        scene.add(self)
开发者ID:paultcochrane,项目名称:pyvisi,代码行数:28,代码来源:offset_plot.py

示例6: render

    def render(self):
        """
        Does OffsetPlot object specific (pre)rendering stuff
        """
        debugMsg("Called OffsetPlot.render()")

        self.renderer.runString("# OffsetPlot.render()")
        self.renderer.runString("_renderer.AddActor2D(_plot)")

        # set the title if set
        if self.title is not None:
            evalString = "_plot.SetTitle(\'%s\')" % self.title
            self.renderer.runString(evalString)

        # if an xlabel is set, add it
        if self.xlabel is not None:
            evalString = "_plot.SetXTitle(\'%s\')" % self.xlabel
            self.renderer.runString(evalString)

        # if an ylabel is set, add it
        if self.ylabel is not None:
            evalString = "_plot.SetYTitle(\'%s\')" % self.ylabel
            self.renderer.runString(evalString)

        return
开发者ID:paultcochrane,项目名称:pyvisi,代码行数:25,代码来源:offset_plot.py

示例7: __init__

    def __init__(self, scene):
        """
        Initialisation of the IsosurfacePlot class
        
        @param scene: The Scene to render the plot in
        @type scene: Scene object
        """
        debugMsg("Called IsosurfacePlot.__init__()")
        Plot.__init__(self, scene)

        self.renderer = scene.renderer
        self.renderer.addToInitStack("# IsosurfacePlot.__init__()")

        # labels and stuff
        self.title = None
        self.xlabel = None
        self.ylabel = None
        self.zlabel = None

        # how many contours?
        self.numContours = 5

        # contour range
        self.contMin = None
        self.contMax = None

        # default values for fname, format and scalars
        self.fname = None
        self.format = None
        self.scalars = None

        # add the plot to the scene
        scene.add(self)
开发者ID:paultcochrane,项目名称:pyvisi,代码行数:33,代码来源:isosurface_plot.py

示例8: setTRB

    def setTRB(self, top, right, back):
        """
        Set the position of the top, right, back corner
        """
        debugMsg("Called Box.setTRB()")
        # get the current bounds
        (xmin, xmax, ymin, ymax, zmin, zmax) = self.getBounds()

        # make sure that the bounds aren't silly
        if top < xmin:
            warnString = "top set too small for minimum x dimension."
            warnString += "  Resetting to xMax."
            warnings.warn(warnString)
            top = xmax

        if right < ymin:
            warnString = "right set too small for minimum y dimension."
            warnString += "  Resetting to yMax."
            warnings.warn(warnString)
            right = ymax

        if back < zmin:
            warnString = "back set too small for minimum z dimension."
            warnString += "  Resetting to zMax."
            warnings.warn(warnString)
            back = zmax

        # set the new bounds
        self.setBounds(xmin, top, ymin, right, zmin, back)

        # set the trb variable
        self.trb = (top, right, back)
        return
开发者ID:paultcochrane,项目名称:pyvisi,代码行数:33,代码来源:box.py

示例9: getInsideOut

 def getInsideOut(self):
     """
     Get the current value of the inside out flag
     """
     debugMsg("Called ClipBox.getInsideOut()")
     self.plot.renderer.runString("# ClipBox.getInsideOut()")
     return self.insideOut
开发者ID:paultcochrane,项目名称:pyvisi,代码行数:7,代码来源:box.py

示例10: getAzimuth

    def getAzimuth(self):
        """
        Get the azimuthal angle (in degrees) of the Camera
        """
        debugMsg("Called Camera.getAzimuth()")

        return self.azimuth
开发者ID:paultcochrane,项目名称:pyvisi,代码行数:7,代码来源:camera.py

示例11: _setDataFromFile

    def _setDataFromFile(self):
        """
        Set data to plot using an input file
        """
        debugMsg("Called _setDataFromFile() in Plot()")

        return
开发者ID:paultcochrane,项目名称:pyvisi,代码行数:7,代码来源:plot.py

示例12: _setPlainData

    def _setPlainData(self):
        """
        Set data to plot using numpy objects
        """
        debugMsg("Called _setPlainData() in Plot()")

        return
开发者ID:paultcochrane,项目名称:pyvisi,代码行数:7,代码来源:plot.py

示例13: render

    def render(self):
        """
        Does PdfImage object specific (pre)rendering stuff
        """
        debugMsg("Called PdfImage.render()")

        return
开发者ID:paultcochrane,项目名称:pyvisi,代码行数:7,代码来源:image.py

示例14: render

    def render(self):
        """
        Render the Plot object
        """
        debugMsg("Called Plot.render()")

        return
开发者ID:paultcochrane,项目名称:pyvisi,代码行数:7,代码来源:plot.py

示例15: __init__

    def __init__(self, scene):
        """
        Initialisation of the EllipsoidPlot class

        @param scene: The Scene to render the plot in
        @type scene: Scene object
        """
        debugMsg("Called EllipsoidPlot.__init__()")
        Plot.__init__(self, scene)

        self.renderer = scene.renderer
        self.renderer.addToInitStack("# EllipsoidPlot.__init__()")

        # labels and stuff
        self.title = None
        self.xlabel = None
        self.ylabel = None
        self.zlabel = None
        
        # default values for fname, format and tensors
        self.fname = None
        self.format = None
        self.tensors = None

        # add the plot to the scene
        scene.add(self)
开发者ID:paultcochrane,项目名称:pyvisi,代码行数:26,代码来源:ellipsoid_plot.py


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