I want to align two objects with Blender because for whatever reasons, the head was exported by another program in random orientation. I can easily generate two edge lists which perfectly fit. Knowing the edge lists it should be possible to calculate a the correct orientation of the head, right?
This is my workflow for aligning objects that are accuratelly separated but rotated randomly. The tutorial seems to be complicated but it is actually quite quick method (if you remember how to do it :) and accurate. Unfortunately I don't know about any addon that would do that automatically.
I will demonstrate it on an example with Suzanne model so warning - this tutorial contains drastical images.
The whole idea is to rotate the model gradually by using 3 common vertices.
No we need to find common vertex pair and snap objects there
- set Snap target to Active (remember, the active vertex / edge / face is the one selected the last)
- set Snap Element to Vertex CtrlShiftTab
- select the object you are going to fiddle with (it is the top part in our example), switch into Edit mode Tab, then Select All A and select the vertex you are going to use for the snap (now it is the active one)
- enable Snapping ShiftTab or you can always hold Ctrl while grabbing instead
- grab G the mesh while holding Ctrl and move it / snap it to the same positioned vertex in the second model
- set Pivot point to 3D cursor .
- make sure you have the common vertex selected and move Cursor to Active ShiftS
- select whole model and then a vertex on the same edge as previously snapped vertex (so it is active now)
- press R and then X to rotate around X and snap it to corresponding vertex on the second model, repeat this for Y & Z axes (after that, double-check the mesh doesn't rotate anymore on any of these axes so it is aligned perfectly)
When we have the common edge, we can rotate model around it to make the fit complete
- Pivot Point to Active Element
- Transform Orientation to Normal
- Snap Target to Closest
- turn off snapping ShiftTab
- select whole mesh A and ...
- select the edge between our previously aligned vertices as last (so it is active)
- rotate the mesh around normal Y axe by pressing RYY so it roughly fits the other model
- turn on snapping ShiftTab and use the same rotation method as in the previous step, now it will (hopefully) snap perfectly
If you are about to join the objects (by selecting them and pressing CtrlJ), don't forget to go into Edit Mode Tab, select all A and Remove Doubles by W > Remove Doubles to merge the common vertices.