Autodesk Forge Model Derivative API: OBJ files

筅森魡賤 提交于 2019-12-13 21:41:56

问题


Using Autodesk FORGE Model Derivative API to query geometry attributes from REVIT files results in very large OBJ files; e.g. a 30-40MBs REVIT file transforms to a 1GBs OBJ file.

  1. Is there any documentation on generating optimized OBJ files via FORGE Model Derivative API? Are there other alternatives to downloading optimized geometry attributes?
  2. FORGE VIEWER seems to take SVF fileformat as input. Is SVF a recommended file format for custom made webGL viewers and is there any documentation available on SVF?

回答1:


Yes, OBJ file can becomes big very quickly since you describe each triangles completely and I believe it isn't necessarily optimized at this point. However the Forge API allows you to request geometry for individual components. For example, you could ask for a specific wall, door, or others geometry. The Forge Model Derivative endpoint POST Job can specify which objects you want: see the objectIds array below.

{
  "input": {
    "urn": "string",
    "compressedUrn": false,
    "rootFilename": "string"
  },
  "output": {
    "formats": [
      {
        "type": "svf",
        "views": [
          "2d"
        ],
        "advanced": {
          "exportFileStructure": "single",
          "modelGuid": "string",
          "objectIds": [
            "string"
          ]
        }
      }
    ]
  }
} 

To complete my answer, you can get the objectIds from the manifest file as you wish.

Other alternatives, is to get the geometry in another format such as step, but today we got a limited choice today (svf, thumbnail, stl, step, iges, or obj). It will expand in future, as well as supporting options and optimizations for each formats.

The SVF format which is the Forge Viewer format is an internal format and is not documented today. But is an an aggregate of json, png, SQLlite files which can be unzipped and reverse engineered fairly easy. However, the SVF formats might still be larger than the RVT file itself, but smaller than OBJ.



来源:https://stackoverflow.com/questions/38577922/autodesk-forge-model-derivative-api-obj-files

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!