本文介绍了在 Autodesk Forge Viewer 中对齐坐标系的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当绘图上传到 Forge 时,我想在查看器中显示一些默认情况下不显示的参考线.
I would like to display some reference lines in the viewer that are not shown by default when a drawing is uploaded to Forge.
我知道模型中定义的线的确切端点,但是,查看器中的模型似乎已被平移,因此 0,0 位于边界的中心.
I know the exact end points of the lines as they were defined in the model, however, it seems that the model in the viewer is translated so that 0,0 is in the center of the bounds.
有没有办法获得应用于模型的变换矩阵,以便我可以将参考线的坐标与查看器中模型的坐标对齐?
Is there a way to get the transformation matrix that was applied to the model, so I can align the coordinates of my reference lines with the coordinates of the model in the viewer?
推荐答案
使用 viewer.model.getData().globalOffset
这篇关于在 Autodesk Forge Viewer 中对齐坐标系的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!