simConvex API reference

simConvex.hacd
simConvex.vhacd
simConvex.hull
simConvex.qhull

simConvex.hacd

Description Computes the HACD convex decomposition of a shape
Lua synopsis int[] convexShapeHandles = simConvex.hacd(int shapeHandle, map params)
Lua arguments
shapeHandle: the handle of the shape
params: a map with optional parameters. Can be nil. Allowed parameters are:
  • min_cluster_cnt (default: 1)
  • max_concavity (default: 100.0)
  • max_connection_dist (default: 30.0)
  • triangle_cnt_decimated_mesh (default: 500)
  • max_vertices_cnt (default: 200)
  • small_cluster_detect_threshold (default: 0.25)
  • add_extra_pts (default: true)
  • add_extra_face_pts (default: true)
Lua return values
convexShapeHandles: the convex decomposition
Python synopsis list convexShapeHandles = simConvex.hacd(int shapeHandle, dict params)
See also simConvex.vhacd, simConvex.hull

simConvex.vhacd

Description Computes the V-HACD convex decomposition of a shape
Lua synopsis int[] convexShapeHandles = simConvex.vhacd(int shapeHandle, map params)
Lua arguments
shapeHandle: the handle of the shape
params: a map with optional parameters. Can be nil. Allowed parameters are:
  • resolution (default: 100000)
  • concavity (default: 0.1)
  • plane_downsampling (default: 4)
  • hull_downsampling (default: 4)
  • alpha (default: 0.05)
  • beta (default: 0.05)
  • max_vertices (default: 64)
  • min_volume (default: 0.0001)
  • pca (default: false)
  • voxels (default: true)
Lua return values
convexShapeHandles: the convex decomposition
Python synopsis list convexShapeHandles = simConvex.vhacd(int shapeHandle, dict params)
See also simConvex.hacd, simConvex.hull

simConvex.hull

Description Computes the convex hull of one or more objects
Lua synopsis int convexShapeHandle = simConvex.hull(int[] objectHandles, float growth = 0.0)
Lua arguments
objectHandles: the handles of objects. Only shapes, dummies, OC-trees and point clouds are taken into account
growth: an optional growth
Lua return values
convexShapeHandle: the convex hull
Python synopsis int convexShapeHandle = simConvex.hull(list objectHandles, float growth = 0.0)
See also simConvex.qhull, simConvex.hacd, simConvex.vhacd

simConvex.qhull

Description Computes the convex hull from 3D points
Lua synopsis float[] vertices, int[] indices = simConvex.qhull(float[] points, float growth = 0.0)
Lua arguments
points: an array with consecutive 3D point coordinates
growth: an optional growth
Lua return values
vertices: the vertices of the convex hull
indices: the indices of the convex hull
Python synopsis list vertices, list indices = simConvex.qhull(list points, float growth = 0.0)
See also simConvex.hull