autodesk-forge

Forge Viewer fails to dispaly PDF's

倾然丶 夕夏残阳落幕 提交于 2019-12-02 05:14:43
I am using the sample C# SDK for using the Forge Derivative service and viewer. I've been successful with using any document but not with PDF. All the PDF's I've tried, translated successfully but it gives the following error when attempting to view. Failed to load resource: the server responded with a status of 404 (Not Found) three.min.css Uncaught TypeError: Cannot read property 'paperUnits' of undefined I just bumped into this myself. Please try with ViewingApplication object for initialization instead of basic viewer. The way shown in Basic Viewer requires additional configuration values

How Autodesk Forge viewer manages multiple scenes to select multiple elements

给你一囗甜甜゛ 提交于 2019-12-02 03:09:23
I want to understand how Autodesk Forge viewer stores node elements in multiple THREE.Scene objects. There are several scenes: viewer.impl.scene // The main scene viewer.impl.overlayScenes // Three overlay scenes: selection, pivot and roll Whenever an element is selected in Forge viewer, its THREE.Mesh object is added to viewer.impl.overlayScenes.selection.scene.children. However its boundary geometry is always zero, unlike primitive THREE.Mesh objects will have boundaries after executing geometry.computeBoundaryBox() Because of the zero boundary of Forge elements, I cannot use THREE.Raycaster

Getting webGL error in autodesk viewer

筅森魡賤 提交于 2019-12-02 02:32:25
I am getting error like: Uncaught TypeError: Cannot read property '__webglFramebuffer' of null when i am going to another page linked with the page which has autodesk viewer attached . I dont know why it is coming . I am using angularjs for my web site and there is no code in controller of that page about viewer. You are getting this error because you do not destroy the viewer instance on the page you left, so when receiving event such as page resize the viewer will try to re-render and since the WebGL context has been destroyed it will fire this error. Simply place some cleanup handler called

Autodesk Forge BIM 360 API - Activating Service Types

空扰寡人 提交于 2019-12-01 12:16:39
问题 We have been using the Forge API to automatically set up projects in BIM 360, but seem unable to find a way to automatically activate a Service (Field, Glue, etc.). Intuitively, I would have thought that the "service_types" attribute would be the way to do this, but the services are not activating. 1) What does the "service_types" attribute actually do? 2) If possible, how do we activate a project Service using the Forge API (Most specifically Field)? Thank you kindly, 回答1: Re. #1 Your

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

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