def METHOD_NAME(ob, me, selected_only, precision = 0.1):
    """Hull mesh in a convex shape."""
    # find convex hull
    vertices, triangles = pyffi.utils.quickhull.qhull3d(
        [tuple(v.co) for v in me.vertices if v.sel or not selected_only],
        precision = precision)
    # create convex mesh
    box = Blender.Mesh.New('convexpoly')
    for vert in vertices:
        box.vertices.extend(*vert)
    for triangle in triangles:
        box.faces.extend(triangle)
    # link mesh to scene and set transform
    scn = Blender.Scene.GetCurrent()
    boxob = scn.objects.new(box, 'convexpoly')
    boxob.setMatrix(ob.getMatrix('worldspace'))
    # set bounds type
    boxob.display_type = 'BOUNDS'
    boxob.display_bounds_type = 'POLYHEDRON' # FIXME 'CONVEX' not in blender Python API
    boxob.show_wire = True