Create rectangular bounding box perpendicular to longer side

How can I make rectangle bounding box perpendicular to surface longer side?

Something like this: bound.gh (6.5 KB)

1 Like

20_11_27_bbox_align_longest_edge.gh (17.1 KB)

1 Like