code: def thickness(mesh,
                points,
                exterior=False,
                normals=None,
                method='max_sphere'):
      
      points = np.asanyarray(points, dtype=np.float64)
      if not util.is_shape(points, (-1, 3)):
          raise ValueError('points must be (n,3)!')
  
      if normals is not None:
          normals = np.asanyarray(normals, dtype=np.float64)
          if not util.is_shape(normals, (-1, 3)):
              raise ValueError('normals must be (n,3)!')
  
          if len(points) != len(normals):
              raise ValueError('number of points must equal number of normals!')
      else:
          normals = mesh.face_normals[closest_point(mesh, points)[2]]
  
      if method == 'max_sphere':
          centers, radius = max_tangent_sphere(mesh=mesh,
                                               points=points,
                                               inwards=not exterior,
                                               normals=normals)
          thickness = radius * 2
          return thickness
  
      elif method == 'ray':
          if exterior:
              return longest_ray(mesh, points, normals)
          else:
              return longest_ray(mesh, points, -normals)
      else:
          raise ValueError('Invalid method, use "max_sphere" or "ray"')
docs: Find the thickness of the mesh at the given points.
  
      Parameters
      ----------
      points : (n,3) float, list of points in space
      exterior : bool, whether to compute the exterior thickness
                       (a.k.a. reach)
      normals : (n,3) float, normals of the mesh at the given points
                None, compute this automatically.
      method : string, one of 'max_sphere' or 'ray'
  
      Returns
      ----------
      thickness : (n,) float, thickness