When getting the center point to a bounding box, it appears to always be relative to the group’s coordinate system, not the global coordinate system. Then, if you select the group the object is contained in, and check the bound center again, it’s now globally aligned.
In the above image, the left cube’s center X is at -1.24m. However, selecting the cube and checking the bounds gives me the following incorrect, relative center:
Sketchup.active_model.entities.entities 1 Sketchup.active_model.selection.bounds.center.x ~ 0.58m
Is there a way to get the correct global bounding center for an object contained within a group?
I’d rather not just simply apply the transformation for the parent group, since the actual models I’m working with will likely have many levels of groups, and I’m guessing right now that the issue will continue to compound. Not to mention that you can’t simply find the parent group either.
The purpose of this is collision detection between various objects anywhere in the model, where I need the accurate global position of each object.