了解 Revit 元素上传到 Forge 平台后的坐标系转换和参考 [英] Understanding the coordinate systems transformation and references of Revit elements after upload to Forge platform

查看:34
本文介绍了了解 Revit 元素上传到 Forge 平台后的坐标系转换和参考的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近将 Revit 模型上传到 Forge 平台.该模型定义了一个测量点 (N/S: 0, E/W: 0) 一个 Base Project 点 (N/S: 149443, E/W: 371248, Angle to True North: 41.43°)),还有样板间.样板间包含一个元素,坐标为 (N/S: 149326, E/W: 380492)

I have recently uploaded a Revit model to Forge platform. The model defines a Survey point (N/S: 0, E/W: 0) a Base Project point (N/S: 149443, E/W: 371248, Angle to True North: 41.43°)), and a model room. The model room contains an element with a coordinate (N/S: 149326, E/W: 380492)

我试图弄明白模型中的这些点在上传到 Forge 平台后是如何转换和翻译的.

I am trying to make sense of how these points inside the model get transformed and translated after upload to Forge platform.

我使用这个函数(viewerApp.getCurrentViewer().model.getData().bbox)在Forge Viewer中获取模型的边界框,发现这些:

I used this function (viewerApp.getCurrentViewer().model.getData().bbox) to to obtain the bounding box of the model in Forge Viewer, and found these:

min: (X: 1229.5841064453125, Y: 471.1938171386719, Z: -0.5249344110488892), and

max: (X: 1284.9295654296875, Y: 527.90869140625, Z: 13.123359680175781)

此外,我做了这些初步假设:

Additionally, I made these initial assumptions:

  1. 单位假设:北移 1 点 &Revit 模型中提供的东向坐标直接转换为 X & 中的一个点.Forge Viewer 的 Y.
  2. 起源假设:我假设 Forge Viewer 的起源位于 Viewer API 中的 (0, 0, 0) 点.此外,查看器使用模型的测量点或项目基点作为原点.
  3. Revit 模型的元素将落在 Forge Viewer 模型的边界框内
  1. Unit assumption: 1 point in northing & easting coordinate provided in Revit model translates directly to a point in X & Y of Forge Viewer.
  2. Origin assumption: I assumed that the origin of the Forge Viewer lies in (0, 0, 0) point in the Viewer API. Additionally the viewer uses the model's Survey Point or the Project Base point as the origin.
  3. The element of the Revit model would fall inside the Forge Viewer model's bounding box

然而,边界框的信息(X & Y 范围分别为1229-1284 & 471-527)似乎不包含坐标房间模型内定义的元素,如果它在调查点上(元素的 X & Y149326 & 380492 相对于调查点),或者如果它位于项目基点上(相对于项目基点,元素的 X & Y-117 & 9444 处).

However, the information of the bounding box (with X & Y ranging from 1229-1284 & 471-527 respectively) does not seem to contain the coordinate of the element defined inside the room model if it were on survey point (with the element's X & Y at 149326 & 380492 with respect to survey point), or if it were on project base point (with element's X & Y at -117 & 9444 with respect to project base point).

另外,参考这个问题,可能是模型坐标可能会被以下命令获得的全局偏移量偏移:(viewerApp.getCurrentViewer().model.getData().globalOffset).但是,当我运行此命令时返回 (0, 0, 0) .假设如果偏移在某种程度上是正确的,则北向/东向到 Forge 的 X/Y 的单位缩放似乎与我的假设不同.

Also, referring to this question, it might be that the model coordinate might be offset by a global offset obtainable by this command: (viewerApp.getCurrentViewer().model.getData().globalOffset). However, when I run this command (0, 0, 0) is returned. Suppose if the offset is somehow correct, it seems the unit scaling of Northing/Easting to Forge's X/Y is different than my assumption.

我想问一下我上面的假设有哪一部分是错误的?

I wish to ask which part of the assumptions I made above is faulty?

  • 如果我的单位假设有问题,那么北向/东向单位如何转换为 Forge Viewer 的 X &Y单位?
  • 如果除了第一个假设之外,我的原点假设还有错误,那么 Forge 如何在查看器中设置原点?如果原点基于 Revit 模型,设置的原点是否参考模型的测量点/项目基点?
  • 在模型衍生 API 执行模型转换时,是否对 Revit 模型及其元素进行了任何其他转换?

我使用 Forge Viewer API v6、Model Derivative API v2,并使用 Node.JS 作为 Forge Viewer API 的服务器

I'm using Forge Viewer API v6, Model Derivative API v2, and using Node.JS as the server for the Forge Viewer API

推荐答案

如果我理解正确,您似乎使用项目坐标放置了 Revit 模型,但仅提取了项目地址属性.

If I understood right, it seems that you placed your Revit model using Project Coordinates, but only the project address property is extracted.

正如您在 其他答案 中提到的,模型以原点和 globalOffset 为中心 表示这个值.

As mentioned on the other answer you pointed out, the models are centered around the origin and the globalOffset indicates this value.

您可能需要使用模型的单位调整边界框,我建议您查看这个答案.

You may need to adjust the bounding box with the units of the model, I would suggest checking this answer.

这篇关于了解 Revit 元素上传到 Forge 平台后的坐标系转换和参考的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆