how to print the centroid/origin of an object? I am trying to re-center an object that I have imported into blender.

I have set the object origin to the Center of Mass of the object, now I want to translate the object so its' center of mass is exactly at the global (0,0,0) location.

How can I print the x,y,z coordinates of the object's center of mass? or is there a way to just directly translate the object center of mass to a given x,y,z point?

Thanks!!
Are you trying to place object in center of grid?

import bpy

bpy.ops.object.location_clear(clear_delta=False)


or something like this.

import bpy

ACT_OBJ  = bpy.context.active_object

ACT_OBJ.location = (0.0, 0.0, 0.0)