Regular API function

simGenerateShapeFromPath / sim.generateShapefromPath

Description Generates an extrusion shape from a path. See also the other path related functions.
C synopsis
simInt simGenerateShapeFromPath(const simFloat* path,simInt pathSize,const simFloat* section,simInt sectionSize,simInt options,const simFloat* upVector,simFloat reserved)
C parameters
path: the path, specified in row-major order, with x/y/z/qx/qy/qz/qw values for each path point. The orientation parts for each path point are ignored if the two first bits of options are zero.
pathSize: the size/length of the path pointer
section: the extrusion profile, with x/y pairs, e.g. x1,y1,x2,y2,..,xn,yn. If the first and last pair overlap, the section is closed
sectionSize: the size/length of the section pointer
options: bit-coded: bit0-bit1: 0=upVector is upVector, 1=upVector is the x-axis of the path point frame, 2=upVector is the y-axis of the path point frame, 3=upVector is the z-axis of the path point frame. If bit2 is set (4), the path is closed.
upVector: a vector that identifies the up-side of the extrusion shape. Can be nullptr if the two first bits of options are non-zero.
C return value
shapeHandle: the handle of the generated shape
Lua synopsis int shapeHandle=sim.generateShapeFromPath(table[] path,table[] section,int options=0,table[3] upVector={0.0,0.0,1.0})
Lua parameters Similar to the C-function counterpart
Lua return values Similar to the C-function counterpart