With the new class QgsQuadrilateral, we can add expressions to create a square by a diagonal and rectangles by 3 points