4

I am trying to join 2, of the same, symmetrical shapes with each other on a 45° angle. This comes down to joining 2 rectangles.

At first glance the 2 shapes look perfectly joined and aligned but when i zoom in to pixel level they overlap or don't join at all.

Can you guys help me resolve this issue?

Thanks in advance!

Cheers!


Thanks for the replies! And the Photo's! I realize I was not clear enough.... I want to join them along the sides. Here are pictures of the process:

At first glance the shapes look perfectly joined enter image description here

But, upon closer inspection they are not joined together enter image description here

I can only add 2 pictures. Need more rep! When I try to move one of the shapes closer to each other they start to overlap. It's either that or they don't join at all.

1

2 Answers 2

1

Here is my solution.

For instance you want to come up with the following shape:
enter image description here

Let's create rectangle:
enter image description here

Now duplicate the layer by pressing Cmd + D:
enter image description here

Press Rotate button on upper toolbox, you will notice small cross in the center of the shape:
enter image description here

Move that cross exactly to lower right corner of the shape, you can zoom in for precise position:
enter image description here

Rotate that shape by your mouse for 90+45=135 degree:
enter image description here

You have two identical shapes with 45 degree between them.
To make sure that shapes are properly aligned you can select the first one, press Edit on toolbox, select lower right circle and check it's position:
enter image description here

Select the second shape, enabel Edit mode, select lower left circle and you will see the same position as the previous one:
enter image description here

If you want this shapes to be horizontally aligned, group them by selecting shapes and pressing Cmd + G, then enter 45/2=22.5 degree in the Transform field:
enter image description here

And voila:
enter image description here

Second part

If you want align by sides of the shapes, here is the instruction:
Create first shape, in my case: rectangle 100px by 100px at x=0 and y=0 coordinates.
enter image description here

Then duplicate layer and move it exactly the same pixels as the width of the shape, 100px in my case:
enter image description here

After group these shapes, select the group and and enter 45 degrees ant Rotate field in Inspector view:
enter image description here

As you can see there is no gap between the shapes even at maximum zoom:
enter image description here

1
  • Thanks! This method seams to work on simple shapes. But, when I want to join 2 similar complex shapes, made with multiple objects and layers, I get the same problem.... They do not joint perfectly or not at all. Am I missing something?
    – SolidCake
    Commented Sep 29, 2015 at 7:59
0

The issue relates more to shape antialiasing than alignment. The shapes could be perfectly aligned, but an edge will still show. The only real solution is to extend the shape underneath a little.

Draw the squares

enter image description here

Extend the shape that’s behind

The offset needs to be at least 2px to cover the 1px for each object’s shape antialiasing. If you plan on scaling the objects (via a symbol or using other methods), it’ll need to be even bigger.

enter image description here

Move them so they’re next to each other

Using known sizes and typing the offset into the inspector helps get this correct.

enter image description here

Group and rotate

enter image description here

The result has perfect edge blending.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.