【问题标题】:Forge Viewer loading multiple Revit models with shared coordinatesForge Viewer 加载具有共享坐标的多个 Revit 模型
【发布时间】:2019-11-24 20:03:33
【问题描述】:

加载通过共享坐标对齐的 Revit 模型时,模型不会在 Forge Viewer 中使用 globallOffset 设置对齐。

带有placementTransform 选项的loadModel 似乎是可行的,但共享坐标数据要等到通过viewer.model.getDocumentNode().getAecModelData().refPointTransformation 加载模型后才能使用

我最早的模型数据位于 onLoadModelSuccess 中,这为时已晚,无法输入加载选项,并且需要转换几何形状。

var modelOptions = {
  sharedPropertyDbPath: doc.getPropertyDbPath(),
  globalOffset: offset,
  placementTranform: ???,
  isAEC: true
};

viewer.loadModel(svfUrl, modelOptions, onLoadModelSuccess, onLoadModelError);

否则如何对齐模型?或者可能在不先渲染几何图形的情况下加载模型以获取数据,然后将变换矩阵输入另一个 loadModel 调用?

【问题讨论】:

    标签: autodesk-forge autodesk-viewer revit


    【解决方案1】:

    结合使用以下两个选项来应用 Revit 共享坐标:

    • globalOffset - 告诉 LMV 不要自动居中模型
    • applyRefPoint - 告诉 LMV 如何为 Revit 文件应用任何 svf 定位元数据

    因此,请在您的加载选项中尝试以下操作:

    var modelOptions = {
      sharedPropertyDbPath: doc.getPropertyDbPath(),
      globalOffset: offset,
      applyRefPoint: true,
      isAEC: true
    };
    

    查看此实时示例here 以获取有关placementTranform 选项的使用参考。

    【讨论】:

      猜你喜欢
      • 2022-01-02
      • 2021-06-27
      • 2023-03-03
      • 2021-10-16
      • 2020-01-06
      • 2020-11-24
      • 2021-09-08
      • 2021-08-09
      • 2017-01-07
      相关资源
      最近更新 更多