You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Monomer connection point (CP) rotates around the center of the monomer if CP is connected to a bond and the bond changes its position relatively to the monomer. In certain cases rotated CP may partially or fully overlap with another CP. In order to minimize the amount of such cases free connection points should be rearranged around the monomer once such an overlap occurs.
Example of current behaviour:
Example of expected behaviour:
Solution:
The rules for rearrangement are as follows:
Only free CPs should be rearranged, connected ones should keep their positions.
Free CPs should be rearranged only when CP rotation is finished, no rearrangements while user keeps dragging connected monomer.
There are 8 predefined sectors with center axis at 0 (right), 45, 90 (top), 135, 180 (left), 225, 270 (down) and 315 degrees. Two CPs are considered overlapping if they appear in the same sector, i.e. they overlap or are close enough.
Once rearrangement starts, first priority is to move each free CP to the center of its default sector: R1 - left, R2-right, R3-top, R4-bottom, R5-top-left, R6-top-right, R7-bottom-left, R8-bottom-right.
Free CP can be moved to its default sector if there is no connected CP in this sector, other free CPs are not taken into consideration. If CP cannot be moved to its default connection, it is assigned to a sector on further steps (see below).
Once CPs assignment on default positions is finished, second priority is to keep free CPs at their old positions if no conflicts occurred on previous steps.
Remaining free CPs are distributed across available sectors, where available sector is the one having neither connected nor free CP. The algorithm should search through sectors starting from the one at 0 degrees and moving clockwise.
The text was updated successfully, but these errors were encountered:
Background
Monomer connection point (CP) rotates around the center of the monomer if CP is connected to a bond and the bond changes its position relatively to the monomer. In certain cases rotated CP may partially or fully overlap with another CP. In order to minimize the amount of such cases free connection points should be rearranged around the monomer once such an overlap occurs.
Example of current behaviour:
Example of expected behaviour:
Solution:
The rules for rearrangement are as follows:
The text was updated successfully, but these errors were encountered: