Autodesk Forge Viewer don't automatically align the model to the center of the viewer - autodesk-forge

I have an IFC file, with the model component located quite far from the origin (Due to using the correct actual coordinates of the project). After uploaded and translated to Forge, the viewer does not display properly at the location where the model is located. While the url thumbnail still shows the model fit to view. I attach 2 image as follow. Please help how to fix this.
Thumbnail when translation finished:
[1]: https://i.stack.imgur.com/lQTLR.png
Viewer result:
[2]: https://i.stack.imgur.com/hiqS5.png

Forge is usually able to handle BIM models "far away from the origin" quite well. I'd try the following:
check if this isn't just some strange camera preset; when the model is loaded, try double-clicking somewhere on the empty space; this should transition the camera so that it's covering the bounding box of the entire model
alternatively, open the Model Browser panel, and select one of the nodes in the tree to move the camera to it
the Forge Model Derivative service allows you to switch between different loaders when processing an IFC file (go to https://forge.autodesk.com/en/docs/model-derivative/v2/reference/http/job-POST > "Attributes by Output Type" > "SVF Output", and search for conversionMethod in the advanced properties); give it a try and see if you get better results
And finally, if none of the above helps, consider sharing your IFC design with us (confidentially; we will not share the design with anyone outside of Autodesk) via forge (dot) help (at) autodesk (dot) com so that we could debug the issue on our end.

Related

Forge viewer does not respect the up direction of some Inventor models

We are having an issue with some Inventor models, where the orientation and up direction in the forge viewer does not match the home view within Inventor.
This screenshot is of a sample model in Inventor (home view):
cylinder pointing upwards
This screenshot shows how it is displayed in the viewer:
cylinder on it's side
We are creating the svf file directly from Inventor design automation, in exactly the same way as the forge configurator sample https://github.com/Autodesk-Forge/forge-configurator-inventor
Is there anything that we need to do explicitly to have the viewer use the home view and up direction from the Inventor model?
I think I have now found the answer to my own question!
In the svf exporter I had turned off the option to export file properties:
oOptions.set_Value("ExportFileProperties", false);
Thinking that this would just eliminate the part properties, but it seems like it must remove the up direction and home view also.

Revit decals on Forge Viewer

I've got a Revit model with decals applied on some surfaces. I uploaded the rvt model on Forge and translated using SVF2 format, but when I see the viewer no images are rendered on the decals, even if the objects are translated (I can see them on the ModelBrowser). Decals appear as green border rectangles, fully transparent:
Is it possible to view decal native images on Forge?
How can I integrate the images source file in the translation and make them visible in the Viewer?
Thanks
Unfortunately, Decals on Revit are not supported as of today. It’s logged as RVTLMV-509. In the meantime, you can still apply decals using that technique.

Mirrored model has its materials flipped inside out when viewed in Autodesk Forge Viewer

Description
Mirrored model has its materials flipped inside out when viewed in Autodesk Forge Viewer.
Adding a section plane reverts the mirrored model back to what it should look like.
We are using this sample viewer from Autodesk.
This weird behavior does not occur when looking at the model in BIM 360 Docs.
We've included screenshots and steps to reproduce this here.
EDIT: while writing this post, we came across Problems with forceDoubleSided setting. Has this been fixed?
Thanks.
Simply loading the 'Autodesk.AEC.LevelsExtension' might fix the problem.
See https://forge.autodesk.com/blog/bim-360-viewer-vs-forge-viewer

Autodesk Forge Viewer - show markups all the time

We are using the Forge viewer to show both 2D and 3D models. For the 2D models, we would like to be able to show markups all the time, like you can with the viewer inside BIM360.
I tried the solution mentioned here: Forge Viewer: Show bottom toolbar and markups at the same time - but I have not been able to get that to work. It seems like when I call:
Autodesk.Viewing.Extensions.Markups.Core.Utils.showLmvToolsAndPanels(viewer)
It hides the markups.
How is this done in BIM360? - are they using a custom viewer, where this has been enabled somehow?
Unfortunately I was able to get it to work with:
Autodesk.Viewing.Extensions.Markups.Core.Utils.showLmvToolsAndPanels(viewer)
See live sample here:

Autodesk Forge - Initial focus on 3d view

our initial focus within our 3d views needs tweaking. Currently it is zoomed out ~x2 too far.
Can anyone get me started in the right direction for the controls for this?
I've tried changing the cropregion/ section box etc in the original revit model, but that hasn't made a difference.
A simple way to handle that would be to position the camera as you wish then save the current state and restore it upon loading the model, see my blog post about managing viewer states: Managing viewer states from the API