Autodesk forge viewer load multiple gltf problems - autodesk-forge

I'm thinking of adding one gltf to the model object, how important are we to use this object, like how to add one of my clons to the scene, I've tried it, it's impossible to work normally, because the id is double Of course, there are other errors, and we will solve this problem.

Related

Exporting single OBJ out of multiple model URNs

I have implemented multiple models viewer using Autodesk forge. We are trying to achieve a functionality where users could select entities from different models from multi-model viewer and export a single obj file out of it.
but it seems, Translate a Source File API allows just a single model URN to be passed.
I'm looking for a way where I could create a single Obj from more than one model URN.
I think there is not built-in way to do that actually.
If you are working with NodeJS you can use glTF file format and follow this method :
Convert your different models with Forge-Convert-Utils
Merge with glTF-Transform following this answer : Multiple gltf loading and merging on server side
glTF is well supported now on many platforms and pretty efficient but if you really need OBJ you can use assimpJS (which is the JS port of assimp) to convert your files.

Make and save change into Forge Autodesk Viewer

I need to view files with the autodesk viewer and make and save the changes. I wonder if it is possible to do it directly through the Forge API I thought to apply, once the waterfall viewer is loaded, all the preloaded changes in an internal database
The changes I would like to make are of the type:
adding a room,
addition of mesh
addition of successively recoverable properties
addition of other 3D models preloaded in forge
Since all property data and the SVF itself (or any derivatives for that matter) is immutable once extracted so I am afraid you'd need to programmatically append the mesh (try SceneBuilder to make things easier) every time the model is loaded ... As for the properties it's possible to use your own data source for persistence though - see a case in point here and here
To persist any change to the original design file would require translating the model again for Viewer to consume the changes - however this process can be automated using our Design Automation service and Webhooks ... see here to get started.
One possible workaround to persist your custom geometry would be to convert your geometry to OBJ and then SVF with the Model Derivative service (for course that'd incur costs ...) and then load it to Viewer and aggregate with the original model...

Duplicate object in SVF converted from linked revit

I am trying to convert a SVF using linked Revit files. I uploaded a zip to model derivative API which contains all the Revit files.
After conversion, the revit files are combined into one single SVF, but I discovered that at least some of the objects might be duplicated in a weird way.
For example, I have an object which have an unique attribute defined. When I select that object, I can see its position inside the model browser, as well as its properties. (Screenshot 1)
When I try to search in the whole model using that unique attribute, I discovered that another object has the same attribute and properties. When I try to select it using its dbId, I found that the object is invisible in the model, and it does not show where does it belong inside the model browser. (Screenshot 2)
Any idea why is there a duplicated object inside the SVF? Thanks.

Missing elements in autodesk forge

I'm playing around with coordinates in autodesk forge and by some chance i noticed that some of the element(door in my case) doesn't have an fragment id. I've tried to use selection and fittoview to try and display which is the problematic element and to my surprise the element doesnt even exist in the viewer (I still managed to use getProperties to show all the properties though).
Is this because of some bug occurred during the conversion from revit to forge or is it because of an error in my programming?
It seems to be expected that small objects get lost in Revit export processes, cf.:
Model objects missing in custom exporter context
Small objects missing in DWG export
How large is your missing door? How large is the model?

Blender export to three.js JSON only processing one geometry object

I'm pretty new to three.js so bear with me!
I'm a seasoned user of Blender and have looking for the best way to export to a three.js importer.
So far, the most successful has been the obj importer, although I would love to include animations. With this in mind, I have tried the Collada dae importer (a bit hit and miss) and am now on the JSON route.
I have successfully (I hope) added the JSON export addon into Blender (2.74) which does now export JSON files. These work OK when imported into three.js, but for some reason, it is only exporting one object when I have several in the scene. I have also checked the JSON file and there is only one set of vertices.
I have read on older posts that it has something to do with parenting, but I can't export the scene as it breaks when imported for some reason.
The reason I want multiple objects is because I want to animate various objects within a scene using keyframes. Sounds easy? Not so much.
Are there any specific limitations of bone-based (on armatures) animations. I have a feeling it may have something to do with the object parenting to the bones?
My error could be in the JSON importer in the three.js file...
The documentation on this is a bit limited so any advice would be welcome.