View Full Version : How are polySplit face indices determined?
09-29-2005, 12:02 AM
I'm scripting the polySplit tool to slice up a polygon, but I need to know what each index of the new faces will be after they are split.
Does anyone know how I can determine which face will retain its index and which faces will receive a new index (and in which order)?
Thanks for any assistance.
09-29-2005, 03:24 AM
perhaps I dont understand the question... so exsuse me if this is too basic..
but if you create new faces then they will be the "last".
so if you have a surface.. and run `polyEvaluate -f` it gives the number of faces (lets say 20) then you do your splittin', then `polyEvaluate -f` again and get the new face count (say 30), then the new faces are the last 10 of 30, which is surfaceName.f[19:29]
hope that helps
09-29-2005, 07:22 PM
Thanks for the help john_homer, but I eventually found the answer. I'll explain it a bit more clearly in case any one else comes up against this.
If I have a polygon with only one face (face) and I polySplit that into two pieces, I would want to predict which part of that split face will remain face and which one becomes face. Then, when I polySplit face again, I would want to determine which part remains face and which part becomes face.
The method Maya uses to determine how faces are indexed after a polySplit is based on the direction of the cut. If the direction of the cut is considered the up vector, then the face on the left side of it will retain its index while the face on the right side will receive the new value. I'm still not quite sure how exactly the indexing works when one face is polysplit into more than two pieces, but I think it starts on the left of the up vector, then indexes the face to the right, then looks for the next face to the left of the up vector and so forth.
09-29-2005, 07:22 PM
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.
vBulletin v3.0.5, Copyright ©2000-2013, Jelsoft Enterprises Ltd.