FrodeTo
FrodeTo

Reputation: 83

Getting real world coordinates from Forge model

Is it possible to get the real world coordinates form the original model in the Forge viewer? It looks like when a model is loaded into the Viewer it is placed with the center of the model in the origin of the Viewer.

Upvotes: 1

Views: 1297

Answers (2)

Felipe
Felipe

Reputation: 4375

viewer.model.getData().globalOffset is what you are looking for: Aligning Coordinate Systems in Autodesk Forge Viewer

Upvotes: 2

Jeremy Tammik
Jeremy Tammik

Reputation: 8294

Afaik, the Forge viewer centres the model. In other words, the origin of the viewer coordinate system is the centroid of the model. The scale of the model remains unchanged. As a result, you can transform the original model coordinates to Forge viewer and vice versa simply by adding or subtracting the model centroid.

Upvotes: 0

Related Questions