Invalid bounds generated for some orientations

for my own purposes, I’ve modified the code from this forum post and encapsulated it into a standalone function that computes a proper bounding box.

the proposed code in the post also clones the position attribute, so it’s expensive and slow for larger meshes. I hope a proper fix can make it back into the project at some point. I regret that I don’t know the code (or math behind it) well enough to take a stab at this.