# Bounding box dimension in blender

I am using dimensions to get the bounding box dimensions of the object.

me_ob = bpy.data.objects['myobj']
cor = me_ob.dimensions


When i construct a cube with those dimensions, the cube appears to be shifted along the z & y axis. It is good along the x axis.

I am creating the cube from blender wiki

At first i thought that it be be because of the arbitrary shape than the cube or a cuboid. For cube and cuboid, the center can be found out by dividing the sides into two. but for a arbitary shape it will not always be half. To validate it, i shifted the cube manually. It fits perfectly after this.

Why do we remove the shift ?

• Hi. Please include any relevant code in the question itself as text instead of in an image. – Ray Mairlot Feb 22 '17 at 11:13
• I was trying to add a link to the blender wiki but i was not allowed. Check this link.. wiki.blender.org/index.php/Dev:Py/Scraipts/Cookbook/… – Sundeep joshi Feb 22 '17 at 14:55
• There is an error in the url it says 'Scraipts' instead of 'Scripts'. Nevertheless, please take the code you have in the text editor and paste the relevant parts into your question. It makes it easier for people to answer your question if they immediately have access to the code you are using and don't have to type it up from an image or go to a url. – Ray Mairlot Feb 22 '17 at 15:25