.. # split from OESpicoliFunctions.rst:407


.. oe:namespace:: OESpicoli

.. meta::
   :keywords: OEMakeGridFromSurface

.. oe:function:: OEMakeGridFromSurface

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

      .. oe:api::

         bool OEMakeGridFromSurface(OESystem::OEScalarGrid& grid,
                                    const OESurface& surf,
                                    unsigned int method = OEVoxelizeMethod::Default)

   .. oe:language:: python

      .. oe:api:: python

         OEMakeGridFromSurface(grid: OEScalarGrid, surf: OESurface, method: int) -> bool

   Fill ``grid`` with a voxelized representation of the surface by the
   method passed as the ``method`` parameter. The constants for
   ``method`` parameter are defined by the
   :oe:constns:`OESpicoli::OEVoxelizeMethod` namespace.

   .. seealso::

      * The :oe:constns:`OESpicoli::OEVoxelizeMethod` namespace.

