Seeking guidance: I am trying to figure out how to determine the dimensions of my 3D objects that I have imported. Currently, I am using the code snippet below:
var box = new THREE.Box3().setFromObject(obj);
This code allows me to calculate the boxes for my objects and even merge them together if needed.
However, my challenge lies with these two imported objects: https://i.sstatic.net/dcjw2.jpg
The apparent solution would involve computing the left and right sphere boxes and then combining them. But since both objects were imported using stlloader, which seems to merge everything into one mesh, I am unsure if this approach is feasible.
Therefore, I have the following questions: 1. How can I calculate a box that represents the shape of a sphere for my sphere object? 2. Is this operation even achievable for my stl object? (I plan to test this once I have an answer for question 1)
Edit: It seems that Question 1 should involve using .computeBoundingSphere. Is there a way to implement this effectively?