autodesk-viewer

Overlay mesh is transparent for certain material colors in Forge 3D viewer

此生再无相见时 提交于 2021-02-05 08:07:59
问题 I'm trying to add custom geometry to my forge viewer, following this example. It mostly works fine, except when using certain colors. I'm using the following code to add a sphere mesh: const geometry = new THREE.SphereGeometry(0.4, 32, 32) const material = new THREE.MeshBasicMaterial({ color: someColor, transparent: false, }) const sphere = new THREE.Mesh(geometry, material) viewer.overlays.addScene('sphere-mesh-scene') viewer.overlays.addMesh(sphere, 'sphere-mesh-scene') for certain values

Overlay mesh is transparent for certain material colors in Forge 3D viewer

ε祈祈猫儿з 提交于 2021-02-05 08:04:52
问题 I'm trying to add custom geometry to my forge viewer, following this example. It mostly works fine, except when using certain colors. I'm using the following code to add a sphere mesh: const geometry = new THREE.SphereGeometry(0.4, 32, 32) const material = new THREE.MeshBasicMaterial({ color: someColor, transparent: false, }) const sphere = new THREE.Mesh(geometry, material) viewer.overlays.addScene('sphere-mesh-scene') viewer.overlays.addMesh(sphere, 'sphere-mesh-scene') for certain values

How to use Forge Viewer Snapper?

拜拜、爱过 提交于 2021-02-05 07:44:35
问题 I'm trying to use Snapper functionnalities from Forge Viewer in order to ask user to pick a point and then retrieve point world coordinates of selected point. I look at this topic but doesn't work for me : How to activate Autodesk Forge Snapper? I load the extension like that : this.viewer.loadExtension('Autodesk.Snapping'); And then try to use the Snapper like that: console.log(this._viewer.toolController.getActiveToolName()); var snapper = new Autodesk.Viewing.Extensions.Snapping.Snapper

How to use Forge Viewer Snapper?

℡╲_俬逩灬. 提交于 2021-02-05 07:44:31
问题 I'm trying to use Snapper functionnalities from Forge Viewer in order to ask user to pick a point and then retrieve point world coordinates of selected point. I look at this topic but doesn't work for me : How to activate Autodesk Forge Snapper? I load the extension like that : this.viewer.loadExtension('Autodesk.Snapping'); And then try to use the Snapper like that: console.log(this._viewer.toolController.getActiveToolName()); var snapper = new Autodesk.Viewing.Extensions.Snapping.Snapper

How to Enable the MiniMap extension and what is it?

橙三吉。 提交于 2021-01-29 18:45:33
问题 I'm interested to use the minimap extension but i find that there is no documentation. here is the question i want to know: What is the minimap extenstion? what is the requirement to use it? I've tried to load the extension by running viewer v7.1 and its stop by can't get the DocumentNode. var optionObject = { extensions: ['Autodesk.AEC.Minimap3DExtension'] }; var viewer = new Autodesk.Viewing.Private.GuiViewer3D(myViewerDiv, optionObject); NOP_VIEWER.model.getDocumentNode() NOP_VIEWER.model

Is there a specification available for the Autodesk SVF format?

陌路散爱 提交于 2021-01-29 13:20:23
问题 I'm building a cross platform 3D viewing application in C#/C++ and would like to add support for Autodesk SVF files. I looked at Autodesk Forge but it has limited support for exporting to open formats such as OBJ, and Autodesk SVF does not appear to be the same format as the similarly named Simple Vector Format (http://www.svf.org/) as was stated here: https://forge.autodesk.com/blog/updated-little-more-detail-behind-autodesk-forge-apis-0 Is there a schema or specification available somewhere

Create a section plane leaning against one object

邮差的信 提交于 2021-01-29 12:32:48
问题 I need to create a vertical section plane leaning against a selected object. For example selecting an object like this I need to get a section plane leaning against the longest side of the object I'm using the viewer version 7.16 that offers a Section plane option in the right click selection but it works incorrectly. I am using the frags.getWordBounds method to get the box "around" the object and, using a little trigonometry, I have calculated the orientation, but I guess it's not the right

Extract and download model to local machine in OTG format

空扰寡人 提交于 2021-01-29 12:20:56
问题 According to https://github.com/wallabyway/OTG-client-sample, a new OTG format for the forge viewer has been released and it looks like it has siginificant improvement in performance as opposed to the traditional SVF format. Currently,we are using model derivative API to translate RVT/NWD files to SVF and download it to our local machine using the extractor from the following link: https://github.com/cyrillef/extract.autodesk.io The question is that how do I to translate the model into OTG

How to load two forge viewer in same application (Angular Forge Viewer component)

谁说胖子不能爱 提交于 2021-01-29 10:48:20
问题 I am adding two forge viewer in same application but I am using Angular Forge Viewer component. all model loads only in one model. second viewer not working. I think the issue is Angular Forge Viewer component is using same Id. 回答1: Looks like that has to do with the same container being used with a fixed element ID rather than a named ViewChild (see here). You can either modify the library to use named ViewChild or raise an issue on Github for the author to address this (Alan is very active

Webpack and three.js in forge applications

牧云@^-^@ 提交于 2021-01-29 05:46:17
问题 I'm struggling a bit with the new viewer version 7 and the inclusion of three.js. According to https://forge.autodesk.com/blog/webpack-and-threejs-forge-applications it is necessary to define three.js as external. But where exactly do I do that? The viewer is embedded in an Angular environment. 回答1: Don't add THREE as dependency in package.json and use the THREE global loaded by the viewer. If you just need the THREE types: (https://www.npmjs.com/package/@types/forge-viewer) 来源: https:/