Polygon face/vertex relationships

This one has been bugging me all day... Does anyone know how to find out either which faces are connected to a particular vertex -or- given a face, which vertexes are connected to the face?

What I really want to do is re-create the "Component Editor's" -AdvPolygons- tab with MEL. Notice this may be a second question in the same post - it would be great to be able to select a face, find all of the vertices which make up that face, and similarly find all of the .normals. for each vertex (heh - duh, those would all be the same)... 

Anyways, I know it would be fairly simple with a plugin, but I do not want the user to have to load a plugin every time they want to perform my steps - my current procedure is already convoluted enough!

Thank you for any help you may offer (even if it is to tell me to get off my lazy bum and write another plugin)... This board has always been an immense help.
1 Like

Hi there
You could do it this way if i understand your question right:
With a face selected use "PolySelectConvert 3". This will select the vertices that are connected to this face so that you can query their numbers. To get the vertex normals use
the command "polyNormalsPerVertex -q -xyz". If you want the original face to be selected after these commands are issued, my guess is the only way is to store this face in a string and reselect it because "PolySelectConvert 1" will select all faces that are connected to the selected vertices.

Tell me if it works

/j

I do believe you understood my quandry perfectly. I'm totally baffled, however, as to how you came up with your response -- the polySelectConvert command is listed nowhere in any documentation i can find! Impressive. This afternoon, I also stumbled across a different way to find out what vertexes are connected to a face. If you select the face and simply run the 'listAttr' command, it gives you a laundry list of 'pnts' that are connected to the face. This isn't exactly what I wanted, but if you parse out all of the numbers, you wind up with the proper vertexes. (Ick!)

Strange stuff, but it works... Also the polyNormalsPerVertex command is perfect. Thanks for the quick assistance!

Andrew Gardner
University of Wisconsin, Madison