trimesh.decomposition module

trimesh.decomposition.convex_decomposition(mesh, **kwargs) list[dict]

Compute an approximate convex decomposition of a mesh.

VHACD Parameters which can be passed as kwargs:

Name Default

maxConvexHulls 64 resolution 400000 minimumVolumePercentErrorAllowed 1.0 maxRecursionDepth 10 shrinkWrap True fillMode “flood” maxNumVerticesPerCH 64 asyncACD True minEdgeLength 2 findBestPlane False

param mesh:

Mesh to be decomposed into convex parts

type mesh:

trimesh.Trimesh

param **kwargs:

type **kwargs:

VHACD keyword arguments

returns:

mesh_args – List of **kwargs for Trimeshes that are nearly convex and approximate the original.

rtype:

list