autodesk-forge

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 set independent material for specific dbId

会有一股神秘感。 提交于 2021-01-29 22:44:45
问题 I am setting up material for an element with a particular dbId with the following code. getFragIdListFromGuid is a function I implemented to retrieve fragIdList from certain dbId. But I found this one actually changing all of the fragment material in the scene. Do they share the material together? const fragIdList = await getFragIdListFromDBId(this.dataComponents, this.instanceTree, dbId) fragIdList.forEach((fragId) => { let material = fragList.getMaterial(fragId) if (material) { material

How to set independent material for specific dbId

家住魔仙堡 提交于 2021-01-29 22:43:54
问题 I am setting up material for an element with a particular dbId with the following code. getFragIdListFromGuid is a function I implemented to retrieve fragIdList from certain dbId. But I found this one actually changing all of the fragment material in the scene. Do they share the material together? const fragIdList = await getFragIdListFromDBId(this.dataComponents, this.instanceTree, dbId) fragIdList.forEach((fragId) => { let material = fragList.getMaterial(fragId) if (material) { material

How to set independent material for specific dbId

不羁的心 提交于 2021-01-29 22:38:28
问题 I am setting up material for an element with a particular dbId with the following code. getFragIdListFromGuid is a function I implemented to retrieve fragIdList from certain dbId. But I found this one actually changing all of the fragment material in the scene. Do they share the material together? const fragIdList = await getFragIdListFromDBId(this.dataComponents, this.instanceTree, dbId) fragIdList.forEach((fragId) => { let material = fragList.getMaterial(fragId) if (material) { material

How to set independent material for specific dbId

╄→гoц情女王★ 提交于 2021-01-29 19:51:10
问题 I am setting up material for an element with a particular dbId with the following code. getFragIdListFromGuid is a function I implemented to retrieve fragIdList from certain dbId. But I found this one actually changing all of the fragment material in the scene. Do they share the material together? const fragIdList = await getFragIdListFromDBId(this.dataComponents, this.instanceTree, dbId) fragIdList.forEach((fragId) => { let material = fragList.getMaterial(fragId) if (material) { material

IfcSpace objects doesn't show up in Autodesk Forge Viewer

陌路散爱 提交于 2021-01-29 19:12:46
问题 Forge Viewer doesn't show IfcSpace objects. I checked several IFC files in a few IFC viewer applications and they all show the spaces. I am wondering if such feature is supported in Forge Viewer? If yes, how can I get it to work. Thanks 来源: https://stackoverflow.com/questions/62273342/ifcspace-objects-doesnt-show-up-in-autodesk-forge-viewer

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