uwestoehr wrote: ↑Mon Jun 14, 2021 7:14 pm
Thanks for having a look.
What do you mean with "inconsistency ... drawing while moving"? Here the solver runs fine. I used my rounded rectangle tool as in the PR now for several real-life constructions and could not see solver issues. Teh solver succeds. Maybe it is because I always connect the rectangle directly to 2 pre-existing points in the sketch.
Sorry for my longer than usual delay in replying.
The "issue" (very small one):Arcs represented when creating (drawsketchhandler) are not the same size as the arcs that appear after hitting the mouse button.
What I meant is that what you see after executing the addGeometry instruction is exactly what you are telling it to add (i.e. the solver is not making the arcs of a different radius on its own).
uwestoehr wrote: ↑Mon Jun 14, 2021 7:14 pm
Good point. Geometrically a rounded rectangle is a special case of a rectangle, and thus should maybe appear under the rectangle icon, not the slot.
However, the slot is a special case of a rounded rectangle, there 2 parallel lines have the length zero. And a circle is a special case of a slot
So you are right, maybe we don't group the rounded rectangle under the slot but under the rectangle.
I am not sure myself. Do not change anything at this point. I think I need to figure out the fate of the rotatable tool first, then with that input, think in the UI, then with that input find the right place for it.
uwestoehr wrote: ↑Mon Jun 14, 2021 7:14 pm
I hope I understood you right?:
- we add a toggle icon named "rotateable" (we already have the construction geometry toggle icon)
- when this icon is in the pressed state, and the user adds a rectangle, it gets parallel + rectangle constraints so that the user can rotate the rectangle as he likes without prior need to remove constraints?
Yes, this would be optimal!
I did not think about it in that way. That solution would not "solve" the code explosion of providing specific constraints for each supported complex geometry. Save for that, your description is not a bad idea either.
I was actually meaning what Chrisb actually understood (and feared). A generic tool (simplified description) to mangle horizontal/vertical constraints into parallel/perpendicular ones. The "charm" of this, if it works properly, is that we do not need to code specific shapes for "stable" constraints vs "less stable but more flexible" constraints.
For example, if we add, as it is requested, a rectangle taking a center point and a vertex (another droppable under rectangle), we could still provide stable constraints and get the same with rotatable constraints with a single click.
I expect to be able to take a further look tomorrow.