【问题标题】:Missing rooms issue with generatedMasterView and room material replacement using three.js生成的MasterView 缺少房间问题和使用three.js 替换房间材料
【发布时间】:2020-10-19 11:28:47
【问题描述】:

第一个问题:缺少房间模型

我使用 Forge 的模型衍生 api 和 generateMasterViews 参数从云 Revit 模型 (BIM360Team) 中提取房间节点,它对于某些模型工作得很好,但我遇到了其他模型缺少房间的问题。

Successful translated model

一些翻译模型的房间节点丢失了,这很奇怪,因为它们的高度和相位相同,并且显示了 2d 视图中的房间。

2D views has no problem at all

3D room nodes in the same floor were missing

所以我的问题是,它们在提取房间几何图形并转换为 .svf 文件方面是否存在一些限制?例如发布视图设置/视图范围/裁剪视图/裁剪区域?还是我的请求中缺少的东西?我尝试对齐所有参数或删除某些组件(例如家具),但结果仍然相同。如果你们之前注意到这个问题,请帮助,我们将不胜感激。

第二个问题:房间网格和材料

我已经编写了一个函数来突出显示选定的元素,并且它几乎适用于除房间元素之外的所有节点。

const highLightElement = (dbId, hexColor) => {
        const myMaterial = createMaterial(hexColor)

        const instanceTree = viewerApp.model.getInstanceTree()
        const fragList = viewerApp.model.getFragmentList()

        instanceTree.enumNodeFragments(dbId, function(fragId) {
            fragList.setMaterial(fragId, myMaterial)
            const fragProxy = viewerApp.impl.getFragmentProxy(viewerApp.model, fragId)
            fragProxy.scale = new window.THREE.Vector3(scaleRatio, scaleRatio, scaleRatio)
            fragProxy.updateAnimTransform()
        }, true)

        viewerApp.impl.invalidate(true)
    }

房间的材料是阴暗的白色,但如果在上面使用剖面工具,剖面颜色已经变成了我选择的颜色(0xAB00EE - 洋红色)。不知道是房间网和其他的不一样吗?或者可能需要一些特殊程序才能这样做?

Successful coloring nodes

Room nodes coloring

Z-section of colored room nodes

【问题讨论】:

    标签: autodesk-forge autodesk-model-derivative


    【解决方案1】:

    关于问题 #1,可能存在某些限制,阻止 Forge 模型衍生服务提取房间信息,但在 Revit 方面会更多。如果您不介意通过forge (dot) help (at) autodesk (dot) com 与我们(保密)分享 Revit 模型,我们很乐意与工程团队一起调查。在这种情况下,请同时指出缺少哪些房间。

    关于问题 #2,从 Forge Viewer 的角度来看,房间只是场景中的另一个几何体,唯一的区别是该几何体通常是透明的,默认情况下是隐藏的。据我所知,可见性标志不应干扰诸如设置片段材质之类的事情,但请仔细检查这是否真的不是根本原因。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-10-20
      • 1970-01-01
      • 1970-01-01
      • 2012-12-08
      • 2020-12-02
      • 2020-08-14
      • 1970-01-01
      • 2019-02-26
      相关资源
      最近更新 更多