Regular API function

simUngroupShape / sim.ungroupShape

Description Ungroups a compound shape into several simple shapes. See also sim.groupShapes, sim.convexDecompose, sim.getQHull and sim.getDecimatedMesh.
simInt* simUngroupShape(simInt shapeHandle,simInt* shapeCount)
shapeHandle: the handles of the shape you wish to ungroup. If you specify for this argument (-2-handleOfShape), then the shape will be divided instead of ungrouped.
shapeCount (output): the size of the returned buffer.
return value
a pointer to an array holding the handles of the resulting shapes, or nullptr in case of an error. The user is in charge of releasing the array buffer with simReleaseBuffer.
Lua synopsis table[] simpleShapeHandles=sim.ungroupShape(int shapeHandle)
Lua parameters
Similar to the C-function counterpart
Lua return values
Similar to the C-function counterpart
Python synopsis list simpleShapeHandles=sim.ungroupShape(int shapeHandle)