Can't make elements visible in Autodesk viewer when isolating fittings elements - autodesk-forge

[enter image description here](https://i.stack.imgur.com/I5Fye.png)
When we open a 3D view and proceed to isolate some elements that are attached from each other (for example and assembly), the viewer proceeds to make a zoom extent and isolate the parts. As you can see in the clips attached, the fitting elements disappear from the viewer.
We are using the latest version (7.82) of autodesk viewer and we have found out that in previous versions (7.80) the fittings are showing properly.
We noticed that is working properly in previous versions and maybe, this is an issue corresponding to the latest version updates

Related

Controlling the autodesk-forge viewer with external buttons

Currently I am adding forge to an internal company website where we can view all of the machines we have built or are building. The website works like this: The user selects a machine number and all the information about the machine will pop up. This includes stations within the machine, as well as all the individual parts within each station. My task was to add autodesk-forge to the website. Currently I have successfully used the autodesk-forge viewer so that whenever a machine is picked, the user can press a button, and the model of the entire machine will pop up to be viewed. The next step is to have the viewer be controlled by external buttons on the website. We want it to work as such:
A machine is picked by the user. After this all the information such as stations, and parts within each station in the machine will pop up (this is completed).
The user clicks a "view model" button which will use the forge viewer to make the machine pop up on the website (This has been completed by me).
Once the forge viewer with the model is on the screen, we want the viewer to be able to be controlled by external buttons already on the site.
For example, if there is a machine with name MC-000, and in that machine there is a station named ST010, within that station there are many parts, for example a gear. When the machine MC-000 is being viewed by the user, we want to be able to click an external button which is already made (for example ST010) and the viewer will automatically zoom in and highlight that station within the machine. We also want the same for parts within the machine. When a machine is picked, its stations, as well as the parts within the stations are already printed out within our website. We now want to be able to click the stations, or parts and have the viewer automatically zoom into that part# or station#. I have found a similar code sample here. In this example, parts of the viewer are controlled by buttons not within the viewer. For example, when the 'engine' button is clicked, the viewer will automatically zoom into the engine. The problem with this example, is that all of the positions are hard-coded into the code, meaning that the position of the engine is already within the code. I cannot do this as we have many different machines with thousands of parts, so it would be impossible for me to hard-code them all in. Is something like this possible to do with autodesk-forge viewer. Any help or guidance would be greatly appreciated. Cheers!
EDIT**
Any guidance at all on how I can change where the viewer zooms into would be much appreciated and would help a lot. Currently, I have methods go get both the dbid, and the external objectId from the GET :urn/metadata/:guid http request. Thanks again!
It seems you do have the specified engine dbid and you have a way to link viewer functions with your outside code. The default doubleclick behaviour of the viewer is to select the item the mousepointer collides with. The camera then zooms in (or out) to that item to fit it into the view.
You can use:
select
And
fitToView
To achieve a simular interaction.
For example in Typescript:
// Your dbid is for example 1234
this.viewer.select(1234);
this.viewer.fitToView([1234]);
viewer.select(dbid);
viewer.utilities.fitToView();
Example: https://github.com/Autodesk-Forge/forge-extensions/tree/master/public/extensions/IconMarkupExtension

Selected elements in Forge Viewer are incorrectly displayed in 2D views on mobile/tablet

Found some strange behavior when selecting elements in 2d views/sheets on iPad/iPhone.
Selected elements are not shown / only partly shown
Selected elements are incorrectly shown (wrong position)
Selecting elements leads to different element being selected. (When selecting a e.g a Wall, a completely different Wall is highlighted - could also be due to 2.)
Example 1:
In both images, the same element(slab) is selected, on iPad (top), a completely different area is marked in the viewer. On PC (bottom), the correct Element is highlighted in the viewer. (images here are blurred due to client's copyright). DbId is the same!
Example 2:
Here, another element is selected on iPad(top) and PC(bottom) in a different model. The top image shows the ipad screen after selecting the element. As a result, the element is highlighted in the list on the right side. However, the element is not highlighted in the viewer. On PC(bottom), everything works as expected and the element is highlighted.
In both examples, model and view as well as dbId of selection in the viewer are the same, respectively.
Problem occurred on Safari and Chrome, on iPad(iOS 12 and iPadOS 13) and iPhone(iOS 13).
Forge Viewer Events triggered because of selecting elements are the same on iPad and PC.
When simulating iPad on PC with Chrome (+touch events), the problem does NOT exist.
Both examples are Revit Models, with multiple 3d and 2d views published.
Anyone else has this problem as well?
Any idea how to fix this? Or is this a viewer bug?
Thanks for helping out :)

Forge Viewer show UI while adding Markups

I'm working with the MarkupsCore extension and want to keep my added UI open inside the viewer while adding or working with Markups.
From what I can tell once I call enterEditMode the UI won't return until I hide all of my Markups. The buttons I have added don't seem to change state and their still marked as visible when I'm debugging, yet they don't show.
I tried setVisibility on the objects but the method returns false because it evaluates the buttons as not hidden.
Is there something I'm missing?
If I'm understanding your question right, that's expected as you cannot move/rotate/zoom the model when editing the Markups, mainly because these are SVG shapes on top of the view. Ideally you should also keep the Viewer state to restore when viewing the markups later.

chrome://tracing - Tracing paint operations in Chrome

I came across this short video about Tracing paint operations in Chrome Canary
I have tried all the options and I can't get to these brilliant features.
1. Paints (snapshots):
2. Layers view:
The video is 1 year old now (it is from April 2013).
Are these features still available?
If yes, how to get to them?
I was able to show layers and snapshots using the following settings. Note that on the left pane the fully set of options is not visible in the screenshot, however the only item that is checked on the left pane is 'gpu'. All options on the right pane are visible. A smaller number of settings is likely possible:
Here's a snapshot of what I see. Note that the snapshot includes a full rendering of the webpage:
My Chrome version is 36.0.1985.125 (Official Build 283153)

Gmaps4rails map showing broken controls

I followed the apneadiving / Google-Maps-for-Rails instructions to add a Google Map to my Rails 4 Bootstrap project. I first created an empty scaffold project just like in the tutorial video and everything worked great. Then I added a Google Map to my Bootstrap project and the controls on the map are rendered incorrectly. I can still zoom in and out but I have to guess where to click as the zoom controls are all messed up and in an incorrect place.
Also, I noticed every time I refresh the page the marker shows up in a slightly different place (by a few houses - sometimes on the next street over).
For the css issue, its due to bootstrap, check the wiki: https://github.com/apneadiving/Google-Maps-for-Rails/wiki/Twitter-bootstrap-%26-Foundation
For the jumping markers, use version 2.1.2