dxf-viewer
dxf-viewer copied to clipboard
How to compute scale? The dxf is vector illustration, how to compute scale in dxf-viewer ?
The dxf is vector illustration, how to compute scale in dxf-viewer when we change the viewer size?
This is defined by three.js OrthographicCamera which can be obtained by viewer.GetCamera(). Three.js world space is DXF model space with some offset applied, scale is not changed, so you can use something like (camera.right - camera.left) / canvasWidth to get model units per pixel.
This is defined by
three.jsOrthographicCamera which can be obtained byviewer.GetCamera(). Three.js world space is DXF model space with some offset applied, scale is not changed, so you can use something like(camera.right - camera.left) / canvasWidthto get model units per pixel.
Please accept my best thanks. I will try use viewer.GetCamera() in my project. It would be great to provide this method by dxf-viewer. Thanks again for your reply