class_docstr: Clean and tetrahedralize surface meshes using MeshFix.
  
  Parameters
  ----------
  args : pyvista.PolyData | (np.ndarray, np.ndarray)
      Either a pyvista surface mesh :class:`pyvista.PolyData` or a ``n x 3``
      vertex array and ``n x 3`` face array (indices of the triangles).
  
  Examples
  --------
  Create a meshfix object from a pyvista mesh.
  
  >>> from pyvista import examples
  >>> from pymeshfix import MeshFix
  >>> cow = examples.download_cow()
  >>> mfix = MeshFix(cow)
  
  Create a meshfix object from two numpy arrays. This example is incomplete
  as it does not contain the entire array.
  
  >>> import numpy as np
  >>> points = np.array(
  ...     [
  ...         [3.71636, 2.343387, 0.0],
  ...         [4.126565, 0.642027, 0.0],
  ...         [3.454971, 2.169877, 0.0],
  ...         ...,
  ...         [4.12616, 2.12093, 1.17252],
  ...         [4.133175, 2.175231, 1.259323],
  ...         [4.232341, 1.903079, 0.534362],
  ...     ],
  ...     dtype=float32,
  ... )
  >>> faces = np.array(
  ...     [
  ...         [210, 252, 251],
  ...         [250, 251, 252],
  ...         [201, 253, 210],
  ...         ...,
  ...         [1965, 2193, 2194],
  ...         [2391, 2398, 970],
  ...         [966, 961, 970],
  ...     ]
  ... )
  >>> mfix = MeshFix(points, faces)
class_docstr_tok: ["Clean","and","tetrahedralize","surface","meshes","using","MeshFix",".","Parameters","--","--","--","--","--","args",":","pyvista.PolyData","|","(","np.ndarray",",","np.ndarray",")","Either","a","pyvista","surface","mesh",":","class",":","`","pyvista.PolyData","`","or","a","``","n","x","3","``","vertex","array","and","``","n","x","3","``","face","array","(","indices","of","the","triangles",")",".","Examples","--","--","--","--","Create","a","meshfix","object","from","a","pyvista","mesh",".",">",">",">","from","pyvista","import","examples",">",">",">","from","pymeshfix","import","MeshFix",">",">",">","cow","=","examples.download_cow","(",")",">",">",">","mfix","=","MeshFix","(","cow",")","Create","a","meshfix","object","from","two","numpy","arrays",".","This","example","is","incomplete","as","it","does","not","contain","the","entire","array",".",">",">",">","import","numpy","as","np",">",">",">","points","=","np.array","(","...","[","...","[","3.71636",",","2.343387",",","0.0","]",",","...","[","4.126565",",","0.642027",",","0.0","]",",","...","[","3.454971",",","2.169877",",","0.0","]",",","...","...",",","...","[","4.12616",",","2.12093",",","1.17252","]",",","...","[","4.133175",",","2.175231",",","1.259323","]",",","...","[","4.232341",",","1.903079",",","0.534362","]",",","...","]",",","...","dtype=float32",",","...",")",">",">",">","faces","=","np.array","(","...","[","...","[","210",",","252",",","251","]",",","...","[","250",",","251",",","252","]",",","...","[","201",",","253",",","210","]",",","...","...",",","...","[","1965",",","2193",",","2194","]",",","...","[","2391",",","2398",",","970","]",",","...","[","966",",","961",",","970","]",",","...","]","...",")",">",">",">","mfix","=","MeshFix","(","points",",","faces",")"]
docstr: Write a surface mesh to disk.
  
  Written file may be in a ASCII or binary PLY, STL, or VTK format.
  
  This is a a simple wrapper for :pyvista:`pyvista.PolyData.save`.
  
  Parameters
  ----------
  filename : str
      Filename of mesh to be written.  Filetype is inferred from
      the extension of the filename unless overridden with
      ftype.  Can be one of the following types (.ply, .stl,
      .vtk)
  
  binary: bool, default: True
      Filetype.  Inferred from filename unless specified with a
      three character string.  Can be one of the following:
      ``'ply'``, ``'stl'``, or ``'vtk'``.
  
  Notes
  -----
  Binary files write much faster than ASCII.
docstr_tok: ["Write","a","surface","mesh","to","disk",".","Written","file","may","be","in","a","ASCII","or","binary","PLY",",","STL",",","or","VTK","format",".","This","is","a","a","simple","wrapper","for",":","pyvista",":","`","pyvista.PolyData.save","`",".","Parameters","--","--","--","--","--","filename",":","str","Filename","of","mesh","to","be","written",".","Filetype","is","inferred","from","the","extension","of","the","filename","unless","overridden","with","ftype",".","Can","be","one","of","the","following","types","(",".ply",",",".stl",",",".vtk",")","binary",":","bool",",","default",":","True","Filetype",".","Inferred","from","filename","unless","specified","with","a","three","character","string",".","Can","be","one","of","the","following",":","``","'ply","'","``",",","``","'stl","'","``",",","or","``","'vtk","'","``",".","Notes","--","--","-","Binary","files","write","much","faster","than","ASCII","."]
code: def save(self, filename, binary=True):
      """Write a surface mesh to disk.
  
      Written file may be in a ASCII or binary PLY, STL, or VTK format.
  
      This is a a simple wrapper for :pyvista:`pyvista.PolyData.save`.
  
      Parameters
      ----------
      filename : str
          Filename of mesh to be written.  Filetype is inferred from
          the extension of the filename unless overridden with
          ftype.  Can be one of the following types (.ply, .stl,
          .vtk)
  
      binary: bool, default: True
          Filetype.  Inferred from filename unless specified with a
          three character string.  Can be one of the following:
          ``'ply'``, ``'stl'``, or ``'vtk'``.
  
      Notes
      -----
      Binary files write much faster than ASCII.
  
      """
      return self.mesh.save(filename, binary)
  
file_path: pymeshfix/pymeshfix/meshfix.py
imports: import ctypes
  import numpy
  from pymeshfix import _meshfix
label_desc: Use image node_id 9 for calling the MeshFix obj's underlying member method code with example usage: obj.save(filename, binary) and returns: self