.. # split from OESpicoliFunctions.rst:547


.. oe:namespace:: OESpicoli

.. meta::
   :keywords: OEReduceSurface

.. oe:function:: OEReduceSurface

   .. oe:language:: c++ java csharp

      .. oe:api::

         bool OEReduceSurface(OESurface& reducedSurface,
                              const OESurface& original,
                              unsigned int targetNumberOfVertices,
                              unsigned int type = OEEdgeReductionType::MinimumDistance)

   .. oe:language:: python

      .. oe:api:: python

         OEReduceSurface(reducedSurface: OESurface, original: OESurface,
                         targetNumberOfVertices: int, type: int) -> bool

   Takes a surface and creates a new surface from it, with the new surface
   having a reduced number of vertices and triangles. The 
   ``targetNumberOfVertices`` argument supplies a value for the desired number
   of vertices for the returned surface.  The overall quality of the new
   surface will depend on this value, with smaller values giving lower quality
   surfaces. Currently only one edge reduction method is supported
   (:oe:const:`OESpicoli::OEEdgeReductionType::MinimumDistance`).  Returns 
   true if the returned surface contains the requested number of vertices.

