HI!
First I want to apologise for my bad english.
Now, the problem.
I'm trying to make a script that connects edges like BandSaw tool in Lightwave. For now I've written the code that divides the edges on the desired locations, and then connects them. Basically, the script works in that way:
1.takes the first edge from edge selection and divides it
2.takes the second edge and divides it
.
.
10. takes the 10th edge and divide it
then:
13. takes the first vert of the first edge, takes the first vert of the second edge .. etc. and connects these verts.
14. takes the second vert of the first edge, takes the second vert of the second edge...etc. and connects these verts.
But I found a problem.
See on the image below.
Why the middle edge is "reversed"? And how to find the "reversed" edges in initial edge selection(selections that will be connected)? This is the 4th day that I am trying to find a solution, but with no success.
Replies
Use polyOp.getEdgeVerts which gives an array made of the two extremity vertexes ordered, so you can keep track of edge directions, and compare them with the reference side loop. When adding vertexes to ring edges if new edge has the same direction as previous then the insertion proportion is equal, while if it is reversed, proportion becomes 1-proportion.
I know it is not trivial, but it could get you started. It is quite old and on some parts a little overcomplicated, but you can take a look at my IC.PolySplitRing code, which makes use of this technique.
I have and use PolySplitRing and I will look at the code. Thanks for your help.