Aligning two edges - your ideas


could someone help me with this, please?

I would like to do the following: I have two rectangles, separated, completely misoriented, and then I choose one edge on each rectangle, and want to move and rotate only one rectangle so that one edge of one of the rectangles is aligned to an edge of the other rectangle. The rectangles are not aligned on the axes, not global or local. So this is the start position.

[ To clarify: I wrote rectangles because that was the easiest to create, and it is easy to see if they got somehow messed up. Of course, a good alignment method would not care about the shape of the two mesh. Could be two triangles, or you can imagine two free paths with one edge each that has the same size, and the alignment method should work on that, too.]

(I am just practicing and trying to find workable solutions to help more complex modeling tasks)

Here is a “before” and “after” screenshot I would like to accomplish. For now, the end orientation of the moved/rotated rectangle does not count, just the perfect edge alignment. Please note, the moved rectangle’s shape does not change.

I have checked the numerous workarounds to do this, but they are extremely long, and also not precise. (Seen select vertex - snap to - center cursor - add empty etc, also KlopUtils - can’t make it work right).

I think the closest to the solution would be to snap one corners to another corner, then turntable-rotate one of the rectangles around that vertex so that the edges get aligned. However, I could not make this work. I thought that the hairline shown during rotation or the (mouse) cursor location when starting the rotation does count, but I could not figure how to do this precise rotation. Could not figure out how to use snap for this as well.

Thanks for any advices or solutions.


I’m not sure what exactly you are asking, but here are a few tools that may help.

shift>s - cursor selection/selection cursor

During scale/rotate/move use ctrl to snap and shift to do precise movements

“.” key: rotate around cursor.

x/y/z keys: align to axis.

2 rectangles aligned at one edge. select the 4 aligned verts (2 edges). shift+s cursor selection. press period. hit r than y (or x or z).

Pseudonym: thanks for your advice, but I think I was unclear.

[Made the problem description more precise in the initial post]


One method:

  • Turn on edge lengths and highlight rectangles. Make a note of the length of the edge that is perpendicular to the joining edge.
  • Highlight one rectangle (the “to” rectangle). Press SHIFT-V and align the view to the front.
  • In face mode, extrude the selected face down (or up) the length noted for the side. Still in face mode, delete the center set of faces.You now have the target vertices. In vertex mode, select the “from” and “to” vertices one at a time and join them with ALT-M To Last.

In a hurry, if this is confusing I’ll explain in more detail later.


Hi g60, thanks for the tip. I have completed (I guess) what you described. Unfortunately this is not what I would like to do, as in your last step the original rectangle gets distorted. I got a screen similar to your last screenshot. That object is not even a rectangle. Moreover, I do not understand why you extruded the face. Could you please check that you are trying to solve the problem I described above? If so, please help me understand your solution.

Thanks, Tibor

[Written some more clarification into the original problem description.]

The last image in my image set shows 2 vertices merged, the 3rd selected prior to merge, and the 4th undone. I don’t think it really solves your problem. [ I extruded the face because that allows me to extrude along the face’s normal, i.e., I don’t have to worry about the plane’s orientation in 3D space. All I really cared about were the 2 target vertices that I could use for merging (and those formed the shape of the misaligned rectangle anyway.) ]

It sounds like you want to align 2 arbitrary objects. I’d be intellectually interested in hearing a solution to that problem; in reality I have not encountered the issue or, at least, have not encountered it with such a complex object that I couldn’t recreate the misaligned object.

i think this script should do what your asking for

but i tried it and i’m not certain how to use it
anybody can help to make it work properly
are the two planes jointed and then you select 2 edges ?

i do see new edge being created but what does it ahve to do with intersection?

must also be in edge mode i guess

Thanks for your input, guys.

Sofar I have the following solution, based on CD38’s description for face alignment I found elsewhere.

  • Select first rectangle/Edit mode/Select two vertices:

  • Shift-S/Cursor to Selection:

  • Shift-V/Align selected to top
  • Object mode/Center Cursor
  • Add/Empty
  • Now if you turn the view, you will see that the Empty’s Z is aligned to the edge

  • Repeat the above for the second rectangle.

  • Select a rectangle, then its Empty/ Ctrl-P (parent the rectangle to the empty)

  • Repeat for the other rectangle.

  • Select the two Empties, Ctrl-C/Rotation, and the direction of the two edges are correct:

  • Ctrl-C/Location, and they will be perfectly aligned.

  • Select a rectangle, Clear Parent (Alt-P)/Clear and Keep Transformation. Do the same for the other rectangle.
  • Select the two Empties, and delete them.

Now, the question is, can it be done in a SIMPLER way? :slight_smile:


What, that’s not simple? :wink:

I haven’t yet found another way to align precisely edges on two arbitrarily oriented objects. Although I would be surprised if there isn’t a script out there somewhere.

Oh, I am sorry, maybe it is TOO simple for my engineer mind ;-). Thanks for your method.

Actually I could script this myself I guess, but since I am learning Blender I did not want to get my sleeves dirty with the internals yet. :slight_smile:


TFuto, your method is good!

Maybe the following method is simpler?


Of course it can be refined further.

Here is the method based on two faces:



This is a year later and it is probably bad protocol to revive this thread.

But Blender tools have grown so amazingly that I thought it would be appropriate to show a really neat 2.48 method to solve this puzzle.

Following this demo by IamInnocent

here is my offering