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

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.

Related

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

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.

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

How to Set Home View in BIM 360?

Is there a way to set BIM 360 3D views to all have the same home view? I tried setting it up inside Revit, and it works for my views when I open in Revit. But once I publish it and upload to BIM 360 it starts to create its own random home views. I've even tried to set the home views in BIM 360 itself with no luck. Would this be something I would have to fix using FORGE?
Someone from AutoDesk was able to help me with this issue. What you're supposed to do is press "Save View in the view cube" to set the home view when uploading to BIM 360
View Cube
Forge Viewer home views are copied from the CAD file definition, when using the Forge Viewer, you can change this Home View position by code. Unfortunately, when running in BIM360, you cannot inject your code like you would do with the Forge Viewer, so your only option is to get the Home View right in the CAD file.
you can use var a = viewer.getState({viewport}) to store viewport then use viewer.restorestate(a) apply when document loaded.

Custom texture autodesk forge

Is it possible to show custom textures applied to materials in Revit using the forge viewer?
Thanks for your help in advance.
My understanding is that you want to use custom JavaScript to modify textures of the model after having translated it. If this is the case here is an example on how you can modify textures in the viewer: Viewing.Extension.Material
You can test the live version using a revit model here. Click the + from lower-right control and select "Office" for example.

Viewer Materials (wrong conversion from Revit shaded view)

I'm working on a Revit Mechanical Model (Duct, Pipes and Cable Trays).
I setup a Shaded view in Revit with a custom color scheme (organized applying different material to each System Type). The graphics is clean and works.
When we translate the Model to the Forge platform, the result is a wrong color scheme in the Viewer. It looks like the fittings got wrong material after model translation.
In this picture you can see:
- on the left, the Revit Model view (shaded style),
- on the right, the Forge Viewer with wrong colors.
We tried with different models but the problem is always the same. is this a bug? anyone got this kind of issue?