Aligning two edges - your ideas

Hi,

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.

http://farm3.static.flickr.com/2160/2347936507_b1631ed759_o.jpg

http://farm4.static.flickr.com/3120/2348768772_a795a59345_o.jpg

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.

Tibor

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.

example:
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]

Tibor

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.

Attachments



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

http://www.fourmadmen.com/blender/scripts/4mm_edge_intersection.html

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
Salutations

Thanks for your input, guys.

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

http://farm3.static.flickr.com/2039/2349645619_e555e699a8_o.jpg

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

http://farm3.static.flickr.com/2209/2350478906_2a3ddf5ccc_o.jpg

  • Shift-S/Cursor to Selection:

http://farm3.static.flickr.com/2240/2349645751_f206d63404_o.jpg

  • 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

http://farm3.static.flickr.com/2150/2349645787_b8728ff608_o.jpg

  • 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.

http://farm3.static.flickr.com/2033/2349645827_417740ba79_o.jpg

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

http://farm3.static.flickr.com/2075/2350479082_8171361850_o.jpg

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

http://farm3.static.flickr.com/2262/2349645881_80bbd8ee4a_o.jpg

  • 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.

http://farm3.static.flickr.com/2239/2350479160_2a5ba9f716_o.jpg

http://farm3.static.flickr.com/2088/2349645977_128180c05f_o.jpg

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

Tibor

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:

Tibor

TFuto, your method is good!

Maybe the following method is simpler?

Preview:
http://www.youtube.com/watch?v=zIFsKPF--xM
Download:
http://files.filefront.com/glueavi/;9863943;/fileinfo.html

Of course it can be refined further.

Here is the method based on two faces:

Preview:


Download:
http://files.filefront.com/gluefavi/;9866347;/fileinfo.html

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

http://pages.videotron.com/innocent/new_commits_01_27_07.htm

here is my offering

http://jstar.jalbum.net/blender%20align%20edges/