Artisan Questions

Hey all-

I am working on a script that allows me to "unfold" a model. At first I was hoping to do this with particles, but so far that is not working the way I had hoped. Anyways, the final solution to the unfolding is not the subject of this post.

I would like to know how the Artisan "Paint Selection Tool" knows what component is under it at the current drag position. The idea here would be that one could select a poly surface, (for now it would need to be triangulated) and "draw" a path through the faces to create an ordered list. This list would then be processed via mel to create the flipping that I am looking for.

I am also working on the first component of the script that actually does the flipping. For now, I am attempting to create a list containing:

  1. One poly Edge shared by to Triangulated faces.
  2. One poly vertex that is adjacent to the edge.

I am attempting to use this information to create consistent rotations (negative X) amongst all the faces (separate objects) that are unfolding. The idea here is that you separate the model into separate faces, then unfold the entire model face by face. One of the major problems I am running into is the rotations. I need to make sure the the rotations are in relation to the "face normal" of the current face, but I am unsure how to acquire this information and compare it to the date from the above mentioned selection list.

So... long story short...

  1. How can I find out what component is under the Artisan Brush at the current drag position?
  2. How can I ensure that the Local X Rotations are aligned to the edge and consistent with the face normal?

I know this seems like you are solving my problem before I have already started, but I do have components of this working, and wanted to see if any of you "Brains on Legs" had any better ideas.. I will post a series of images to make this more clear in a bit..

cheers

Sheriff