PDA

View Full Version : How do you get the polygon count and world-space coordinates of an object?


cathyy
09-15-2010, 10:55 AM
Like the title says.

1) How do you get the polygon count of an object?

2) How do you get the world-space coordinates of an object/face?

Thanks.

mlefevre
09-15-2010, 12:01 PM
1) How do you get the polygon count of an object?

polyEvaluate -face "yourObject";

NaughtyNathan
09-15-2010, 02:28 PM
2) check out the docs for the xform command. Incidentally, faces don't have an explicit position. There are different ways to assume different values for this, but how you get those is down to you (bounding box center? vertex average position? surface diagonal intersection, etc, etc...)

:nathaN

jdj
09-16-2010, 09:13 AM
2) How do you get the world-space coordinates of an object/face?


`pointPosition`is your friend for all kind of points (vertices, cv's etc.). But as nathaN says, for a face you need to figure out what position you're talking about. xform is geared towards transforms, but it will work in this case.

Then when you're tearing your hair trying to figure out which vertices belong to which face, you will cherish the tiny command `polyListComponentConversion`.

Cheers
/ Daniel

cathyy
09-20-2010, 04:06 AM
Thank you all. :)

CGTalk Moderation
09-20-2010, 04:06 AM
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.