You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

能否在Forge Viewer中获取BIM360 Model Coordination的模型变换参数?

BIM360 Model Coordination变换参数获取说明

使用AggregatedView方法加载模型时,可以直接在Forge Viewer中获取到BIM360 Model Coordination里设置的transform变换参数,具体说明如下:

  • 参数存储位置:所有通过AggregatedView加载的BIM360协调模型,其重定位变换参数会直接内置到对应的模型实例对象中,无需调用额外接口拉取。
  • 获取代码示例:
// 监听AggregatedView加载完成事件
viewer.addEventListener(Autodesk.Viewing.AGGREGATE_VIEW_READY_EVENT, () => {
    // 遍历所有已加载的模型实例
    const allModels = viewer.getAllModels();
    allModels.forEach(model => {
        // 获取模型的4x4变换矩阵,即为Model Coordination中配置的transform参数
        const coordinationTransform = model.getPlacementTransform();
        // 可直接打印或使用该矩阵
        console.log(coordinationTransform);
    })
})
  • 参数说明:返回的coordinationTransform是标准4x4齐次变换矩阵,包含了模型的平移、旋转、缩放三类变换信息,可直接用于坐标转换、模型二次定位等开发场景。
  • 注意事项:请确保你的Forge Viewer版本在v7.40及以上,低于该版本的Viewer原生不支持同步BIM360 Model Coordination的变换参数,需要手动升级Viewer版本才能正常获取。

内容的提问来源于stack exchange,提问作者Nic Maes

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.09.28 13:09:01