-
Notifications
You must be signed in to change notification settings - Fork 26
Align site elements with other site elements #420
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
Signed-off-by: Michael X. Grey <[email protected]>
Signed-off-by: Michael X. Grey <[email protected]>
Signed-off-by: Michael X. Grey <[email protected]>
Signed-off-by: Michael X. Grey <[email protected]>
Signed-off-by: Michael X. Grey <[email protected]>
|
I've just pushed two more tweaks:
|
…rements on drawings Signed-off-by: Michael X. Grey <[email protected]>
Signed-off-by: Michael X. Grey <[email protected]>
|
Played around with these changes and I really like the ability to create new edges that align with the most recently created edge in continuous mode. This proves to be very useful when making floors/walls for sites that are non-rectangular, or has long edges that do not necessarily align with the x/y axes, since we often need multiple anchors along these edges. I found an edge case where
|
This PR is an alternative to #402 that generalizes the alignment feature to work on all anchor-related types: points, edges, and paths. Besides allowing edges and paths to be aligned with the x/y axes, this also allows all three types to be aligned with any edges that exist near the cursor. When an edge is being aligned against, the support hovering outline will be activated for it to indicate to the user which edge is being used for alignment.
The most key difference between this and #402 is that I've expanded the way the continuous service
select_anchor_cursor_transformis implemented to account for alignment settings which can be toggled from aCreationSettingsresource. A separate scheduled system tracks the left shift button to toggleCreationSettings::alignment_on. We can expand theCreationSettingsresource in the future to allow users to toggle on/off aligning/snapping to edges, floors, sequences of models, intersections, etc.For now alignment is only implemented against edges and the x/y axes. It would be fairly easy to expand the implementation to consider path (floor) segments and sequences of objects (such as models).
(EDIT: Finished already)
One point that could be improved for the UX might be a different "cost" function for deciding which element to align against. Currently we select the element that would require the smallest change in cursor position to achieve alignment, but we should probably factor in how close that element is to the cursor or else the cost function will tend to select elements that are far away but just happen to align closely to the cursor. We could try a cost function along the lines ofdelta_cursor / distance_to_element.