API → FileGet CAD file center of mass

Parameters

Name

Type

Req.

  • output_unit

    string
    required
    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>
  • src_format

    string
    required
    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)>
  • bodyapplication/octet-stream

    string / BINARY
    optional

Returns

  • 201 Created

    successful creation

    Name

    Type

    Req.

    body

    object
    optional
    Object Properties
    • center_of_mass

      object
      optional
      Object Properties
      • x

        number
        optional
      • y

        number
        optional
      • z

        number
        optional
    • completed_at

      string / ISO-8601
      optional
    • created_at

      string / ISO-8601
      optional
    • error

      string
      optional
    • id

      string / UUID
      optional
    • output_unit

      string
      optional
      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>
    • src_format

      string
      optional
      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)>
    • started_at

      string / ISO-8601
      optional
    • status

      string
      optional
      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.
    • updated_at

      string / ISO-8601
      optional
    • user_id

      string / UUID
      optional
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": 2,
    "y": 8,
    "z": 29
  },
  "completed_at": "2024-07-27T01:15:36.588Z",
  "created_at": "2024-07-27T01:15:36.588Z",
  "error": "9bYPICoWHgHU3v6utBmTIBI26sGfzV",
  "id": "5e8c5f92-e4f1-4b14-b663-9d62aa5abc3e",
  "output_unit": "yd",
  "src_format": "ply",
  "started_at": "2024-07-27T01:15:36.588Z",
  "status": "completed",
  "updated_at": "2024-07-27T01:15:36.588Z",
  "user_id": "9f27cbb5-b965-4232-b9b4-c10b74c2c101"
}