# 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
pt2 = polyOp.getVert \$ SV
pt3 = polyOp.getVert \$ SV
DIST = pt3 - pt2   --- here
NP =  pt1 + DIST   --- and here
pt4 = polyop.createVert \$ NP
append SV pt4
polyOp.createPolygon \$ #( SV , SV , SV , SV)
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

## Comment viewing options ### -

- ### .

smth like this

AttachmentSize
3dsmax_onsghsawgn.png 9.27 KB ### Hi, Jahman. Yes ! It is what

Hi, Jahman.
Yes !
It is what I wrote :
DIST = pt3 - pt2
NP = pt1 + DIST
But in some case NP ( 4th vertex ) is not at the good place...
And I don't understand why... ### .

If you could post this case here it would be easier to understand how to deal with it.

AttachmentSize
3dsmax_i5wfgd9dpg.png 9.27 KB ### Hi, Jahman. It is a case it

Hi, Jahman. It is a case it don't work...

AttachmentSize
makeface2.jpg 92.19 KB ### .

but what's wrong with the solution I posted in prev image?
p4 = p2 + 2 * ((p1 + p3) / 2.0 - p2) ### It do the same

It do the same thing....

```(
SV = #()
SV = polyOp.getVertSelection \$ as array
pt1 = polyOp.getVert \$ SV
pt2 = polyOp.getVert \$ SV
pt3 = polyOp.getVert \$ SV
NP = pt2 + 2 * ((pt1 + pt3) / 2.0 - pt2)
pt4 = polyop.createVert \$ NP
append SV pt4
polyOp.createPolygon \$ #( SV , SV , SV , SV)
redrawViews()
)``` ### It do the same

It do the same thing....

```(
SV = #()
SV = polyOp.getVertSelection \$ as array
pt1 = polyOp.getVert \$ SV
pt2 = polyOp.getVert \$ SV
pt3 = polyOp.getVert \$ SV
NP = pt2 + 2 * ((pt1 + pt3) / 2.0 - pt2)
pt4 = polyop.createVert \$ NP
append SV pt4
polyOp.createPolygon \$ #( SV , SV , SV , SV)
redrawViews()
)``` ### .  