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: Apply a 2D Delaunay filter along the best fitting plane.
  
  This filter can be used to generate a 2d surface from a set of
  points on a plane.  If you want to create a surface from a
  point cloud, see :func:`pyvista.PolyDataFilters.reconstruct_surface`.
  
  Parameters
  ----------
  tol : float, default: 1e-05
      Specify a tolerance to control discarding of closely
      spaced points. This tolerance is specified as a fraction
      of the diagonal length of the bounding box of the points.
  
  alpha : float, default: 0.0
      Specify alpha (or distance) value to control output of
      this filter. For a non-zero alpha value, only edges or
      triangles contained within a sphere centered at mesh
      vertices will be output. Otherwise, only triangles will be
      output.
  
  offset : float, default: 1.0
      Specify a multiplier to control the size of the initial,
      bounding Delaunay triangulation.
  
  bound : bool, default: False
      Boolean controls whether bounding triangulation points
      and associated triangles are included in the
      output. These are introduced as an initial triangulation
      to begin the triangulation process. This feature is nice
      for debugging output.
  
  inplace : bool, default: False
      If ``True``, overwrite this mesh with the triangulated
      mesh.
  
  edge_source : pyvista.PolyData, optional
      Specify the source object used to specify constrained
      edges and loops. If set, and lines/polygons are defined, a
      constrained triangulation is created. The lines/polygons
      are assumed to reference points in the input point set
      (i.e. point ids are identical in the input and
      source).
  
  progress_bar : bool, default: False
      Display a progress bar to indicate progress.
  
  Returns
  -------
  pyvista.PolyData
      Mesh from the 2D delaunay filter.
  
  Examples
  --------
  First, generate 30 points on circle and plot them.
  
  >>> import pyvista as pv
  >>> points = pv.Polygon(n_sides=30).points
  >>> circle = pv.PolyData(points)
  >>> circle.plot(show_edges=True, point_size=15)
  
  Use :func:`delaunay_2d` to fill the interior of the circle.
  
  >>> filled_circle = circle.delaunay_2d()
  >>> filled_circle.plot(show_edges=True, line_width=5)
  
  Use the ``edge_source`` parameter to create a constrained delaunay
  triangulation and plot it.
  
  >>> squar = pv.Polygon(n_sides=4, radius=8, fill=False)
  >>> squar = squar.rotate_z(45, inplace=False)
  >>> circ0 = pv.Polygon(center=(2, 3, 0), n_sides=30, radius=1)
  >>> circ1 = pv.Polygon(center=(-2, -3, 0), n_sides=30, radius=1)
  >>> comb = circ0 + circ1 + squar
  >>> tess = comb.delaunay_2d(edge_source=comb)
  >>> tess.plot(cpos='xy', show_edges=True)
  
  See :ref:`triangulated_surface` for more examples using this filter.
docstr_tok: ["Apply","a","2D","Delaunay","filter","along","the","best","fitting","plane",".","This","filter","can","be","used","to","generate","a","2d","surface","from","a","set","of","points","on","a","plane",".","If","you","want","to","create","a","surface","from","a","point","cloud",",","see",":","func",":","`","pyvista.PolyDataFilters.reconstruct_surface","`",".","Parameters","--","--","--","--","--","tol",":","float",",","default",":","1e-05","Specify","a","tolerance","to","control","discarding","of","closely","spaced","points",".","This","tolerance","is","specified","as","a","fraction","of","the","diagonal","length","of","the","bounding","box","of","the","points",".","alpha",":","float",",","default",":","0.0","Specify","alpha","(","or","distance",")","value","to","control","output","of","this","filter",".","For","a","non-zero","alpha","value",",","only","edges","or","triangles","contained","within","a","sphere","centered","at","mesh","vertices","will","be","output",".","Otherwise",",","only","triangles","will","be","output",".","offset",":","float",",","default",":","1.0","Specify","a","multiplier","to","control","the","size","of","the","initial",",","bounding","Delaunay","triangulation",".","bound",":","bool",",","default",":","False","Boolean","controls","whether","bounding","triangulation","points","and","associated","triangles","are","included","in","the","output",".","These","are","introduced","as","an","initial","triangulation","to","begin","the","triangulation","process",".","This","feature","is","nice","for","debugging","output",".","inplace",":","bool",",","default",":","False","If","``","True","``",",","overwrite","this","mesh","with","the","triangulated","mesh",".","edge_source",":","pyvista.PolyData",",","optional","Specify","the","source","object","used","to","specify","constrained","edges","and","loops",".","If","set",",","and","lines\/polygons","are","defined",",","a","constrained","triangulation","is","created",".","The","lines\/polygons","are","assumed","to","reference","points","in","the","input","point","set","(","i.e",".","point","ids","are","identical","in","the","input","and","source",")",".","progress_bar",":","bool",",","default",":","False","Display","a","progress","bar","to","indicate","progress",".","Returns","--","--","--","-","pyvista.PolyData","Mesh","from","the","2D","delaunay","filter",".","Examples","--","--","--","--","First",",","generate","30","points","on","circle","and","plot","them",".",">",">",">","import","pyvista","as","pv",">",">",">","points","=","pv.Polygon","(","n_sides=30",")",".points",">",">",">","circle","=","pv.PolyData","(","points",")",">",">",">","circle.plot","(","show_edges=True",",","point_size=15",")","Use",":","func",":","`","delaunay_2d","`","to","fill","the","interior","of","the","circle",".",">",">",">","filled_circle","=","circle.delaunay_2d","(",")",">",">",">","filled_circle.plot","(","show_edges=True",",","line_width=5",")","Use","the","``","edge_source","``","parameter","to","create","a","constrained","delaunay","triangulation","and","plot","it",".",">",">",">","squar","=","pv.Polygon","(","n_sides=4",",","radius=8",",","fill=False",")",">",">",">","squar","=","squar.rotate_z","(","45",",","inplace=False",")",">",">",">","circ0","=","pv.Polygon","(","center=","(","2",",","3",",","0",")",",","n_sides=30",",","radius=1",")",">",">",">","circ1","=","pv.Polygon","(","center=","(","-2",",","-3",",","0",")",",","n_sides=30",",","radius=1",")",">",">",">","comb","=","circ0","+","circ1","+","squar",">",">",">","tess","=","comb.delaunay_2d","(","edge_source=comb",")",">",">",">","tess.plot","(","cpos='xy","'",",","show_edges=True",")","See",":","ref",":","`","triangulated_surface","`","for","more","examples","using","this","filter","."]
code: def delaunay_2d(
      self,
      tol=1e-05,
      alpha=0.0,
      offset=1.0,
      bound=False,
      inplace=False,
      edge_source=None,
      progress_bar=False,
  ):
      """Apply a 2D Delaunay filter along the best fitting plane.
  
      This filter can be used to generate a 2d surface from a set of
      points on a plane.  If you want to create a surface from a
      point cloud, see :func:`pyvista.PolyDataFilters.reconstruct_surface`.
  
      Parameters
      ----------
      tol : float, default: 1e-05
          Specify a tolerance to control discarding of closely
          spaced points. This tolerance is specified as a fraction
          of the diagonal length of the bounding box of the points.
  
      alpha : float, default: 0.0
          Specify alpha (or distance) value to control output of
          this filter. For a non-zero alpha value, only edges or
          triangles contained within a sphere centered at mesh
          vertices will be output. Otherwise, only triangles will be
          output.
  
      offset : float, default: 1.0
          Specify a multiplier to control the size of the initial,
          bounding Delaunay triangulation.
  
      bound : bool, default: False
          Boolean controls whether bounding triangulation points
          and associated triangles are included in the
          output. These are introduced as an initial triangulation
          to begin the triangulation process. This feature is nice
          for debugging output.
  
      inplace : bool, default: False
          If ``True``, overwrite this mesh with the triangulated
          mesh.
  
      edge_source : pyvista.PolyData, optional
          Specify the source object used to specify constrained
          edges and loops. If set, and lines/polygons are defined, a
          constrained triangulation is created. The lines/polygons
          are assumed to reference points in the input point set
          (i.e. point ids are identical in the input and
          source).
  
      progress_bar : bool, default: False
          Display a progress bar to indicate progress.
  
      Returns
      -------
      pyvista.PolyData
          Mesh from the 2D delaunay filter.
  
      Examples
      --------
      First, generate 30 points on circle and plot them.
  
      >>> import pyvista as pv
      >>> points = pv.Polygon(n_sides=30).points
      >>> circle = pv.PolyData(points)
      >>> circle.plot(show_edges=True, point_size=15)
  
      Use :func:`delaunay_2d` to fill the interior of the circle.
  
      >>> filled_circle = circle.delaunay_2d()
      >>> filled_circle.plot(show_edges=True, line_width=5)
  
      Use the ``edge_source`` parameter to create a constrained delaunay
      triangulation and plot it.
  
      >>> squar = pv.Polygon(n_sides=4, radius=8, fill=False)
      >>> squar = squar.rotate_z(45, inplace=False)
      >>> circ0 = pv.Polygon(center=(2, 3, 0), n_sides=30, radius=1)
      >>> circ1 = pv.Polygon(center=(-2, -3, 0), n_sides=30, radius=1)
      >>> comb = circ0 + circ1 + squar
      >>> tess = comb.delaunay_2d(edge_source=comb)
      >>> tess.plot(cpos='xy', show_edges=True)
  
      See :ref:`triangulated_surface` for more examples using this filter.
  
      """
      alg = _vtk.vtkDelaunay2D()
      alg.SetProjectionPlaneMode(_vtk.VTK_BEST_FITTING_PLANE)
      alg.SetInputDataObject(self)
      alg.SetTolerance(tol)
      alg.SetAlpha(alpha)
      alg.SetOffset(offset)
      alg.SetBoundingTriangulation(bound)
      if edge_source is not None:
          alg.SetSourceData(edge_source)
      _update_alg(alg, progress_bar, "Computing 2D Triangulation")
  
      # Sometimes lines are given in the output. The
      # `.triangulate()` filter cleans those
      mesh = _get_output(alg).triangulate()
      if inplace:
          self.copy_from(mesh, deep=False)
          return self
      return mesh
  
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 33 for calling the PolyDataFilters obj's underlying member method code with example usage: obj.delaunay_2d(tol, alpha, offset, bound, inplace, edge_source, progress_bar) and returns: mesh, self