Closed dykarohora closed 2 years ago
You can retrieve the hierarchy using Model Derivative API, like this:
GET https://developer.api.autodesk.com/modelderivative/v2/designdata/:urn/metadata/:guid
API doc for hierarchy
: https://forge.autodesk.com/en/docs/model-derivative/v2/reference/http/urn-metadata-guid-GET/
Source code for retrieving the hierarchy, using the 5 properties json files: https://github.com/wallabyway/propertyServer/blob/b7b4222acbc9e1e45f66928fb354e360e44fc0b9/server/properties.js#L588-L628
As @wallabyway explained, the object hierarchy can be retrieved directly from the public Model Derivative APIs. This approach is preferable to parsing the InstanceTree.bin file.
I would like to reproduce the object hierarchy of the source design in gltf.
To do this, I think need to parse "InstanceTree.bin", is that the right?
Also, I don't know how to parse InstanceTree.bin. I tried using the PackFileReader Class, but although I could read the file, I could not retrieve the data. Can you tell me how to parse it?