I am trying to split and object with a plane to determine the center of the object that is left after splitting. For the demonstration of this problem I placed Cube at (0,0,0) and added a plane to split it with. The I added a boolean difference modifier to the Cube and applied it. After that I expected that the location of the leftover object would have changed but it has stayed (0,0,0). Is there any way to make the object update its location? Ideally using bpy. I am using Blender 3.6.2.
I added an images to clear up my problem. In the first picture is the cube before adding modifier. In the second after adding. In the console you can see the location before and after adding and applying the modifier.
Thank you!
bpy.ops.object.origin_set(type='ORIGIN_GEOMETRY', center='MEDIAN')
$\endgroup$