Skip to content
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

Snap partially selected structure to an attachment bond when rotated #2760

Closed
AlexanderSavelyev opened this issue Jun 12, 2023 · 1 comment · Fixed by #2792
Closed

Snap partially selected structure to an attachment bond when rotated #2760

AlexanderSavelyev opened this issue Jun 12, 2023 · 1 comment · Fixed by #2792

Comments

@AlexanderSavelyev
Copy link
Contributor

Background
When user rotates part of a structure, alignment should be done due to a attachment bond(s) (bond which is connected to selected structure)

Solution
Create snap positions for a bond and highlight the snaps according to the following rules

  • if there is 1 bond attached - then create 90, 120 and 180 angles snaps. Angle should appear when position is close to the predifined angle
  • If there are 2+ bonds then create a snap which divides angle by two between any two bonds near the current position

See screenshots

@PetrKurkin
Copy link
Collaborator

Flow for the 1 bond scenario. We move the handle counterclockwise, see 90 degrees angle prompt first, snaps to 120 degrees, and move further to 180 degrees.
One bond flow

90 degrees snap. When highlighted in blue, the bond thickness multiplies by 1.5.
90 degrees angle snap

Flow for 2+ bonds scenario. Moving counterclockwise we see a prompt for the bisector, then snap to it.
Two bonds flow

Bisector snap
Bisector

@yuleicul yuleicul assigned yuleicul and unassigned Nitvex Jun 14, 2023
yuleicul added a commit that referenced this issue Jul 11, 2023
…tated (#2792)

* #2760 - refactor(rotate tool): naming and functions

* #2760 - feat: snap partially selected structure to an attachment bond

* Extract text and line drawing functions

* Fix functional group to enable snapping

* Fix prettier
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants