Find out the width, height and depth of an object

Hi. How to find out the width, height and depth of an object?
I know boundingBox. OK
geometry.boundingBox;
var object3DWidth = bb.max.x - bb.min.x;
var object3DHeight = bb.max.y - bb.min.y;
var object3DDepth = bb.max.z - bb.min.z;

How do I know the boundingBox of a group?

You can use Box3.expandByObject to calculate the bounding box of an object - that’ll also include its children.

1 Like