def addCurvatureScalars(self, method=0, lut=None):
        """
        Build an ``Actor`` that contains the color coded surface
        curvature calculated in three different ways.

        :param int method: 0-gaussian, 1-mean, 2-max, 3-min curvature.
        :param float lut: optional look up table.

        :Example:
            .. code-block:: python
            
                from vtkplotter import *
                t = Torus().addCurvatureScalars()
                show(t)

            |curvature|
        """
        curve = vtk.vtkCurvatures()
        curve.SetInputData(self.poly)
        curve.SetCurvatureType(method)
        curve.Update()
        self.poly = curve.GetOutput()

        scls = self.poly.GetPointData().GetScalars().GetRange()
        print("curvature(): scalar range is", scls)

        self.mapper.SetInputData(self.poly)
        if lut:
            self.mapper.SetLookupTable(lut)
            self.mapper.SetUseLookupTableScalarRange(1)
        self.mapper.Update()
        self.Modified()
        self.mapper.ScalarVisibilityOn()
        return self
def addCurvatureScalars ( self , method = 0 , lut = None ) : curve = vtk . vtkCurvatures ( ) curve . SetInputData ( self . poly ) curve . SetCurvatureType ( method ) curve . Update ( ) self . poly = curve . GetOutput ( ) scls = self . poly . GetPointData ( ) . GetScalars ( ) . GetRange ( ) print ( "curvature(): scalar range is" , scls ) self . mapper . SetInputData ( self . poly ) if lut : self . mapper . SetLookupTable ( lut ) self . mapper . SetUseLookupTableScalarRange ( 1 ) self . mapper . Update ( ) self . Modified ( ) self . mapper . ScalarVisibilityOn ( ) return self
Build an ``Actor`` that contains the color coded surface
        curvature calculated in three different ways.

        :param int method: 0-gaussian, 1-mean, 2-max, 3-min curvature.
        :param float lut: optional look up table.

        :Example:
            .. code-block:: python
            
                from vtkplotter import *
                t = Torus().addCurvatureScalars()
                show(t)

            |curvature|