function findDimensions(grouObj){

    grouObj.remove( grouObj.getObjectByName('bbox') );
    grouObj.remove( grouObj.getObjectByName('x_dim_line') );

    // ======= bbox ========================
    var box = new THREE.BoxHelper( grouObj, 0xff00ff );

    box.geometry.computeBoundingBox();
    box.name = "bbox";

    var finalVec = new THREE.Vector3().subVectors(box.geometry.boundingBox.min, box.geometry.boundingBox.max);

    var x = Math.abs(finalVec.x);
    var y = Math.abs(finalVec.y);
    var z = Math.abs(finalVec.z);

    return [x,y,z];
}
// Find dimensions of the selected object
Find dimensions of the selected object
Find dimensions of the selected object
function findDimensions(grouObj){
    grouObj.remove( grouObj.getObjectByName('bbox') );
    grouObj.remove( grouObj.getObjectByName('x_dim_line') );
    var box = new THREE.BoxHelper( grouObj, 0xff00ff );
    box.geometry.computeBoundingBox();
    box.name = "bbox";
    var finalVec = new THREE.Vector3().subVectors(box.geometry.boundingBox.min, box.geometry.boundingBox.max);
    var x = Math.abs(finalVec.x);
    var y = Math.abs(finalVec.y);
    var z = Math.abs(finalVec.z);
    return [x,y,z];
}
function findDimensions ( grouObj ) { grouObj . remove ( grouObj . getObjectByName ( 'bbox' ) ) ; grouObj . remove ( grouObj . getObjectByName ( 'x_dim_line' ) ) ; var box = new THREE . BoxHelper ( grouObj , 0xff00ff ) ; box . geometry . computeBoundingBox ( ) ; box . name = "bbox" ; var finalVec = new THREE . Vector3 ( ) . subVectors ( box . geometry . boundingBox . min , box . geometry . boundingBox . max ) ; var x = Math . abs ( finalVec . x ) ; var y = Math . abs ( finalVec . y ) ; var z = Math . abs ( finalVec . z ) ; return [ x , y , z ] ; }
Find dimensions of the selected object
Find dimensions of the selected object
// ======= bbox ========================