generate_fibers
Generates a fibers object using structured data supplied to the command. See below for the description of the mesh format.
References:
arguments
- "fibers" : Data
Array of fiber objects representing each fiber to create. Below is an example of two fibers with control points, radii and optional uvs. Note that only one uv set is supported per fiber object and if provided, uvs must have consistent dimensions (either 1d, 2d, or 3d) across all fibers. In addition, the number of uvs and radii must match the number of control points for each fiber and each fiber must have a minimum of 4 control points with the exception of pinning.
Note: When the fiber object is created the object will not have its visible attribute set. You must call the element_set_attribute command to do so.
Example:[{ "control_points" : [ {"x":0,"y":0,"z":0}, {"x":0,"y":0.1,"z":0}, {"x":0,"y":0.2,"z":0}, {"x":0,"y":0.3,"z":0} ], "radii" : [0.02,0.015,0.01,0.005], "uvs" : [ {"x":0,"y":0,"z":0}, {"x":0,"y":0,"z":0.01}, {"x":0,"y":0,"z":0.02}, {"x":0,"y":0,"z":0.03}] },{ "control_points" : [ {"x":0,"y":0,"z":0}, {"x":0,"y":0.25,"z":0}, {"x":0,"y":0.5,"z":0}, {"x":0,"y":1.0,"z":0} ], "radii" : [0.02,0.015,0.01,0.005], "uvs" : [ {"x":0,"y":0,"z":0}, {"x":0,"y":0.25,"z":0}, {"x":0,"y":0.5,"z":0}, {"x":0,"y":1.0,"z":0}] }]
The generate_fibres command also accepts the optimized binary format generated by the geometry_get_fibres command. See the documentation for that command for more details on this format. This format is automatically detected when the fibres parameter is provided as a Map instead of an Array. - "name" : String
Name to give the object once generated
- "pinned" : String (default: "none")
Whether the first and last control points should be pinned to their respective coordinates. This is done by adding extra control points to either the start or end of the fiber. Without pinning, the resulting fiber may not necessarily start or end on the first and last control points. Note that specifying start or end pinning will reduce the number of control points required by the fibers parameter.
Possible Values:
- none
- start
- end
- both
return value
VoidVoid.