Mid-point constraint will achieve the rectangle case.
Select top or bottom line, select point make midpoint constraint, repeat for one of the side lines.
This will work for squares and rectangles at an angle.
The midpoint constraint is perpendicular to the line.
@QQWhat you are talking about is a predefined shaped that is controlled with two diagonals bisecting lines (SW rectangle sketch option). The first point you define is the actual mid point/intersection point of the diagonals and the second is the upper right corner point. It's a quick way to get a rectangle centered on the origin.