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

POC - Snap to Angle Functionality #6153

Closed
ljubica-milovic opened this issue Dec 13, 2024 · 1 comment · May be fixed by #6160
Closed

POC - Snap to Angle Functionality #6153

ljubica-milovic opened this issue Dec 13, 2024 · 1 comment · May be fixed by #6160

Comments

@ljubica-milovic
Copy link
Collaborator

ljubica-milovic commented Dec 13, 2024

Background
This is a proof of concept for part of the snap to functionality we will be releasing in the near future, concerning only bond angles.

Requirements

  1. Only the center of the monomer is considered (x and y coordinates).

image

  1. Standard radius is the distance between the centers of two connected monomers when they are horizontally/vertically layouted (1.5 Å).

image

  1. The monomer can snap to an angle of n*30 degrees in relation to another monomer.

  2. The magnetic area for snapping is 20 pixels perpendicular to the radial line (black lines bellow), or to the nearest radial line if the 20px areas overlap.

The 20px value should be able to be easily changed for POC purposes.
image

  1. As soon as the center of the monomer enters the magnetic area of a radial line they should be snapped to the perpendicular position on the radial line.

image

  1. A monomer can move on the line as long as the center of the monomer would not exit the magnetic area, and as long as the line is not 20px away from the circle with the standard radius (red circle bellow).

image

  1. If the center of the monomer enters the magnetic area 20px away form the circle with the standard radius, the monomer should snap to exactly the intersection of the radial line and the circle with the standard radius.

image

  1. If the user holds down the ctrl key while moving the monomer, all snapping functionality should be disabled.

UX
image

@rrodionov91
Copy link
Collaborator

POC was not merged into master. Please check linked PR if needed

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.

2 participants