Make a 4 vertices poly with 3 selected vertices

Hi

I want to make a new poly face with 4 vertices with 3 selected vertices.
( see pict )

SV = #()
SV = polyOp.getVertSelection $ as array
pt1 = polyOp.getVert $ SV[1]
pt2 = polyOp.getVert $ SV[2]
pt3 = polyOp.getVert $ SV[3]
DIST = pt3 - pt2   --- here
NP =  pt1 + DIST   --- and here
pt4 = polyop.createVert $ NP
append SV pt4
polyOp.createPolygon $ #( SV[1] , SV[2] , SV[3] , SV[4])
redrawViews()

It works in some situation, but as I'm a s### in maths, I don't know how to locate the 4th vertex in space...
If anybody could help. Thanks.

AttachmentSize
makeface.jpg61.56 KB

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
jahman's picture

.

I'd prefer scripted example scene instead of the vid

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.