# Bounding box and scale calculation problem

**URL:** <https://discourse.threejs.org/t/bounding-box-and-scale-calculation-problem/22049>\
**Category:** Questions\
**Created:** [December 30, 2020, 12:53pm UTC](https://discourse.threejs.org/t/bounding-box-and-scale-calculation-problem/22049 "2020-12-30T12:53:50Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Boris\_Bek](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/boris_bek/32/5493_2.png) [@Boris\_Bek](https://discourse.threejs.org/u/Boris_Bek)\
**Post date:** [December 30, 2020, 12:53pm UTC](https://discourse.threejs.org/t/bounding-box-and-scale-calculation-problem/22049/1 "2020-12-30T12:53:50Z")

</div>

Hello, I have a problem with the bounding box and scale  
I have this kind of case where

```
    const object = new THREE.Object3D()

    const geometry = new THREE.BoxBufferGeometry(1,1,1);
    const material = new THREE.MeshPhongMaterial({color: 0x000000});
    const mesh = new THREE.Mesh(geometry, material);
    mesh.name = "Box"
    object.add(mesh)

    object.scale.set(5, 5, 5)

    const box_mesh = object.getObjectByName("Box")
    const box3 = new THREE.Box3().setFromObject(box_mesh);
    const length_x = box3.max.x - box3.min.x;
    const length_x = box3.max.y - box3.min.y;
    const length_z = box3.max.z - box3.min.z;

    const other_geometry = new THREE.BoxBufferGeometry(length_x, length_y, length_z);
    const other_material = new THREE.MeshPhongMaterial({color: 0x000000});
    const other_mesh = new THREE.Mesh(geometry, material);
    other_mesh.position.y = -2
    object.add(other_mesh)

```

In this case, after scaling the size of other\_mesh is not the same as the box\_mesh  
it is bigger by 5 exactly as much as we scale it,  
there is an option where I can do this length\_x / object.scale.x  
but I wonder IS THERE ANY OTHER WAY TO DO THIS WITH for example with help of Matrix

and one more additional question where I can find articles related to the use of Matrix in three.js

Advanced Tank You
