autodesk-viewer

Completely unload and reload forge viewer

安稳与你 提交于 2019-12-01 11:38:47
I'm using the Forge Viewer on an Angular 5 application. Is there a way to completely unload the viewer so it can later be reloaded? I have the following code to unload the viewer: if (this.viewer && this.viewer.running) { this.viewer.tearDown(); this.viewer.finish(); this.viewer = null; } And I also have the code to load the viewer every time the user enters the page. Currently, when a user navigates to a different page on the application, that code gets executed, but when the user comes back to the page that contains the viewer, it shows a grey box where the viewer should be. Here's a github

Completely unload and reload forge viewer

非 Y 不嫁゛ 提交于 2019-12-01 08:54:47
问题 I'm using the Forge Viewer on an Angular 5 application. Is there a way to completely unload the viewer so it can later be reloaded? I have the following code to unload the viewer: if (this.viewer && this.viewer.running) { this.viewer.tearDown(); this.viewer.finish(); this.viewer = null; } And I also have the code to load the viewer every time the user enters the page. Currently, when a user navigates to a different page on the application, that code gets executed, but when the user comes back

Creating a viewer application with an URN from Autodesk A360

对着背影说爱祢 提交于 2019-12-01 00:56:02
I have created a viewer application which uses 2-legged authentication and displays the project that has been uploaded to my own bucket. Now instead of viewing the project in my own bucket, I would like to be able to view a project that has been already uploaded to Autodesk A360. For that I have completed the following steps: Implemented the 3-legged authentication (A360 account with the project and the account that is being authenticated are the same). Accessed the hub, project and the file, as described in https://developer.autodesk.com/en/docs/data/v2/tutorials/download-file/ . Instead of

Creating a viewer application with an URN from Autodesk A360

泪湿孤枕 提交于 2019-11-30 19:12:58
问题 I have created a viewer application which uses 2-legged authentication and displays the project that has been uploaded to my own bucket. Now instead of viewing the project in my own bucket, I would like to be able to view a project that has been already uploaded to Autodesk A360. For that I have completed the following steps: Implemented the 3-legged authentication (A360 account with the project and the account that is being authenticated are the same). Accessed the hub, project and the file,

Get THREE.Mesh elements in Autodesk Forge Viewer

亡梦爱人 提交于 2019-11-30 09:50:19
问题 I would like to get the THREE.Mesh object of an element in Autodesk Forge Viewer. Here is the code: var dbId; // geometry node Id of an element var viewer; // GuiViewer3D var mesh = viewer.impl.getRenderProxy(viewer.model, dbId); The return mesh object is a THREE.Mesh object but with null Geometry and Material, so it is useless. How can I get the real THREE.Mesh object? Thank you. 回答1: It depends what you want to do with the mesh: if you want to change the render style, you need to get the

Get THREE.Mesh elements in Autodesk Forge Viewer

亡梦爱人 提交于 2019-11-29 16:43:48
I would like to get the THREE.Mesh object of an element in Autodesk Forge Viewer. Here is the code: var dbId; // geometry node Id of an element var viewer; // GuiViewer3D var mesh = viewer.impl.getRenderProxy(viewer.model, dbId); The return mesh object is a THREE.Mesh object but with null Geometry and Material, so it is useless. How can I get the real THREE.Mesh object? Thank you. Philippe It depends what you want to do with the mesh: if you want to change the render style, you need to get the renderProxy, if you want to transform the component position or rotation, you need to get the

Aligning Coordinate Systems in Autodesk Forge Viewer

扶醉桌前 提交于 2019-11-28 14:18:53
I would like to display some reference lines in the viewer that are not shown by default when a drawing is uploaded to Forge. I know the exact end points of the lines as they were defined in the model, however, it seems that the model in the viewer is translated so that 0,0 is in the center of the bounds. Is there a way to get the transformation matrix that was applied to the model, so I can align the coordinates of my reference lines with the coordinates of the model in the viewer? Use viewer.model.getData().globalOffset 来源: https://stackoverflow.com/questions/42148538/aligning-coordinate

Aligning Coordinate Systems in Autodesk Forge Viewer

独自空忆成欢 提交于 2019-11-27 08:15:43
问题 I would like to display some reference lines in the viewer that are not shown by default when a drawing is uploaded to Forge. I know the exact end points of the lines as they were defined in the model, however, it seems that the model in the viewer is translated so that 0,0 is in the center of the bounds. Is there a way to get the transformation matrix that was applied to the model, so I can align the coordinates of my reference lines with the coordinates of the model in the viewer? 回答1: Use