0

I am trying to convert a zip folder into svf. The zip contains the following files : - an .obj (3D object); - a .mtl (links the object to its texture); - a .tif (texture).

I used Postman's 'Request Translation (ZIP to SVF)' to get an urn. Everything seems fine until that step. I get a 64 based urn, and the request's result is "created". But, when I try to display it with Forge viewer afterwards, I get the following error :

error : 9

According to this, the data would not contain any viewable data.

So I tried to use Forge extractor instead, and it works perfectly, I can view my model with its texture as extractor's output.

This post seems to give some instructions, but I do not understand how to link the files together and register them individually for translation.

Has anyone encountered this before ?

Fred Coud
  • 127
  • 1
  • 1
  • 13

2 Answers2

0

When calling POST Job for a .zip make sure to specify the compressedUrn and rootFilename attributes, something like:

 curl -X 'POST' -H 'Authorization: Bearer WmzXZq9MATYyfrnOFpYOE75sL5dh' -H 'Content-Type: application/json' -v 'https://developer.api.autodesk.com/modelderivative/v2/designdata/job' -d
'{
   "input": {
     "urn": "dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6bW9kZWxkZXJpdmF0aXZlL0E1LnppcA",
     "rootFilename": "file.obj",
     "compressedUrn": true
   },
   "output": {
      "formats": [
        {
          "type": "svf",
          "views": [
            "2d",
            "3d"
          ]
        }
      ]
   }
 }'

Compressed sample & prepare for Viewer sample.

Augusto Goncalves
  • 8,493
  • 2
  • 17
  • 44
  • Thanks, I tried this, and it does return 'success, created', but as usual, the viewer does not load the model... – Fred Coud Apr 23 '18 at 08:38
  • seems correct... are you able to share this model for testing? if so, please send to forge.help[at]autodesk.com Please do not send any confidential information – Augusto Goncalves Apr 23 '18 at 11:23
  • No, I don't think I can share it. – Fred Coud Apr 23 '18 at 14:03
  • From your original question, you said extract.autodesk.io works fine, so I would suggest review how this sample does: https://github.com/cyrillef/extract.autodesk.io/blob/838b63f1f76668081c789d9962b93a0f97d9555c/server/projects.js#L70 – Augusto Goncalves Apr 24 '18 at 13:23
0

I managed to get my svf urn, but I did not use the zip folder. I had to convert the files inside to another format to make it work. Thanks for the answer though.

Fred Coud
  • 127
  • 1
  • 1
  • 13