If I may add my 2 cents to this PR. I actually like a mix of your two approaches. Use a dropdown menu for a clean toolbar and provide options to create rectangles using different constrains as well as creating rectangles with rounded corners.
Here is my proposal for a possible dropdown menu with the following options:
- Rectangle
- Tilted Rectangle
- Rounded Rectangle
- Tilted Rounded Rectangle
- FC_Sketcher_PR4835_menue-proposal_Zeichenfläche 1.png (42.91 KiB) Viewed 2899 times
The order would be to offer the standard rectangles with sharp corners first and after that rectangles with rounded corners.
Rectangle works as the current implementation with vertical/horizontal constraints, the rectangle is parallel to the origin axes. Creation of the rectangle is done with 2 clicks, start point and end point, which also sets the dimensions in x and y direction.
Tilted Rectangle uses the parallel and perpendicular constraints. This would align more to the mathematical definition of a rectangle, where each pair of adjacent sides is perpendicular and both pairs of opposite sides are parallel and equal in length.
The creation is done with 3 clicks:
1. Select start point (first click)
2. select the direction of the first side (second click), this would define the imaginary x axis of the rectangle and the length of the first pair of sides
3. select the length of the second pair of sides with the opposite side of the start point (third click)
Rounded Rectangle creation as default rectangle with v/h constraints, but uses third click to define radius of the corners.
Tilted Rounded Rectangle creation like tilted rectangle but with additional fourth step to define radius of corners.
I would
avoid a „magical“ calculated switch between different constraint types on creation of the rectangle. I think this would confuse more than help, as the user might not get what her intend was.
Additional features could be:
- Cycle through the menu options with „M“ similar to the Polyline command (or other key), just press "R" and cycle through the options with "M"
- Have an option to input the desired dimension with values, e.g. for Rectangle set the start point and type „@12.5,34“ for dimensions in x and y direction -> similar to AutoCad functionality to quickly create rectangles with the desired dimensions