# Convex Hull as Mesh

I would very much like to get the Convex Hull (of the Rigid Body Collision shape) as an actual mesh.

Is there any way?

Edit mode(Tab) > Select All(a) > Mesh > Vertices (Ctrl+v)> Convex Hull (h):

Convex hull bmesh operator

bmesh.ops.convex_hull(bm, input, use_existing_faces)

Convex Hull

Builds a convex hull from the vertices in ‘input’.

If ‘use_existing_faces’ is true, the hull will not output triangles that are covered by a pre-existing face.

All hull vertices, faces, and edges are added to ‘geom.out’. Any input elements that end up inside the hull (i.e. are not used by an output face) are added to the ‘interior_geom’ slot. The ‘unused_geom’ slot will contain all interior geometry that is completely unused. Lastly, ‘holes_geom’ contains edges and faces that were in the input and are part of the hull.

Test script, creates a convex hull for the active mesh object.

import bpy
import bmesh
from mathutils import Vector, Matrix

context = bpy.context
scene = context.scene
ob = context.object
me = ob.data
bm = bmesh.new()
bm.from_mesh(me)
copy = ob.copy()
ch = bpy.data.meshes.new("%s convexhull" % me.name)
bmesh.ops.convex_hull(bm, input=bm.verts)
bm.to_mesh(ch)
copy.name = "%s (convex hull)" % ob.name
copy.data = ch