问题
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.
- Is there any documentation on generating optimized OBJ files via FORGE Model Derivative API? Are there other alternatives to downloading optimized geometry attributes?
- 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