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)
I am trying to make sense of how these points inside the model get transformed and translated after upload to Forge platform.
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:
(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. 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).
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?
I'm using Forge Viewer API v6, Model Derivative API v2, and using Node.JS as the server for the Forge Viewer API
If I understood right, it seems that you placed your Revit model using Project Coordinates, but only the project address property is extracted.
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.