Jump to content

Orient object procedurally (make it stand) based on its longest side


anicg

Recommended Posts

Im afraid, the sidefx orient bounding box is easy to fail, just a simple transform and it doesn't line the obj properly in Y

I would useg eigen vectors for this .

A more simple way will be to use labs did straighten sop were you have to select groups for orientation. or maybe you could measure the longest edge and use the rotation different with the Y axis to align with some matrix maths?

 

image.thumb.png.2561c309e2b625b7ae487233ffaf5e95.png

Link to comment
Share on other sites

There are many ways to do this sort of thing, but one thing I would recommend is using the convex hull geo to compute it for speed. In this case it already looks convex but I am talking in an HDA sense.

Also there are many assumptions and shortcuts one can take. For example to compute an MVB (Minimum Volume Box), at least of the faces in the convex hull will touch one of the faces on its MVB. Then there is brute force methods searching on all faces, vs other clever ways but sometimes brute force is actually faster.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...