Bumbi
10-10-2005, 01:27 PM
I'm currently building a script to replace faces in one mesh with faces from another mesh. I've worked out how to find and select the source and target faces and vertices. I'm using two editable meshes so that I can use intersectray to pick the faces.
But to get the functionality I want it seems like I need to figure out in what order the vertices have in the polygon since I want to be able to rotate it later on. The problem is that when I try to convert the selection to edges to start going through the edges I get edges outside the polygon I want to use, I also get the hidden edges which makes it a bit more annoying.
Right now it seems like I have to detach the polygon to an element, select all vertices,convert to edges, remove all hidden from the array, and then start looping through it from one vertex until I get back to the start.... Feels like there should be an easier way....
So. How can I get what order the vertices around a polygon have in an effective way? Or does anyone have a better solution to the problem?
But to get the functionality I want it seems like I need to figure out in what order the vertices have in the polygon since I want to be able to rotate it later on. The problem is that when I try to convert the selection to edges to start going through the edges I get edges outside the polygon I want to use, I also get the hidden edges which makes it a bit more annoying.
Right now it seems like I have to detach the polygon to an element, select all vertices,convert to edges, remove all hidden from the array, and then start looping through it from one vertex until I get back to the start.... Feels like there should be an easier way....
So. How can I get what order the vertices around a polygon have in an effective way? Or does anyone have a better solution to the problem?
