I need to create a bounding box for a polysurface. I can use grasshopper to make the rotated bounding box. However, I need to add it to my GHpython script. Is there any way I can rotated the bounding box just as my grasshopper component? My expectation should be like the sketch in the image.
In addition to @diff-arch’s great reply (that uses RhinoCommon), you can also compute an oriented BoundingBox with RhinoScript. As an additional bonus, RhinoScript bounding boxes can be tapered later, because they are simple lists of 8 corner points.
@diff-arch@piac Thank you all kindly help. Just wonder, is there any possible to extract the plane from the brep directly inside GHpython instead of adding new input?
I might not have understood the problem, but you can cast a BoundingBox to a Box (using this constructor) and then get its plane (through this property).