Mobile app version of vmapp.org
Login or Join
Moriarity648

: Sketch 3 align shapes perfectly 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

@Moriarity648

Posted in: #SketchApp

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


But, upon closer inspection they are not joined together


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.

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Moriarity648

2 Comments

Sorted by latest first Latest Oldest Best

 

@Hamaas979

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



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.



Move them so they’re next to each other

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



Group and rotate



The result has perfect edge blending.

10% popularity Vote Up Vote Down


 

@Gloria351

Here is my solution.

For instance you want to come up with the following shape:


Let's create rectangle:


Now duplicate the layer by pressing Cmd + D:


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


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


Rotate that shape by your mouse for 90+45=135 degree:


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:


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


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:


And voila:


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.


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


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


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

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme