How to move verts like Bridge Tool and avoid edge crossing.


#1

This is how the Bridge Tool works - always properly connects the verts(no cross edges):

Did someone knows how to move the verts just like the Bridge Tool?
I know the verts order for both sides, but how to get the proper starting verts and to avoid edge crossing?


#2

sort them by position… system coordinates might be any, but it seems reasonable to use ‘best’ plane for these verts…


#3

Denis, what “best plane” means?
What I have done:
I use v1 and v2(and v3 or v4 as third point) to create temp matrix. The grid object on the image is only to show how this temp matrix is aligned. Then I use this:

srStartVert = v1
 	in coordsys (matrix3 vect1 vect2 vect3 v1pos)
 	(
 		mrStartVert = if (polyop.getVert curO v3).x < (polyop.getVert curO v4).x then v3 else v4
 	)


#4

it’s a right idea… i would do the same. it has to work in most cases. another solution for the matrix might be using v1-v2 vector and average normal of surrounded faces of v3…v4


#5

I hope that it will works on any cases. My other idea was to get the v1-v3 and v2-v4 vectors and check if they are intersects in area between selected edges(what you suggested here). If the vectors intersects then v1 and v4 is the right vectors, otherwise v1 and v3.


#6

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.