Reality Capture output file to forge viewer - autodesk-forge

is there any way so I can see the results of the Reality Capture API output file in forge Viewer, or do I need to download first then again upload that is the only option?

The output of the Recap API that would work are the following: obj and fbx. In order for you to get a viewable and show it with the Forge Viewer it will need to go through the process of using Model Derivative to translate the file into an SVF.
Here is the steps to take to achieve this:
1st. Use Recap API and set the output as obj or fbx - https://forge.autodesk.com/en/docs/reality-capture/v1/tutorials/create-3d-mesh-from-photos/
2nd. Use Model Derivative API - https://forge.autodesk.com/en/docs/model-derivative/v2/tutorials/prep-file4viewer/

Related

Cannot extract the OBJ of 3D view

I have a Revit file with two different 3D views which I can see them in Autodesk viewer ;however, when I extract model manifest, there is only one OBJ file and I can extract only one.
How can I extract the OBJ of all the 3D views that are created in the model?
Thank you
You need to translate your file into OBJ first using the ModelDerivative API.
According to Supported Translations, Revit files doesn't support OBJ derivatives, so can't translate the whole file into OBJ.
But you can extract the geometry, take a look at this tutorial : Extract Geometry in the official Autodesk Forge documentation.
In the translate payload you need to pass the model guid of the 3D view you want to translate, so you should be able to translate all your 3D views.

Autodesk forge translate object custom in forge configurator inventor

I want to custom translate a model in the forge configurator inventor. This model will be a model that is created and cached after the update process. I want to translate the abc.iam file in the "cache / projectid / hash / model.zip" file and get the urn after this operation.
I couldn't find the document about translate object custom. Also, how can I do this with the model in the cache of this project?
This is how the content is organized - highlighted the bucket name:
You can either use the https://forge.autodesk.com/en/docs/data/v2/reference/http/buckets-:bucketKey-objects-:objectName-details-GET/ endpoint to get the ObjectId of the file or construct it yourself based on the template: urn:adsk.objects:os.object:<bucket name>/<file name URL encoded>
Note: make sure the file name is URL encoded if making the REST call directly instead of using the Forge SDK
You can see what ObjectId is provided for a given file e.g. using the Autodesk Forge Tools Extension in VS Code:
You need to base64 encode the ObjectId in order to get the urn of the file and then use that to kick off the translation: https://forge.autodesk.com/en/docs/model-derivative/v2/tutorials/translate-zip-to-stl/
In case of a zip file you also have to provide the rootFilename (it's pointed out in the sample referenced above) - in case of e.g. the Wheel assembly that's the WheelAssembly.iam file

Missing Autodesk.AEC.ModelData in model forge viewer

I am trying to access Autodesk.AEC.ModelData data in forge viewer.
I have two revit models.
so while consuming it inside the viewer for the first model have the Autodesk.AEC.ModelData but when I am trying to access Autodesk.AEC.ModelData in 2nd model it returns me empty.
After verifying in postman by calling api I found in the second model
there is no role with the name Autodesk.AEC.ModelData and I could not find any url with AECModelData.json
so I would like to understand where is it going wrong is it problem at translation level or is has to do it with revit software. do we manually need to add AEC data before exporting file to rvt or nwd ?
please let me know any other solution to access this data or the area where I can take a look
Only RVT saved with Revit 2018 and later will generate AecModelData. If you still cannot see it on files of Revit 2018 and later, you can try to translate it again with the x-ads-force: true request header.

3D Geometry missing in Revit File after model derivative SVF translation

I'm trying to translate Revit file that contains both 3D and 2D geometries. I've verified that the file contains proper 3D geometry, by opening it in revit 2019 and visualizing it through 3D viewing mode.
However, when I pass this file into model derivative process, it only creates 2D derivative.
Before translation process, I've tried to set default view of the revit file as '3D' instead of 2D drawing file, which didn't work.
I've also tried making a translation POST request with formats as 'svf', and views as both ('3D', '2D'), and ('3D' only), which both failed.
However, all these attempts didn't work, and when I inspected the manifest from the file translation, it seems like that 3D geometry is completely missing. I think that there is a unhandled exception in Model Derivative process that fails to extract 3D geometry in our particular forge model file.
If you need URN of the file / actual file, please let me know.
Thanks in advance.
- EDIT
UPDATE:
I've confirmed that the default 3D view is named as {3D}, default name set by Revit.
What is the name of your default 3D view?
The default name is "{3D}", I believe.
Maybe the translation process does not pick it up if it is named differently.
Afaik, the one and only way to specify the views for the translator to process is by using the Collaboration for Revit or C4R BIM 360 Team tool to select the views to publish to the cloud.

Convert autodesk .dwg and .dwf files to three.js json format

I want to render 3D graphics files of autodesk (.dwg and .dwf) using three.js but three.js requires 3D data to be in json format. So, I need to convert these files to three.js readable json format. I tried searching on the internet but couldn't find any solution. Can anyone tell me a good converter for these files?
Thanks in advance.
In fact Autodesk already have a converter & wegbl viewer. Go to http://developer.autodesk.com and get a key for View & Data API. There is a server side REST API that allow you to upload a CAD file and convert to a JSON stream. You can hook to it and get the output. Or, even easier, just use the JavaScript client side API to embed the viewer on your website/app
Update
The API was renamed to Model Derivative + Viewer, the first translates the source file (e.g. DWG, RVT and many others) to a web-friendly format that can be viewed on the second, which is based on Three.js (and can be customized).