Bounding box is bigger than real

Hi! I have just started playing with box2d and have a question. I see that that broad phase proxy for a shape is not exactly a bounding box - in my experiments it at least aabb can be bigger than ideal bounding box. Can we make any assumptions about sрape and its corresponding bounding box in broad phase or not? Is it always bigger or not? For my application it is critical to calculate bounding boxes as exactly as possible.
The AABB of circles is what you would expect, and the AABB of polygons is the AABB of a given OBB of the polygon. Neither of these are strict guarantees, just what is currently true. This does mean if you have a polygon shape that is itself an AAB, then it's AABB will be itself, which I"m guessing the guarantee you are looking for.

In general, if the size of your AABB is critical, then you should be calculating it for yourself, as this is counter to the intention and use of AABBs in Box2D.

(AABB = axis aligned bounding box, OBB = oriented bounding box, AAB = axis aligned box)
There's one caveat: the broadphase AABB is actually the swept AABB of the object, which is why it's bigger in one direction - Box2d needs to use swept AABBs internally so it can do continuous collision detection properly.

I believe you can calculate the true current AABB (or Box2d's internal approximation of it, as BorisTheBrave explained) by using void b2Shape::ComputeAABB(b2AABB* aabb, const b2XForm& xf) and passing it a pre-allocated b2AABB* to be "filled" and the body's b2XForm.

Original thread: https://box2d.org/forum/viewtopic.php?t=2024