For all issues regarding the Forums use, please, refer to the Forum Rules.

Our Solutions

Need professional assistance?
Consider our:

Support Offerings


Need to speed up your development?
Have a look at our:

Samples & Tools


Need some functionality extending standard OCCT capabilities?
Check out our:

Adv. Components

Related pages

About bounding box?

Jun WANG's picture

TopoDS_Shape theShape = ##;
Bnd_Box B;

BRepBndLib::Add(theShape, B);
B.Get(Xmin, Ymin, Zmin, Xmax, Ymax, Zmax);
This result is for the aixs-aligned bounding box, not for oriented bounding box. Does anyone know how to compute the oriented bounding box of shape in OCC. THanks a lot.

Rob Bachrach's picture

The "oriented" bounding box can be an arbitrary concept. If you know your orientation, you can create a new shape that is a transformed version of your original and get the bounding box on that. Then, if necessary, you can transform the bounding box coordinates back to the original shape's coordinate system.

Jun WANG's picture

Dear Bachrach, Thanks for your reply. Actually the "oriented" is just used to differentiate from the "assigned" bounding box, not specific meaning. Please refer to:
Thanks a lot.

Rob Bachrach's picture

Ok. In that case, no. It does not exist to my knowledge. :-)


Jun WANG's picture

Anyway, thanks for your consideration.

Bearloga's picture

Developing the idea of Rob, I suggest that you compute principal axes of inertia of your shape using BRepGProp functions, and transform the shape from that system before computing bnd box.

Contact us

Attention: DO NOT use this form for all kind of request for the removal of your personal data. Please follow this link for such cases.