Chem4Word / Version3-2

Version 2022 (3.2) of Chem4Word - A Chemistry Add-In for Microsoft Word
https://www.chem4word.co.uk
Other
21 stars 2 forks source link

Allow change of length in bond properties #4

Open tomyan112 opened 4 years ago

tomyan112 commented 4 years ago

Describe the solution you'd like

image

Describe alternatives you've considered

I understand that we can drag the bond, we can't do it very precisely.


Edited to put this irrelevant information to the bottom.

In current version, Chem4Word 2020 Beta 8, the default bond length for 1 letter elements (e.g. C,O,N) and 2 letter elements are different (e.g. Ru) image image

MikeWilliams-UK commented 4 years ago

During the drawing process, the atom label characters are positioned first such that the area occupied by the string of each of its characters (excluding any implicit H or charge characters) is centred on the atom's position. The bond lines are then drawn such that they do not enter the area of the atom character's strings thus they may be rendered to different lengths, but rest assured that the bond lengths are the same for all bonds.

In the diagram below the atom's position is shown as a red dot and the bounding area of the elements characters is shown in orange. I hope this helps you to see why when the bonds are the same length that the rendered bond may be different. The two bonds which are shown below both have a length of exactly 50.

image

MikeWilliams-UK commented 4 years ago

@deadlyvices Can you think of what would cause the bond length snapping not set the length to 50 in case of the structure @tomyan112 has drawn?

deadlyvices commented 4 years ago

No idea at all. You can drag the bond length precisely by holding down the Shift key when dragging an atom. Perhaps we should amend the adroner to give numerical length and angle feedback?

tomyan112 commented 4 years ago

During the drawing process, the atom label characters are positioned first such that the area occupied by the string of each of its characters (excluding any implicit H or charge characters) is centred on the atom's position. The bond lines are then drawn such that they do not enter the area of the atom character's strings thus they may be rendered to different lengths, but rest assured that the bond lengths are the same for all bonds.

In the diagram below the atom's position is shown as a red dot and the bounding area of the elements characters is shown in orange. I hope this helps you to see why when the bonds are the same length that the rendered bond may be different. The two bonds which are shown below both have a length of exactly 50.

image

It was actually a feature request for allowing typing the bond length like we can do with bond angle. The bond length shown here is another molecule that I drawn, not the one shown in here, sorry for the confusion.

MikeWilliams-UK commented 4 years ago

No idea at all. You can drag the bond length precisely by holding down the Shift key when dragging an atom. Perhaps we should amend the adorner to give numerical length and angle feedback?

@deadlyvices I think that adding an adorner with length and angle relative to screen north would be a very valuable addition.

deadlyvices commented 4 years ago

Or even just displaying the values in the status bar would be incredibly useful

MikeWilliams-UK commented 4 years ago

Yes that would be useful, however

I prefer an adorner as the user's "focus" is on where the mouse cursor is.