class_docstr: An internal class to manage filters/algorithms for polydata datasets.
class_docstr_tok: ["An","internal","class","to","manage","filters\/algorithms","for","polydata","datasets","."]
docstr: Sweep polygonal data creating "skirt" from free edges and lines, and lines from vertices.
  
  This takes polygonal data as input and generates polygonal
  data on output. The input dataset is swept around the axis
  to create new polygonal primitives. These primitives form a
  "skirt" or swept surface. For example, sweeping a line results
  in a cylindrical shell, and sweeping a circle creates a torus.
  
  There are a number of control parameters for this filter.  You
  can control whether the sweep of a 2D object (i.e., polygon or
  triangle strip) is capped with the generating geometry via the
  ``capping`` parameter. Also, you can control the angle of
  rotation, and whether translation along the axis is
  performed along with the rotation.  (Translation is useful for
  creating "springs".) You also can adjust the radius of the
  generating geometry with the ``dradius`` parameter.
  
  The skirt is generated by locating certain topological
  features. Free edges (edges of polygons or triangle strips
  only used by one polygon or triangle strips) generate
  surfaces. This is true also of lines or polylines. Vertices
  generate lines.
  
  This filter can be used to model axisymmetric objects like
  cylinders, bottles, and wine glasses; or translational
  rotational symmetric objects like springs or corkscrews.
  
  .. versionchanged:: 0.32.0
     The ``capping`` keyword was added with a default of ``False``.
     The previously used VTK default corresponds to ``capping=True``.
     In a future version the default will be changed to ``True`` to
     match the behavior of the underlying VTK filter.
  
  Parameters
  ----------
  resolution : int, optional
      Number of pieces to divide line into.
  
  inplace : bool, default: False
      Overwrites the original mesh inplace.
  
  translation : float, optional
      Total amount of translation along the axis.
  
  dradius : float, optional
      Change in radius during sweep process.
  
  angle : float, optional
      The angle of rotation in degrees.
  
  capping : bool, optional
      Control if the sweep of a 2D object is capped. The default is
      ``False``, which differs from VTK's default.
  
      .. warning::
         The ``capping`` keyword was added in version 0.32.0 with a
         default value of ``False``. In a future version this default
         will be changed to ``True`` to match the behavior of the
         underlying VTK filter. It is recommended to explicitly pass
         a value for this keyword argument to prevent future changes
         in behavior and warnings.
  
  rotation_axis : numpy.ndarray or sequence, optional
      The direction vector of the axis around which the rotation is done.
      It requires vtk>=9.1.0.
  
  progress_bar : bool, default: False
      Display a progress bar to indicate progress.
  
  Returns
  -------
  pyvista.PolyData
      Rotationally extruded mesh.
  
  Examples
  --------
  Create a "spring" using the rotational extrusion filter.
  
  >>> import pyvista as pv
  >>> profile = pv.Polygon(
  ...     center=[1.25, 0.0, 0.0],
  ...     radius=0.2,
  ...     normal=(0, 1, 0),
  ...     n_sides=30,
  ... )
  >>> extruded = profile.extrude_rotate(
  ...     resolution=360,
  ...     translation=4.0,
  ...     dradius=0.5,
  ...     angle=1500.0,
  ...     capping=True,
  ... )
  >>> extruded.plot(smooth_shading=True)
  
  Create a "wine glass" using the rotational extrusion filter.
  
  >>> import numpy as np
  >>> points = np.array(
  ...     [
  ...         [-0.18, 0, 0],
  ...         [-0.18, 0, 0.01],
  ...         [-0.18, 0, 0.02],
  ...         [-0.01, 0, 0.03],
  ...         [-0.01, 0, 0.04],
  ...         [-0.02, 0, 0.5],
  ...         [-0.05, 0, 0.75],
  ...         [-0.1, 0, 0.8],
  ...         [-0.2, 0, 1.0],
  ...     ]
  ... )
  >>> spline = pv.Spline(points, 30)
  >>> extruded = spline.extrude_rotate(resolution=20, capping=False)
  >>> extruded.plot(color='lightblue')
docstr_tok: ["Sweep","polygonal","data","creating","``","skirt","''","from","free","edges","and","lines",",","and","lines","from","vertices",".","This","takes","polygonal","data","as","input","and","generates","polygonal","data","on","output",".","The","input","dataset","is","swept","around","the","axis","to","create","new","polygonal","primitives",".","These","primitives","form","a","''","skirt","''","or","swept","surface",".","For","example",",","sweeping","a","line","results","in","a","cylindrical","shell",",","and","sweeping","a","circle","creates","a","torus",".","There","are","a","number","of","control","parameters","for","this","filter",".","You","can","control","whether","the","sweep","of","a","2D","object","(","i.e.",",","polygon","or","triangle","strip",")","is","capped","with","the","generating","geometry","via","the","``","capping","``","parameter",".","Also",",","you","can","control","the","angle","of","rotation",",","and","whether","translation","along","the","axis","is","performed","along","with","the","rotation",".","(","Translation","is","useful","for","creating","``","springs","''",".",")","You","also","can","adjust","the","radius","of","the","generating","geometry","with","the","``","dradius","``","parameter",".","The","skirt","is","generated","by","locating","certain","topological","features",".","Free","edges","(","edges","of","polygons","or","triangle","strips","only","used","by","one","polygon","or","triangle","strips",")","generate","surfaces",".","This","is","true","also","of","lines","or","polylines",".","Vertices","generate","lines",".","This","filter","can","be","used","to","model","axisymmetric","objects","like","cylinders",",","bottles",",","and","wine","glasses",";","or","translational","rotational","symmetric","objects","like","springs","or","corkscrews",".","..","versionchanged",":",":","0.32.0","The","``","capping","``","keyword","was","added","with","a","default","of","``","False","``",".","The","previously","used","VTK","default","corresponds","to","``","capping=True","``",".","In","a","future","version","the","default","will","be","changed","to","``","True","``","to","match","the","behavior","of","the","underlying","VTK","filter",".","Parameters","--","--","--","--","--","resolution",":","int",",","optional","Number","of","pieces","to","divide","line","into",".","inplace",":","bool",",","default",":","False","Overwrites","the","original","mesh","inplace",".","translation",":","float",",","optional","Total","amount","of","translation","along","the","axis",".","dradius",":","float",",","optional","Change","in","radius","during","sweep","process",".","angle",":","float",",","optional","The","angle","of","rotation","in","degrees",".","capping",":","bool",",","optional","Control","if","the","sweep","of","a","2D","object","is","capped",".","The","default","is","``","False","``",",","which","differs","from","VTK","'s","default",".","..","warning",":",":","The","``","capping","``","keyword","was","added","in","version","0.32.0","with","a","default","value","of","``","False","``",".","In","a","future","version","this","default","will","be","changed","to","``","True","``","to","match","the","behavior","of","the","underlying","VTK","filter",".","It","is","recommended","to","explicitly","pass","a","value","for","this","keyword","argument","to","prevent","future","changes","in","behavior","and","warnings",".","rotation_axis",":","numpy.ndarray","or","sequence",",","optional","The","direction","vector","of","the","axis","around","which","the","rotation","is","done",".","It","requires","vtk",">","=9.1.0",".","progress_bar",":","bool",",","default",":","False","Display","a","progress","bar","to","indicate","progress",".","Returns","--","--","--","-","pyvista.PolyData","Rotationally","extruded","mesh",".","Examples","--","--","--","--","Create","a","``","spring","''","using","the","rotational","extrusion","filter",".",">",">",">","import","pyvista","as","pv",">",">",">","profile","=","pv.Polygon","(","...","center=","[","1.25",",","0.0",",","0.0","]",",","...","radius=0.2",",","...","normal=","(","0",",","1",",","0",")",",","...","n_sides=30",",","...",")",">",">",">","extruded","=","profile.extrude_rotate","(","...","resolution=360",",","...","translation=4.0",",","...","dradius=0.5",",","...","angle=1500.0",",","...","capping=True",",","...",")",">",">",">","extruded.plot","(","smooth_shading=True",")","Create","a","``","wine","glass","''","using","the","rotational","extrusion","filter",".",">",">",">","import","numpy","as","np",">",">",">","points","=","np.array","(","...","[","...","[","-0.18",",","0",",","0","]",",","...","[","-0.18",",","0",",","0.01","]",",","...","[","-0.18",",","0",",","0.02","]",",","...","[","-0.01",",","0",",","0.03","]",",","...","[","-0.01",",","0",",","0.04","]",",","...","[","-0.02",",","0",",","0.5","]",",","...","[","-0.05",",","0",",","0.75","]",",","...","[","-0.1",",","0",",","0.8","]",",","...","[","-0.2",",","0",",","1.0","]",",","...","]","...",")",">",">",">","spline","=","pv.Spline","(","points",",","30",")",">",">",">","extruded","=","spline.extrude_rotate","(","resolution=20",",","capping=False",")",">",">",">","extruded.plot","(","color='lightblue","'",")"]
code: def extrude_rotate(
      self,
      resolution=30,
      inplace=False,
      translation=0.0,
      dradius=0.0,
      angle=360.0,
      capping=None,
      rotation_axis=(0, 0, 1),
      progress_bar=False,
  ):
      """Sweep polygonal data creating "skirt" from free edges and lines, and lines from vertices.
  
      This takes polygonal data as input and generates polygonal
      data on output. The input dataset is swept around the axis
      to create new polygonal primitives. These primitives form a
      "skirt" or swept surface. For example, sweeping a line results
      in a cylindrical shell, and sweeping a circle creates a torus.
  
      There are a number of control parameters for this filter.  You
      can control whether the sweep of a 2D object (i.e., polygon or
      triangle strip) is capped with the generating geometry via the
      ``capping`` parameter. Also, you can control the angle of
      rotation, and whether translation along the axis is
      performed along with the rotation.  (Translation is useful for
      creating "springs".) You also can adjust the radius of the
      generating geometry with the ``dradius`` parameter.
  
      The skirt is generated by locating certain topological
      features. Free edges (edges of polygons or triangle strips
      only used by one polygon or triangle strips) generate
      surfaces. This is true also of lines or polylines. Vertices
      generate lines.
  
      This filter can be used to model axisymmetric objects like
      cylinders, bottles, and wine glasses; or translational
      rotational symmetric objects like springs or corkscrews.
  
      .. versionchanged:: 0.32.0
         The ``capping`` keyword was added with a default of ``False``.
         The previously used VTK default corresponds to ``capping=True``.
         In a future version the default will be changed to ``True`` to
         match the behavior of the underlying VTK filter.
  
      Parameters
      ----------
      resolution : int, optional
          Number of pieces to divide line into.
  
      inplace : bool, default: False
          Overwrites the original mesh inplace.
  
      translation : float, optional
          Total amount of translation along the axis.
  
      dradius : float, optional
          Change in radius during sweep process.
  
      angle : float, optional
          The angle of rotation in degrees.
  
      capping : bool, optional
          Control if the sweep of a 2D object is capped. The default is
          ``False``, which differs from VTK's default.
  
          .. warning::
             The ``capping`` keyword was added in version 0.32.0 with a
             default value of ``False``. In a future version this default
             will be changed to ``True`` to match the behavior of the
             underlying VTK filter. It is recommended to explicitly pass
             a value for this keyword argument to prevent future changes
             in behavior and warnings.
  
      rotation_axis : numpy.ndarray or sequence, optional
          The direction vector of the axis around which the rotation is done.
          It requires vtk>=9.1.0.
  
      progress_bar : bool, default: False
          Display a progress bar to indicate progress.
  
      Returns
      -------
      pyvista.PolyData
          Rotationally extruded mesh.
  
      Examples
      --------
      Create a "spring" using the rotational extrusion filter.
  
      >>> import pyvista as pv
      >>> profile = pv.Polygon(
      ...     center=[1.25, 0.0, 0.0],
      ...     radius=0.2,
      ...     normal=(0, 1, 0),
      ...     n_sides=30,
      ... )
      >>> extruded = profile.extrude_rotate(
      ...     resolution=360,
      ...     translation=4.0,
      ...     dradius=0.5,
      ...     angle=1500.0,
      ...     capping=True,
      ... )
      >>> extruded.plot(smooth_shading=True)
  
      Create a "wine glass" using the rotational extrusion filter.
  
      >>> import numpy as np
      >>> points = np.array(
      ...     [
      ...         [-0.18, 0, 0],
      ...         [-0.18, 0, 0.01],
      ...         [-0.18, 0, 0.02],
      ...         [-0.01, 0, 0.03],
      ...         [-0.01, 0, 0.04],
      ...         [-0.02, 0, 0.5],
      ...         [-0.05, 0, 0.75],
      ...         [-0.1, 0, 0.8],
      ...         [-0.2, 0, 1.0],
      ...     ]
      ... )
      >>> spline = pv.Spline(points, 30)
      >>> extruded = spline.extrude_rotate(resolution=20, capping=False)
      >>> extruded.plot(color='lightblue')
  
      """
      if capping is None:
          capping = False
          warnings.warn(
              "The default value of the ``capping`` keyword argument will change in "
              "a future version to ``True`` to match the behavior of VTK. We recommend "
              "passing the keyword explicitly to prevent future surprises.",
              PyVistaFutureWarning,
          )
  
      if (
          not isinstance(
              rotation_axis, (np.ndarray, collections.abc.Sequence)
          )
          or len(rotation_axis) != 3
      ):
          raise ValueError("Vector must be a length three vector")
  
      if resolution <= 0:
          raise ValueError("`resolution` should be positive")
      alg = _vtk.vtkRotationalExtrusionFilter()
      alg.SetInputData(self)
      alg.SetResolution(resolution)
      alg.SetTranslation(translation)
      alg.SetDeltaRadius(dradius)
      alg.SetCapping(capping)
      alg.SetAngle(angle)
      if pyvista.vtk_version_info >= (9, 1, 0):
          alg.SetRotationAxis(rotation_axis)
      else:  # pragma: no cover
          if rotation_axis != (0, 0, 1):
              raise VTKVersionError(
                  "The installed version of VTK does not support "
                  "setting the direction vector of the axis around which the rotation is done."
              )
  
      _update_alg(alg, progress_bar, "Extruding")
      output = wrap(alg.GetOutput())
      if inplace:
          self.copy_from(output, deep=False)
          return self
      return output
  
imports: import collections.abc
  import warnings
  import numpy
  import pyvista
  from pyvista.core import _vtk_core
  from pyvista.core.errors import MissingDataError, NotAllTrianglesError, PyVistaFutureWarning, VTKVersionError
  from pyvista.core.filters import _get_output, _update_alg
  from pyvista.core.filters.data_set import DataSetFilters
  from pyvista.core.utilities.arrays import FieldAssociation, get_array, get_array_association, set_default_active_scalars, vtk_id_list_to_array
  from pyvista.core.utilities.geometric_objects import NORMALS
  from pyvista.core.utilities.helpers import generate_plane, wrap
  from pyvista.core.utilities.misc import abstract_class, assert_empty_kwargs
label_desc: Use image node_id 38 for calling the PolyDataFilters obj's underlying member method code with example usage: obj.extrude_rotate(resolution, inplace, translation, dradius, angle, capping, rotation_axis, progress_bar) and returns: output, self