You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a dxf file and i am using your parser to read it and getting huge points like this
vertices: Array(5)
new THREE.Vector3(11480992.59240649,3454785.183761712,0)
new THREE.Vector3(11481107.78168301,3454732.692403951,0)
new THREE.Vector3(11481100.31350271,3454716.314788647,0)
new THREE.Vector3(11480985.23491298,3454768.755673313,0)
new THREE.Vector3(11480992.59240649,3454785.183761712,0)
Now in three js the scene you know is really small and i want to make this polylines visible, so how i can scale or transform them, whats your unit system here in the conversion if the file unit is feet or meter
The text was updated successfully, but these errors were encountered:
I'm not sure. I have not figured out how to handle such large numbers yet. My understanding is that javascript can handle them because it uses 64-bit numbers, but webgl is using 32-bit floating point numbers in some of it's process and this causes a loss of precision. See the SO answer here.
So my understanding is that you need to shift your coordinates closer to 0. You might do this by taking every coordinate and and translating them toward 0 before adding them to the scene: position.x = position.x - 11481000 and position.y = position.y - 3454700. DxfParser does not yet have a built-in way to do this.
I don't know at what stage three.js/WebGL loses precision, but there is a small chance you could add a translate to your whole scene that moves it closer to 0; however, my guess is this won't work because the precision is lost before it can be translated.
Hello,
I have a dxf file and i am using your parser to read it and getting huge points like this
vertices: Array(5)
new THREE.Vector3(11480992.59240649,3454785.183761712,0)
new THREE.Vector3(11481107.78168301,3454732.692403951,0)
new THREE.Vector3(11481100.31350271,3454716.314788647,0)
new THREE.Vector3(11480985.23491298,3454768.755673313,0)
new THREE.Vector3(11480992.59240649,3454785.183761712,0)
Now in three js the scene you know is really small and i want to make this polylines visible, so how i can scale or transform them, whats your unit system here in the conversion if the file unit is feet or meter
The text was updated successfully, but these errors were encountered: