.. # split from OESpicoliFunctions.rst:492


.. oe:namespace:: OESpicoli

.. meta::
   :keywords: OEMakeSurfaceFromGrid

.. oe:function:: OEMakeSurfaceFromGrid

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

      .. oe:api::

         bool OEMakeSurfaceFromGrid(OESurface& surf,
                                    const OESystem::OESkewGrid& grid,
                                    float contour)
         bool OEMakeSurfaceFromGrid(OESurface& surf,
                                    const OESystem::OEFixedGrid<float>& grid,
                                    float contour)
         bool OEMakeSurfaceFromGrid(OESurface& surf,
                                    const OESystem::OEFixedGrid<float>& grid,
                                    float contour, float resolution)

   .. oe:language:: python

      .. oe:api:: python

         OEMakeSurfaceFromGrid(surf: OESurface, grid: OESkewGrid,
                               contour: float) -> bool
         OEMakeSurfaceFromGrid(surf: OESurface, grid: OEFixedFloatGrid,
                               contour: float) -> bool
         OEMakeSurfaceFromGrid(surf: OESurface, grid: OEFixedFloatGrid,
                               contour: float, resolution: float) -> bool

   An implementation of the :term:`marching cubes` algorithm to create
   a surface, ``surf``, through the values in the grid, ``grid``. Grid
   points with values less than contour are inside the surface and the
   converse is true for grid points outside the surface. 

   .. seealso::
   
      * The :ref:`generation_grids` section for more information on
        converting grids to surfaces.

