finding height width and depth of an editable poly

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

Thread Tools Display Modes
  05 May 2007
finding height width and depth of an editable poly

hi all

im new to maxscript but starting to get the hang of it. One thing i can't find any information about, either in the maxscript reference or on the net, is how to get the height, width and depth of an editable poly

here's was my thoughts have been sofar after lots of reading and experiments - is it a case of going through the model's vertices and finding the one with the lowest x value, storing it, then finding the vertex with the highest x value and subtracting them?

the listener outputs -5 and 5 for the first and second vertices' x values which is obviously because its in local coordinate system so i multiply the -5 by -1?

im kinda halfway there but im not sure if im doin this the right way

any help would be appreciated
  05 May 2007
Hi brow

Max has already a solution for this.

Every node in max has a .min and .max property that returns a point3 coordinate.

Take a look at "Node transform properties" in the maxScript help.

See ya
Keep on MAXing in the free world.

  05 May 2007
hi ball

thanks for the reply - I managed to get there in the end by cycling through all vertices and storing the xmin, xmax, ymax, ymin, zmax, zmin vertices and then finding the differences between all the min and max values, to find the width, height and depth.

This works fine now and outputs the same results as the Measure Utility (slightly more accurate too, as it returns floats and I haven't got it to round up or down yet)

But now I wish you'd replied just a liiiittle bit sooner lol oh well it was good practice

will definitely look into node transform properties when I get home tonight, sounds ideal - not sure how i missed that as I've read a large chunk of the maxscript reference - I was obviously looking for the wrong information

thanks again for the advice
  05 May 2007
Thread automatically closed

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
Thread Closed share thread

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Society of Digital Artists

Powered by vBulletin
Copyright ©2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump

All times are GMT. The time now is 12:46 PM.

Powered by vBulletin
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.