Add support for rotated rectangle constraints#1294
Add support for rotated rectangle constraints#1294TheTripleV wants to merge 16 commits intoSleipnirGroup:mainfrom
Conversation
There was a problem hiding this comment.
The rotate handle is a bit awkward because it overlaps with the other corners. Also, dragging a green corner of that rotated rectangle up results in the corner of the box deviating from where the mouse pointer is, like there's some kind of scaling issue.
There was a problem hiding this comment.
If I drag a corner into the center of the box (so the box is effectively zero size), it starts dragging the whole box along. When I expand the box again, the mouse is no longer on top of the selected corner. When I do this on main, it just lets the corner pass through the center and let the area expand the other way.
The field-wide keep-in rectangle needs its placement corrected.
I noticed this. Allowing this isn't possible or else the rotation (and the rotation handle) has to jump. So I chose this as the compromise. I could reallow passthrough with jump. Or preferably, limit the min size of the box to ~8inch square. |
|
A minimum size equal to the robot's dimensions would make sense. The trajopt problem is guaranteed infeasible otherwise. |
|
The min size enforcement works, but the box corners still move around when they shouldn't at minimum size, and the mouse pointer location still deviates from the drag point. |
|
I fixed the box corners moving when just 1 dimension is limited by robot size. When both are limited, the box corners only move by floating point error. I don't think I can stop the mouse cursor from moving. Other parts of the UI don't either. |
Sure, but the issue is the drag target doesn't snap back onto the cursor when the cursor is moved back into the region not constrained by minimums. The cursor ends up offset from the drag target instead: Screencast_20250809_122624.webm |
src/components/field/svg/constraintDisplay/KeepInRectangleOverlay.tsx
Outdated
Show resolved
Hide resolved
src/components/field/svg/constraintDisplay/KeepInRectangleOverlay.tsx
Outdated
Show resolved
Hide resolved
calcmogul
left a comment
There was a problem hiding this comment.
The corner resize seems to get stuck in some situations.
Screencast_20250818_210024.webm
Co-authored-by: Tyler Veness <calcmogul@gmail.com>

No description provided.