0
votes

Using the autodesk forge api , first I got a access_token and create a bucketkey and then upload a stl file and then verify the job is complete and then got the guid. use the access_token, urn , guid I post a call :

curl -X 'GET' -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsImtpZCI6Imp3dF9zeW1tZXRyaWNfa2V5In0.eyJjbGllbnRfaWQiOiJTRmxONGFFOTMzZ0dkU1FzbFZzbXk0TlZZTFNsSnc1dyIsImV4cCI6MTQ5OTQ3OTg4NCwic2NvcGUiOlsiZGF0YTpyZWFkIiwiZGF0YTp3cml0ZSIsImJ1Y2tldDpjcmVhdGUiLCJidWNrZXQ6cmVhZCJdLCJhdWQiOiJodHRwczovL2F1dG9kZXNrLmNvbS9hdWQvand0ZXhwNjAiLCJqdGkiOiJiWUE0TWRSc3VlazVnQlZsV3lwMmwydDN6SllvOXVnMjR4VEI2TmtZUld5YTdPT0NVOWU2c3JGcEk0UWRTWHFJIn0.ckLsWxfaUUa_zY2UDumUApxcDZR6xfCRE18GCHvIpPc' -v 'https://developer.api.autodesk.com/modelderivative/v2/designdata/dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6Zm9yZ2UtamF2YS1zYW1wbGUtYXBwLXNmbG40YWU5MzNnZ2RzcXNsdnNteTRudnlsc2xqdzV3LzIwMTcwNzA4MDkxMTU2NTkwMjgzMC5zdGw/metadata/a1f8def6-4c68-4bac-8c88-d14353252d67/properties'

As describe in the tutorials of autodesk: I should got the "mass properties" like volume and area, but I got neither of the two:

< HTTP/1.1 200 OK < Access-Control-Allow-Credentials: true < Access-Control-Allow-Origin: * < Content-Type: application/json; charset=utf-8 < Date: Sat, 08 Jul 2017 01:15:18 GMT < Server: Apigee Router < x-ads-app-identifier: platform-viewing-2017.03.08.15.bf43c23-production < x-ads-duration: 181 ms < x-ads-startup-time: Wed Jun 21 05:40:27 UTC 2017 < Content-Length: 387 < Connection: keep-alive < * Connection #0 to host developer.api.autodesk.com left intact {"data":{"type":"properties", "collection":[ {"objectid":1,"name":"201707080911565902830", "properties":{"Name":"201707080911565902830"}}, {"objectid":2,"name":"201707080911565902830", "properties":{"Component Name":"201707080911565902830","Name":"201707080911565902830"}}, {"objectid":3,"name":"mesh_name_undefined", "properties":{"Appearance":"191, 191, 191","Name":"mesh_name_undefined"}}]}}

Any help is appreciate, tks to stackoverflow.com.

1

1 Answers

2
votes

This endpoint simply returns the properties that are extracted from the native seed file, it doesn't compute for you mass, volume and so on. I don't think those physical properties are part of the STL file, so you won't see them either with /properties endpoint.

If you upload for example an Inventor or dwf file, you will see properties that are attached to that file. To do a simple test upload your file to our viewer https://a360.autodesk.com/viewer and look at what properties are available using the properties panel, that the same you will get from the endpoint.

enter image description here

Hope that helps