I have a complex mesh. I need rotate mesh along some axis (x,y,z never mind) to line-up 2 points of this mesh. I don't need align points (S,Z,0), i need align mesh. Of course i can move pivot to vertex 1 and visually rotate until vertex 2 will be on my desired axe. But i want to keep original pivot and precisely rotate mesh. See the picture.
TeeTrinker is right: have you tried using the 3D cursor as the "Transform Pivot Point"? Snapping to other geometry does not work in this mode, so if you need absolute precision, I would recommend an add-on like Mesh Align Plus. It has many alignment options, but the one you are looking for in it is "Quick Align Lines". Keep in mind there are far more advanced options that may save you time later on.
Using Mesh Align Plus add-on, here's what I did to achieve the rotation you described:
- Create a new plane mesh object with a side aligned to the final upright green line orientation you showed in your image.
- Select this new plane, entered Edit Mode, select the edge representing the green line, Mesh Align Plus>Quick Align Lines>Grab Destination. Exit Edit Mode.
- Select your plane you want to rotate. Enter Edit mode. Select vertex 1 and vertex 2 like you show in your picture. Exit Edit Mode. Mesh Align Plus>Quick Align Lines>Apply to: "Object".
One simple solution is to create an empty and parent the object to it. Then rotate the empty any way you like. You can easily get the original rotation back by resetting the rotation of the empty.
You can go a tiny bit more complicated by using a Copy Rotation Constraint.
- Create an empty.
- Create a Copy Rotation Constraint on the object to the empty.
- Rotate the empty. Now you can easily switch the constraint on and off, which might be useful for exporting the model to your 3d scanning software for further processing.
To do this perfectly precisely (which is rarely necessary, eyeballing the two verts to align in and ortho view is almost always good enough):
In edit mode, select the two vertices. If one does not already exist, create an edge between them ('f' for me.) Create a custom orientation (ctrl alt space for me.) Delete any edge you've created. If you're worried about your original geometry, you can duplicate these verts to a new object and work there instead.
You now have a custom orientation where the Y axis corresponds to the line between those two vertices. You can rotate and constrain to Y ('r', 'y', move mouse, 'enter' confirm) to rotate in this axis.