Change depth of atom while drawing it

Had an idea that I think would be very useful, would welcome your thoughts.

Currently, when a new bond + atom is created by clicking and dragging, both are always in the same plane as the atom that is started from.

This means creating non-flat 3D structures can take a while as you first have to create the new bond + atom, then rotate the view, then move the atom with the Manipulation Tool.

How about if scrolling with the mouse wheel during the drag action changed the depth of the new atom and either pushed it away or pulled it towards you? I.e. moving the mouse changes x/y, while scrolling changes z (relative to screen).

It would mirror the way the mouse works for navigation and feel very natural, in my opinion.

Equally, when a free atom is created, it is created within the plane parallel to the screen that includes the origin. As far as I can tell, this is the case regardless of the zoom level. This makes placing e.g. an ion relative to the rest of a molecule somewhat tedious, especially if it is e.g. NH4 and the hydrogen atoms don’t move with the nitrogen when using the Manipulation Tool.

A way to make this easier would be to allow the user to adjust the “depth” of an atom during drawing in a way analogous to the above: if the user left-clicks to create the atom but holds the left button down instead of releasing, and then scrolls with the mouse wheel, the depth could change.

I don’t think I’m adept enough to do that particular action, but certainly it could be added … you’d just need to make some changes in the editor.cpp code to tweak the position as the scroll wheel adjusts.

1 Like

Perhaps it will be unwieldy, hard to know without trying it out. I’ll see if I can make it work.