Create missing point of a rectangle from right-angled triangle
Edit mode script.




Select face in face select mode and run script.
Finds longest edge (hypotenuse) doesn't test for right angle.
Creates a new vertex at location of other vert.
Rotates it 180 degrees about the hypotenuse.
Creates a new face from new vert and hypotenuse edge.
Uncomment (remove #) from #bmesh.ops.dissolve_edges(bm,
edges=[le]) to dissolve the hypotenuse edge, if you want the
resultant quad.


&nbsp;

import bpy
import bmesh
from mathutils import Matrix
from math import pi

context = bpy.context
ob = context.edit_object
me = ob.data

bm = bmesh.from_edit_mesh(me)

f = bm.select_history.active
if isinstance(f, bmesh.types.BMFace) and len(f.verts) == 3:
    # longest edge
    le = sorted(f.edges, key=lambda e: e.calc_length()).pop()
    v = (set(f.verts) - set(le.verts)).pop()
    nv = bm.verts.new(v.co)
    bmesh.ops.rotate(bm,
            cent=le.verts[0].co,
            matrix=Matrix.Rotation(pi, 3, le.verts[0].co - le.verts[1].co),
            verts = [nv],
            )
    bm.faces.new([nv] + le.verts[:]).select = True
    #bmesh.ops.dissolve_edges(bm, edges=[le])
    bm.normal_update()
    bmesh.update_edit_mesh(me)