Align site elements with other site elements#420
Merged
Conversation
Signed-off-by: Michael X. Grey <greyxmike@gmail.com>
Signed-off-by: Michael X. Grey <greyxmike@gmail.com>
Collaborator
Author
|
I've just pushed two more tweaks:
|
…rements on drawings Signed-off-by: Michael X. Grey <greyxmike@gmail.com>
Member
|
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
|
Signed-off-by: Michael X. Grey <mxgrey@intrinsic.ai>
xiyuoh
approved these changes
Feb 10, 2026
Member
xiyuoh
left a comment
There was a problem hiding this comment.
Tested again and managed to clarify the intended behavior. LGTM!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.