[plugin request] Smallest bbox for 3d geometry.
-
Is there any plugin that matches the smallest boundingbox for a 3d object? (not necessary a solid, but any kind of geometry that have dimension on xyz coords.)
Let's say that I have a pillow and from some reason its axes are strange oriented. If I could orient its boundingbox in the most efficient way, then I could use better the rotation handlers that appear on bbox (with move tool).
I can remember that I saw something similar, but for 2d faces. Or I'm confusing something here?
-
I know that with Fredo scale you can edit that way. So he probably can extract this code from plugin.
-
@srx said:
I know that with Fredo scale you can edit that way. So he probably can extract this code from plugin.
In fact, Fredo tools don't fully orient bbox. See the image:
-
@unknownuser said:
@srx said:
I know that with Fredo scale you can edit that way. So he probably can extract this code from plugin.
In fact, Fredo tools don't fully orient bbox. See the image:
That's because he project the vertices to a plane parallel to the ground plane and make a 2D orientation.
I have no idea how one would calculate this.
-
Why not just reset the component axes (at least in this particular case it would not be hard).
Normally one would create a component aligned to the axes (as it is much easier to model that way anyway) so the bounding box would be better aligned.
-
@gaieus said:
Why not just reset the component axes (at least in this particular case it would not be hard).
The example with the pillow is just an example. Maybe not the best one, but was the first one that came in my mind.
-
@unknownuser said:
I can remember that I saw something similar, but for 2d faces. Or I'm confusing something here?
This? http://forums.sketchucation.com/viewtopic.php?f=180&t=13715
There are times when being able to set a Group/Compo to its smallest BB would be useful.
-
@unknownuser said:
Is there any plugin that matches the smallest boundingbox for a 3d object? (not necessary a solid, but any kind of geometry that have dimension on xyz coords.)?
The solution in 3D is very time-consuming in the general case, but there is a fast solution in 2D if you give a projection plane.
This is what FredoScale does. The inital plane is the horizontal plane, but you can freely choose another plane by clicking on a face in the model.The algorithm implies to project all vertices on the plane, determine the convex hull of all projected points, and then build the bounding boxes parallel to each of the segments of the convex hull. Then you select the one with the smallest area. Note that you may have several if the object is symmetrical (like a circle, a regular polygon, etc...).
Fredo
-
@unknownuser said:
The solution in 3D is very time-consuming in the general case
Fredo
But couldn't be automated this process? There is a plugin that calculates center of gravity, if I remember right. So, from that center, I guess it can be found the closest and the farthest point in selected geometry. I don't know how much can this help, but as I'm thinking now, my intuition says that can help. But, I also know that programming is not about intuition, but about autism (yeah, like to those people, you must tell to the computer exactly each step).
On the other hand, as such plugin would process only one selection at one time, a relative long time process maybe could be reasonable. Anyway, maybe an algorithm which calculates optimal bbox for a 3d shape would be the hardest part . I'm not good at math... so here a math expert would be welcomed -
dereeei, My intuition just knows that you are not trying to tell a talented programmer how to program:-)
Advertisement