using mesh bounding box information

93 views
Skip to first unread message

s...@weacceptyou.com

unread,
Jan 1, 2017, 2:25:10 PM1/1/17
to Python Programming for Autodesk Maya
Hello,

ive got a script which duplicates a mesh 10 times. I just want to offset the mesh each time it is duplicated so it lines the meshes up side by side. But in order to do that for any mesh i wanted to use the bounding box info to find the x width of the mesh.

It has min and max bounding box values and neither seem to represent the correct width of my mesh. How can you even have a min or a max bounding box? surely the bounding box is the exact size of the mesh right?

anyway, just wanted to ask if this is the correct way to find the width of a mesh

thanks,
Sam

Justin Israel

unread,
Jan 1, 2017, 2:47:01 PM1/1/17
to python_in...@googlegroups.com
On Mon, Jan 2, 2017 at 8:25 AM <s...@weacceptyou.com> wrote:
Hello,

ive got a script which duplicates a mesh 10 times. I just want to offset the mesh each time it is duplicated so it lines the meshes up side by side. But in order to do that for any mesh i wanted to use the bounding box info to find the x width of the mesh.

It has min and max bounding box values and neither seem to represent the correct width of my mesh. How can you even have a min or a max bounding box?

Are you referring to the values returned from either the exactWorldBoundingBox or polyEvaluate commands? 
"min" refers to the smaller xyz corner and "max" refers to the larger xyz corner. Is this not what you would expect?
 
surely the bounding box is the exact size of the mesh right?

anyway, just wanted to ask if this is the correct way to find the width of a mesh

thanks,
Sam

--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/a8dfb57d-0fa8-48ba-bcdc-7dd85b317ae1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

s...@weacceptyou.com

unread,
Jan 1, 2017, 5:03:11 PM1/1/17
to Python Programming for Autodesk Maya
oh right, so to find width distance i subtract the min from the max. I assumed it would just show the length of the bounding box edges.

cool, thanks Justin
Sam
Message has been deleted

Kumaran M

unread,
Jan 4, 2017, 1:23:21 AM1/4/17
to Python Programming for Autodesk Maya, s...@weacceptyou.com
Sorry missed out a function, here is the update.
Dup.py

s...@weacceptyou.com

unread,
Jan 4, 2017, 4:50:57 AM1/4/17
to Python Programming for Autodesk Maya, s...@weacceptyou.com
sweet, thanks alot. will try

Sam
Reply all
Reply to author
Forward
0 new messages