【问题标题】:Autodesk Forge Viewer : Room volumes not visible when using SVF2Autodesk Forge Viewer:使用 SVF2 时房间体积不可见
【发布时间】:2021-09-18 08:50:00
【问题描述】:

当我尝试在查看器中为 SVF2 转换的 BIM 模型加载 SVF2 环境时,房间没有出现。

SVF 2 图片:SVF2 Viewer with rooms unhidden SVF 图片:Viewer that has room volumes

应用了 skipHiddenFragments:False : SVF2 With Fragment Override

【问题讨论】:

    标签: autodesk-viewer


    【解决方案1】:

    有几个原因可能会导致此行为。

    1. 对于 Revit,只有主视图具有房间几何图形,因此您需要在 Forge Viewer 中加载主视图才能查看房间。
    // Method 1
    bubbleNode.getDefaultGeometry(true); //!<<< get first master view
    // ref: https://github.com/Autodesk-Forge/forge-dataviz-iot-react-components/blob/main/client/components/Viewer.jsx#L156
    
    // Method 2
    const root = viewerDocument.getRoot();
    const viewables = root.search({'type':'geometry', 'role': '3d'});
    console.log('Viewables:', viewables);
    const phaseViews = viewables.filter(v => v.data.name === v.data.phaseNames && v.getViewableRootPath().includes('08f99ae5-b8be-4f8d-881b-128675723c10'));
    console.log('Master Views:', phaseViews);
    
    1. 在查看器 v7.52 之前,使用 Forge 查看器加载 SVF2 视图时,房间默认隐藏。要使房间可见,您需要将 skipHiddenFragments: false 设置为 viewer.loadDocumentNode
    await this.viewer.loadDocumentNode(
        doc,
        masterViewBubble,
        {
            skipHiddenFragments: false
        }
    );
    

    9 月 17 日更新:使用 v7.52 及更高版本,我们只需要确保加载主视图气泡即可查看 Revit 的房间。

    await this.viewer.loadDocumentNode(
        doc,
        masterViewBubble
    );
    

    参考:https://github.com/Autodesk-Forge/forge-bim360-assets.viewer#troubleshooting

    1. Revit Area and Volume Computations 不是Areas and Volumeshttps://stackoverflow.com/a/67775385/7745569

    【讨论】:

    • 感谢 Eason Kang 的回复,但我应该补充一点,当使用 SVF 环境加载相同的模型和代码时,工作正常并且可以看到房间体积。在 SVF2 环境中,房间被加载到查看器中,并且可以在模型浏览器中被视为未隐藏。这可能是导致此问题的第三个解决方案,但仍然对为什么它会在 SVF 环境中工作感到困惑。我已经编辑了原始帖子,以获得我想说的图像
    • @jash,skipHiddenFragments 对于 SVF 默认值为 false,但对于 SVF2,此值为 true。因此,使用 SVF2 查看时需要将skipHiddenFragments 设置为 false。
    • 再次感谢快速响应,但我确实尝试过,但仍然没有运气。我们可以看到模型名称被覆盖并且我没有收到任何错误,所以我假设将 skipHiddenFragments 设置为 false 也有效,但我仍然看不到房间体积......我附上了一张截图,上面有名为“SVF2 With”的原始帖子片段覆盖”。谢谢
    • 您能否考虑向forge[DOT]help[AT]autodesk[DOT]com 提供一个展示此问题的非机密可重现模型?需要从我们这边调查模型和测试,看看发生了什么。否则,我的想法就用完了……
    猜你喜欢
    • 2021-05-27
    • 2021-02-10
    • 2021-04-17
    • 2020-05-06
    • 2021-01-23
    • 2021-05-13
    • 2019-01-21
    • 2020-05-15
    • 2020-09-25
    相关资源
    最近更新 更多