volumes

Create a new volume

Changed on

Create a new volume

The ID of the newly created volume is returned. Currently, box volumes and triangle meshes are supported. Which one is created depends on the "type" parameter, which can be either set to "box" or to "trimesh".

If a triangle mesh should be created, the "mesh" parameter is expected to hold the complete volume. It is expected to be a string that encodes two lists in JSON format: [[points], [triangles]]. The list of points contains lists of three numbers, each one representing a vertex in the mesh. The array of triangles also contains three element lists as items. Each one represents a triangle based on the points in the other array, that are referenced by the triangle index values.

posthttp://localhost:8000/{project_id}/volumes/add

Request

Path parameters

project_idstring required

Request body application/x-www-form-urlencoded

typestring required

Type of volume to create

titlestring required

Title of volume

commentstring

An optional comment

meshstring

Triangle mesh

minxstring

Minimum x coordinate of box

minystring

Minimum y coordinate of box

minzstring

Minimum z coordinate of box

maxxstring

Maximum x coordinate of box

maxystring

Maximum y coordinate of box

maxzstring

Maximum z coordinate of box

Response

Created

Changes