I would very much like to get the Convex Hull (of the Rigid Body Collision shape) as an actual mesh.
Is there any way?
Blender Stack Exchange is a question and answer site for people who use Blender to create 3D graphics, animations, or games. It only takes a minute to sign up.Sign up to join this community
Convex hull bmesh operator
Builds a convex hull from the vertices in ‘
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 scene.objects.link(copy)