# How do I perfectly align two angled shapes at a specific edge in Illustrator?

I have this basically:

Essentially I have a 9-sided shape and a triangle. I want to place the triangle on the side of the 9-sided shape. The triangle is slightly too large, slightly at the wrong angle, and slightly at the wrong position. I don't want to have to whip out a calculator and try and mathematically figure this out. I would simply like to "snap to shape" sort of thing. How can I accomplish this?

It's not clear why you want to place a certain non-fitting triangle and not to make a new exactly fitting or edit the bigger shape to the wanted form.

But that's not the question. For an answer see the next image:

1. The green shape must be deformed and placed to fit. Let's assume its sides must continue the the sides of the blue shape and it must fit exactly. I cannot draw a new shape because the green one has infinite sentimental value for me, it's the first green triangle to where I succeeded to make a round hole.

2. With Smart guides and Snap to point =ON I drew two red lines which exactly are on the sides of the blue shape

3. I selected the lines one by one and stretched the upper corners by holding Shift at the same time until the lines crossed

4. I selected the corners of the green shape one by one with the direct selection tool (=the white arrow) and dragged them to their right places. They snapped perfectly.

The result after deleting the red lines:

If you can discard the non-fitting triangle, you can still use the red lines method to find the apparent intersection. The empty space between the lines can be filled exactly with the Shape Builder or by inserting an anchor point to the edge of the blue shape and dragging it to the intersection.

First align the shapes then resize the triangle to fit:

Align the corner of the triangle and shape where you know they will meet:

Zoom all the way in and place the triangle corner node precisely on the shape corner node.

Zoom out, select the triangle, select the rotate tool and click right on the triangle corner node that you placed. That places the point of rotation on the corner of the triangle. Click+Drag the other triangle corner on the side next to shape until the triangle edge aligns with shape edge.

Resize triangle: this will take some trial and error. Select triangle and scale while holding Shift until the side length matches shape side length. The resizing will move the triangle away a little bit so zoom all the way in and move it back into place. Alternately to scale the triangle using % select the triangle and open Object>Transform>Scale and enter percentages. Undo and redo until size is right then move triangle back into place.