API → File → Get CAD file center of mass
Parameters
Name
Type
Req.
Possible values
cm
: Centimeters <https://en.wikipedia.org/wiki/Centimeter>ft
: Feet <https://en.wikipedia.org/wiki/Foot_(unit)>in
: Inches <https://en.wikipedia.org/wiki/Inch>m
: Meters <https://en.wikipedia.org/wiki/Meter>mm
: Millimeters <https://en.wikipedia.org/wiki/Millimeter>yd
: Yards <https://en.wikipedia.org/wiki/Yard>
Possible values
fbx
: Autodesk Filmbox (FBX) format. <https://en.wikipedia.org/wiki/FBX>gltf
: glTF 2.0.obj
: The OBJ file format. <https://en.wikipedia.org/wiki/Wavefront_.obj_file> It may or may not have an an attached material (mtl // mtllib) within the file, but we interact with it as if it does not.ply
: The PLY file format. <https://en.wikipedia.org/wiki/PLY_(file_format)>sldprt
: SolidWorks part (SLDPRT) format.step
: The STEP file format. <https://en.wikipedia.org/wiki/ISO_10303-21>stl
: The STL file format. <https://en.wikipedia.org/wiki/STL_(file_format)>
Returns
- 201 Created
successful creation
Name
Type
Req.
body
objectoptionalObject Properties
center_of_mass
objectoptionalPossible values
cm
: Centimeters <https://en.wikipedia.org/wiki/Centimeter>ft
: Feet <https://en.wikipedia.org/wiki/Foot_(unit)>in
: Inches <https://en.wikipedia.org/wiki/Inch>m
: Meters <https://en.wikipedia.org/wiki/Meter>mm
: Millimeters <https://en.wikipedia.org/wiki/Millimeter>yd
: Yards <https://en.wikipedia.org/wiki/Yard>
Possible values
fbx
: Autodesk Filmbox (FBX) format. <https://en.wikipedia.org/wiki/FBX>gltf
: glTF 2.0.obj
: The OBJ file format. <https://en.wikipedia.org/wiki/Wavefront_.obj_file> It may or may not have an an attached material (mtl // mtllib) within the file, but we interact with it as if it does not.ply
: The PLY file format. <https://en.wikipedia.org/wiki/PLY_(file_format)>sldprt
: SolidWorks part (SLDPRT) format.step
: The STEP file format. <https://en.wikipedia.org/wiki/ISO_10303-21>stl
: The STL file format. <https://en.wikipedia.org/wiki/STL_(file_format)>
Possible values
queued
: The async API call is queued.uploaded
: The async API call was uploaded to be converted.in_progress
: The async API call is in progress.completed
: The async API call has completed.failed
: The async API call has failed.
post
/file/center-of-mass$ curl -X POST "https://api.zoo.dev/file/center-of-mass" \
--header "Authorization: Bearer $TOKEN" \
--header "Content-Type: application/octet-stream" \
--data-binary "@path/to/file"
201 Created
Response{
"center_of_mass": {
"x": 22,
"y": 6,
"z": 25
},
"completed_at": "2024-11-22T17:02:26.676Z",
"created_at": "2024-11-22T17:02:26.676Z",
"error": "Js",
"id": "2d9e8897-ba27-4977-b2d8-c974f6dc6392",
"output_unit": "yd",
"src_format": "gltf",
"started_at": "2024-11-22T17:02:26.676Z",
"status": "queued",
"updated_at": "2024-11-22T17:02:26.676Z",
"user_id": "fcee104a-2940-4f61-87da-69ecbc07cee4"
}