Important!
The 3D print API is shutting down on January 15, 2017. See our end of life notice for more information.
POST meshes/transform¶a>
Rescales, rotates, and repositions the mesh. This operation replaces the mesh transform field, returning a new mesh.
The unit of length in the transform is centimeters, so a scale factor that converts each unit to centimeters may be required.
Resource Information¶
Method and URI | POST https:/ |
Authentication Context | user context required |
Required OAuth Scopes | data:read data:write |
Data Format | JSON |
Request¶
HTTP Headers¶
Name |
Required |
Value Type |
Description |
---|---|---|---|
Authorization | yes | string | Must be Bearer <token> , where <token> is obtained via a three- |
Content-Type | yes | string | Must be application/json |
Body Structure¶
The POST body is a single, flat JSON object with the following attributes:
Name |
Required |
Value Type |
Description |
---|---|---|---|
id | yes | string: UUID | id of the source mesh to be transformed |
transform | yes | array: array: int | An array of 12 numbers representing a
3D affine transformation matrix. An affine transformation matrix positions and scales the
mesh in the printer’s three dimensional build space. It is specified as the first three
columns of a 4x4 matrix in which the last column is implicit and set to [ 0, 0, 0, 1 ] . |
Response¶
HTTP Status Code Summary¶
Code |
Message |
Meaning |
---|---|---|
200 | OK | Success |
400 | Bad Request | Invalid request. E.g., the request could not be parsed. |
401 | Unauthorized | Invalid authorization header. E.g., user is not logged in, or cannot access resource. |
404 | Not Found | Endpoint does not exist. |
422 | Unprocessable Entity | Semantic errors |
429 | Precondition Required | Request rate limit exceeded |
500 | Internal Server Error | An unknown error occurred on the server. |
Body Structure (200)¶
A successful response returns the transformed mesh object.
For details about mesh objects, see the Field Guide section.
Examples¶
Transformed Mesh Successfully Created (200)¶
curl -X 'POST' -H 'Authorization: Bearer RWLzh098vuF3068r73FI7nF2RORf' -H 'Content-Type: application/json' -v 'https://developer.api.autodesk.com/ps/v1/geom/meshes/transform' -d '{
"id": "270a95c9-ff09-4fd2-a083-a41eb294150a",
"transform" : [ [ 0, 0, 0, 1 ], [ 1, 0, 0, 0 ], [ 0, 0, 2, 0 ] ]
}'
{
"id": "4de00190-3318-4cc5-b933-71868d69481c",
"name": "my-mesh",
"geom": {
"bounding_box": {
"max": [
31.225000381469727,
22.575000762939453,
12.225000381469727
],
"min": [
-31.225000381469727,
-41,
-12.225000381469727
]
},
"has_uvs": false,
"num_triangles": 4278,
"num_vertices": 2131
},
"transform": [
[
0,
0,
0,
1
],
[
1,
0,
0,
0
],
[
0,
0,
2,
0
]
],
"analyzed": false
}