I would like to emulate a similar feature in softwares like Autodesk CAD, Sketchup, Rhino.
I'm using blender v2.81a and I want to rotate an object by referencing two points. Like in the picture, I would like to rotate the box on the left by cliking one of its vertices (p1) and then clicking a vertex of another object(p2) to perfectly align the edges of the two objects.