autodesk-forge

Autodesk Forge Viewer - Getting different values dbId from “viewer.model.search” and “viewer.getSelection()”

萝らか妹 提交于 2019-12-24 08:09:25
问题 I'm trying to isolate some elements that I search with the method viewer.model.search but when I use the viewer.isolate method I get everything to hide. I already use the getSelection to isolate elements and I notice that they give me different dbId values for the same element. With getSelection dbId works but with the search doesn't Does that anyone have this same error? UPDATE 3/11/2019: While I was trying to figure out what happened, I realized that the search method gives you the number

how to calculate area and volume using svf file in forge viewer

最后都变了- 提交于 2019-12-24 07:28:36
问题 I need to calculate volume and area of surfaces of 3D file. Since forge api can convert all kinds of 3D file to svf format, so If I can calculate area and volume from svf format file , then my program can handle all format 3D file that forge api support. But forge viewer doesn't have the api to calculate area and volume. Because forge viewer is based on THREE.js, so I guess if I can use THREE.js's api to calculate volume and area. I read the api of forge viewer, but there is no api to get

Finding the centre point of the visible parts in the Autodesk Viewer

你说的曾经没有我的故事 提交于 2019-12-24 00:21:52
问题 Excuse the vagueness of this question, but in a model in the viewer, I'd like to know how I can establish the centre point of the visible parts. When I call fit-to-view on a model with hidden parts, I can see a dot appear in the viewer which seems to represent exactly this - the centre of the visible parts - how can I retrieve the coordinates of this point in code? 回答1: The little green dot represents the "target" of the camera. You can get its coordinates using viewer.navigation.getTarget()

JS error on Chrome (with Device Toolbar enable)

让人想犯罪 __ 提交于 2019-12-23 05:34:18
问题 When I turn on the tablet mode or the phone mode in Chrome, I get a javascript error : Uncaught TypeError: Failed to execute 'elementFromPoint' on 'Document': The provided double value is non-finite. at HTMLHtmlElement.avp.disableTouchSafari (viewer3D.min.js:18) I've just update Chrome to the last version. Any idea? 回答1: This might an issue of Forge Viewer. Apologizing for any inconvenience caused. I have logged a request LMV-3401 [Autodesk.Viewing.Private.disableTouchSafari() reports error

Upload linked Revit models for Forge Viewer

旧街凉风 提交于 2019-12-23 05:32:48
问题 How can I upload a Revit model that contains multiple Revit files, where one of them is a main file and the remaining are linked files into Forge Viewer? I've uploaded separately and they show as different files in the bucket and the viewer. Can we have one combined file to be viewed in the Forge Viewer? 回答1: A ZIP file can help you do such thing. You can pack them in a single .zip file, then upload it to Forge Data Management Service. While submitting a translation job to the Forge Model

How to resize on object - Autodesk Forge Viewer

会有一股神秘感。 提交于 2019-12-23 02:44:12
问题 How can i change size of on object ?? i need to change height of on object For example, we need to change the height of a door or curtain on this code my object disappears let change = function () { const viewer = oViewer; const model = viewer.model; const frags = [ 123, 361, ]; for(let i in frags){ let fragId = frags[i]; // Get mesh with frag id let mesh = viewer.impl.getRenderProxy(model, fragId); // Selection ID let dbId = 1280; // viewer.getSelection()[0] model.getData().instanceTree

How to Show/View or Read .dwg files on browser

本秂侑毒 提交于 2019-12-21 03:18:22
问题 How to Show or Read .dwg files on browser without using any software means using PHP, jQuery, Javascript or any other programming language. For this I have gone through https://developer.autodesk.com and created an app with Client ID and Client Secret, Also created index.html file. But after that i get stuck in finding next movement for getting required "Model Derivative API". So Please guide me for the same. Thanks for giving your precious response. <!-- The Viewer CSS --> <link rel=

Forge Viewer Select in a multi-model context

倖福魔咒の 提交于 2019-12-20 06:24:18
问题 We have extensions that currently leverage viewer.select() with a list of dbIds from the model. Our customers would like to see secondary models in the same viewer, and we’re giving them the ability to load reference models after the first model has been loaded. We’re running into a problem with multiple models, however, where the viewer is selecting from one of the models other than the first model loaded when we call viewer.select(). It seems like we may want to stop using viewer.select()

Forge Viewer THREE.MeshLambertMaterial

半世苍凉 提交于 2019-12-20 06:00:17
问题 One of the properties available on the var material = NEW THREE.MeshLambertMaterial is texture maps: {( map: new THREE.TextureLoader().load('wool.jpg') )} We're very curious whether it would be possible to load in a texture this way and apply it to a specific object in the model? 回答1: Yes, but the way you modify materials in the Forge Viewer is a little bit different than what you would do in Three.js. I have an extensive sample that illustrates how to modify materials, including custom

Decals not displaying in Autodesk Viewer

痴心易碎 提交于 2019-12-20 05:43:16
问题 When using the Autodesk Viewer, decals do not seem to display as expected. The image above has the decal displaying correctly (not rendered in Autodesk Viewer), and the image below has no decal (rendered in Autodesk viewer). Why is this so, and how can decals be made to work in Autodesk Viewer? Source files here. 回答1: Here is my code sample. I imported the STEP file on Forge, and copied the RefdFile_1.png file on my node.js server. var attenuationVertexShader =` varying vec2 vUv; varying vec3