Home › Forums › General Questions › Get X, Y, Z dimensions of a generated text object
Is it possible to get the dimensions of a generated Text Mech ?
I was looking in the custom properties, but I think it is not the right place. Thanks in advance.
This might help.
Route 66 Digital
Interactive Solutions - https://www.r66d.com
Verge3D’s Tech Chief
FB | Twitter | VK
Thanks Xeon and Alexander.
var obj = getObjectByName(objName);
var meshArray = obj.resolveMultiMaterial();
console.log(meshArray.geometry.boundingBox.max.x - meshArray.geometry.boundingBox.min.x);
console.log(meshArray.geometry.boundingBox.max.y - meshArray.geometry.boundingBox.min.y);
console.log(meshArray.geometry.boundingBox.max.z - meshArray.geometry.boundingBox.min.z);
but XYZ scale before exporting must be 1.0 and YZ coordinates are swaped…
Test your math:
Log in / Register