Moving an object using 2 points on the object

I want to be able to put or extract 2 points on any 2d shape or curve, its face always parallel to the z axis, and be able to move those points to move the entire shape in any orientation still parallel to the z axis.

Attached is a definition that is pretty much what I want, being able to move 2 points anywhere in space and stays parallel to the z direction, but I had to make the plane in grasshopper. I dont know how to do this for objects in rhino that I put into grasshopper. I would also like the size of the shape to scale proportionally with the new length, e.g. if the original length of the square is 2m and I stretch the top and bottom to 3m, the sides would also stretch to 3m.

GHvariabletop.gh (28.0 KB)

Hi @Thomas_Chu,
You can extrude lines to surfaces.

With the use of the “Geometry Pipeline” you can move the surfaces in a dynamic way.

Sorry if my original question wasn’t clear enough, but I want to be able to move surfaces that are already in rhino, not created by grasshopper, with 2 points, similar to the grasshopper file I linked in the original post. But in that gh file, I created the surface in grasshopper.