-
Couldn't load subscription status.
- Fork 60
Add support for rotated rectangle constraints #1294
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The corner resize seems to get stuck in some situations.
Screencast_20250818_210024.webm
Co-authored-by: Tyler Veness <[email protected]>

No description provided.