Reputation: 638
Below are the various transforms I have found so far using NOP_VIEWER.model.getData()
.
I'm using the transforms to bring a position into viewer space, and I haven't been able to find any good documentation describing what they all do. My hope here is that this question can help by providing some documentation of the role of these transforms and how/when to use them.
The model originally comes from Revit.
Also, there are some transforms in the NOP_VIEWER.model.getData().metadata
. These may be Revit specific:
[-17746143.211481072, -6429345.318822183, 27.360225423452952]
refPointTransform
matrix aboveCan someone help by documenting what these transforms do?
Related: Place a custom object into viewer space using GPS coords
Upvotes: 0
Views: 637
Reputation: 8604
As an alternative solution, the Viewer works with extensions. The Autodesk.Geolocation
extension provides a few methods to handle the data structure you mentioned:
Load extension:
let geoExt;
NOP_VIEWER.loadExtension('Autodesk.Geolocation').then((e) => {geoExt = e});
Or get already loaded extension:
let geoExt = NOP_VIEWER.getLoadedExtensions()['Autodesk.Geolocation']
Then use the methods to convert the coordinates
geoExt.lmvToLonLat
geoExt.lonLatToLmv
Here is a quick article on it.
You may .activate()
the extension to see additional information on the model geo location.
Upvotes: 2