Jump to content
CreativeTim

Issue with snapping multiple points of an object

Recommended Posts

I've recently bought Affinity Designer, so I'm not really familiar with all of its tools and features yet.

I'm trying to make a logo for myself, but I ran into a problem. What I'm trying to achieve is to get the circled corner of my selection to snap the the bottom right corner of the black outlined rectangle while the width of my selection stays 110 points and the corners are all 90 degrees.

Basically, what I want is to lock the width of my selection at 110 points and grab the circled corner, rotate the selection from its origin point and have its height automatically adjusted when I make it snap to the the corner of the other rectangle. (I see I didn't had the "Enable Transform Origin" visible when I made the screenshot. It's where the corners of both the selection and the other rectangle meet in the upper left corner.)

image.thumb.png.540db35b45affdb7ccb37b67ba1380cb.png

 

I hope the issue I'm having here is clear.

 

Edited by CreativeTim

Share this post


Link to post
Share on other sites

I think this is a matter of geometry, one of the rectangles is going to have to change dimensions, either the grey one or the one you are dragging.

See my second post.


MacBook Pro (13-inch, Mid 2012) Mac OS 10.12.6 || Mac Pro (Late 2013) Mac OS 10.14.5

Affinity Designer 1.7.0 | Affinity Photo 1.7.0 | Affinity Publisher beta 1.7.0.384 | Affinity Photo beta 1.7.1.138 | Affinity Designer Beta 1.7.0.14

Share this post


Link to post
Share on other sites
3 hours ago, CreativeTim said:

I want is to lock the width of my selection at 110 points and grab the circled corner, rotate the selection from its origin point and have its height automatically adjusted when I make it snap to the the corner of the other rectangle.

This is definitely possible geometrically, but I can't yet figure out how to (accurately) draw it with the tools available in Affinity Designer!


Win7 Ultimate x64   |   i5-3570K @ 3.4GHz   |   16 GB RAM   |   120 GB SSD   |   nVidia GTX 660 Ti   |   Huion 1060 Plus

How I make GIFs >>> ScreenToGIF (Windows only, Open Source, Portable, ~600kB)

Share this post


Link to post
Share on other sites
44 minutes ago, Old Bruce said:

I think this is a matter of geometry, one of the rectangles is going to have to change dimensions, either the grey one or the one you are dragging.

The grey one should stay as is. The one that is selected should keep its width of 110 points, its height doesn't matter. The issue is, when I rotate it from the origin point on the top left I have to eyeball the right border of my selection to intersect with the corner of the black rectangle, which means they will never perfectly intersect. And when I start dragging that circled point its width is also getting changed.

When rotating the corners don't perfectly intersect.

image.png.9597261e0f013a49257aee09f6b87a49.png 

Width changes when dragging the corner.

Width changes when dragging the corner

Share this post


Link to post
Share on other sites

Again it is a matter of geometry. Euclidean. Kind of like drawing a triangle with sides of 3 and 3 and 7 units, can't be done. At least in planar geometry.

Edit Wow, Arrogance.

I think the problem can be addressed by rotating the large object not the small Fixed Width object.

Yes it is easy, You have the rough layout. Lock the Fixed Width rectangle, choose the large grey one and put its rotation centre in the top left corner then rotate manually until the opposite corner snaps on the side of the Fixed Width triangle. Copy the rotation and group the two objects and rotate the opposite to get them back in 0 degrees for the large grey rectangle. Ungroup and fix the length of the Fixed Width rectangle.


MacBook Pro (13-inch, Mid 2012) Mac OS 10.12.6 || Mac Pro (Late 2013) Mac OS 10.14.5

Affinity Designer 1.7.0 | Affinity Photo 1.7.0 | Affinity Publisher beta 1.7.0.384 | Affinity Photo beta 1.7.1.138 | Affinity Designer Beta 1.7.0.14

Share this post


Link to post
Share on other sites

I think my explanation isn't fully clear.

Imagine this: I have two rectangles with the same width perpendicular to each other with a gap in the place where they will meet each other. In this case the width of both rectangles are 200 points. I want to connect those two rectangles by putting another rectangle in between them, I can do it the way in the image below. The problem here is, I want that diagonal rectangle to be the same width as the other two: 200 points, which it is clearly not.

image.thumb.png.b09cbf4400f4161a2c88d820f743117f.png

In the image below I've added another rectangle, rotated by 45 degrees. The height doesn't matter as long as the selected rectangle has a width of 200 points and snaps to the corners of both the other rectangles.

image.thumb.png.7470e9e24bf0c182f0714719ce8d7841.png

The reason why it works here and not in the image I posted earlier is that in this case the distance between the rectangles and the point at which their centers would intersect is the same (therefore I can easily use an angle of 45 degrees to make the corners snap).

image.png.dabcbb0327739115b08c0602e5a54be5.png

In a case where their distance to the point at which their centers intersect is not the same, I can calculate the angle of the 3rd rectangle...

image.thumb.png.509a05ca03211e8b2244d75a026c318b.png    image.png.ec294ed33f902e74a56a9643f943fb96.png

...but because the angle here is a fractal number (in this case: 36.8698989...) it will never perfectly align. So I wondered if there's another way to do this.

 

(Sorry for all the pictures, but I want to make my point clear. Hope it is now.)

Share this post


Link to post
Share on other sites

What are the dimensions of the grey rectangle, what are the dimensions of the fixed width rectangle.

Or just attach the file.


MacBook Pro (13-inch, Mid 2012) Mac OS 10.12.6 || Mac Pro (Late 2013) Mac OS 10.14.5

Affinity Designer 1.7.0 | Affinity Photo 1.7.0 | Affinity Publisher beta 1.7.0.384 | Affinity Photo beta 1.7.1.138 | Affinity Designer Beta 1.7.0.14

Share this post


Link to post
Share on other sites
4 hours ago, CreativeTim said:

The dimensions of the fixed rectangle are: W: 400 pt - H: 490 pt.

The width of the rectangle should be 110 pt.

XZYTE.afdesign

Seems like you got what you wanted. Or am I missing something in the original request?


MacBook Pro (13-inch, Mid 2012) Mac OS 10.12.6 || Mac Pro (Late 2013) Mac OS 10.14.5

Affinity Designer 1.7.0 | Affinity Photo 1.7.0 | Affinity Publisher beta 1.7.0.384 | Affinity Photo beta 1.7.1.138 | Affinity Designer Beta 1.7.0.14

Share this post


Link to post
Share on other sites

You might want to consider a different way of doing this that does not involve rotating a 3rd rectangle:

  1. Using the Pen Tool, draw a line between the outside edges of the 2 rectangles
  2. Set the line's stroke width to 110 pt & its cap type to Butt (important!)
  3. With the line selected, from the Layer menu, select Expand Stroke
  4. With the Move Tool, move this new Curve shape up until its lower left edge snaps to the lower outside edge of the vertical rectangle
  5. Delete the original line created in step 1

That's what I did in this 110 pt width connect.afdesign example. The history is included so you can use the History panel slider to review each step.

Notes:

  • The Expand Stroke feature has some issues with complex curves (mostly creating lots of extra nodes) but for simple 2 node straight lines, as long as the cap type is Butt or Square it works well.
  • To simplify the final design, you can select all three shapes & use the Geometry Add function to convert them into a single shape.

Affinity Photo 1.7.0 & Affinity Designer 1.7.0; macOS High Sierra 10.13.6 iMac (27-inch, Late 2012); 2.9GHz i5 CPU; NVIDIA GeForce GTX 660M; 8GB RAM
Affinity Photo 1.7.0.135 & Affinity Designer 1.7.0.9 for iPad; 6th Generation iPad 32 GB; Apple Pencil; iOS 12.3.1

Share this post


Link to post
Share on other sites
16 hours ago, Old Bruce said:

the problem can be addressed by rotating the large object not the small Fixed Width object

Yes! That is the easy solution. Congratulations :)

Here is a slightly refined(?) version of your solution…

  1. Draw the wide rectangle.
  2. Draw the thin rectangle.
    Ensure that it is longer than you need.
    And that it is centered over the wide rectangle.
  3. Select the wide rectangle
    With the Point Transform Tool, hold Ctrl to rotate only, until the corner snaps to the thin rectangle.
  4. Select the thin rectangle, and shrink it vertically (holding Ctrl for symmetry) until it snaps to the wide rectangle.
  5. Nest the thin rectangle inside the wide rectangle.
  6. Finally, rotate the wide rectangle back to horizontal, before un-nesting the thin rectangle.

1861333545_AffinityRectangleQuery.gif.ab241244a33d2ccbbe659e2978a033ae.gif


Win7 Ultimate x64   |   i5-3570K @ 3.4GHz   |   16 GB RAM   |   120 GB SSD   |   nVidia GTX 660 Ti   |   Huion 1060 Plus

How I make GIFs >>> ScreenToGIF (Windows only, Open Source, Portable, ~600kB)

Share this post


Link to post
Share on other sites
1 hour ago, Aammppaa said:

Here is a slightly refined(?) version of your solution…

Can't recall enough of my geometry to know if your solution is different or refined. I am glad you solved it and would like to apologize for my high handed attitude brought about by not really reading your (well stated) initial post. My brain became seized by a wrong assumption hence my ignorant insistence that it "can't be done"


MacBook Pro (13-inch, Mid 2012) Mac OS 10.12.6 || Mac Pro (Late 2013) Mac OS 10.14.5

Affinity Designer 1.7.0 | Affinity Photo 1.7.0 | Affinity Publisher beta 1.7.0.384 | Affinity Photo beta 1.7.1.138 | Affinity Designer Beta 1.7.0.14

Share this post


Link to post
Share on other sites

I appreciate you all taking the time to help me.

I found Aammppaa's solution to work best. The corners align perfectly. As for R C-R's I can see how you managed to do it (thanks for the "History"-tab tip), but the corners don't perfectly align. I tried to replicate it to see if it was accidentally shifted, but it seems that it's a bug in the software itself (I think). As you can see the selected line was my initial line I made with the Pen Tool (I am zoomed in a ridiculous amount by the way). Also used the Butt Cap as you mentioned.

image.png.832f3d94458f67b77850d225b20297d9.png

Besides, Aammppaa, can you tell me how managed to make such a nice gif? Looks a lot better and easier to understand than the tons of images I used.

 

5 hours ago, Old Bruce said:

[...] and would like to apologize for my high handed attitude brought about by not really reading your (well stated) initial post.

Old Bruco, no worries, and thank you for trying to help me out.

 

(One more question: I noticed how you can use @[name] to address to a specific person, is it okay to use in general posts on this forum or is that too direct? I have no idea, I'm totally new to this, so that's why I'm asking.)

Share this post


Link to post
Share on other sites

It will get the person's attention through a notification. I use it to do that, the moderators are busy people so use it only if they have asked you a direct question or made a request of you. Between you and I or other members of the forum I would use it if I thought there was something important for you to see. I will also use it if people ask a question and they are in a far away time zone and might miss my reply in the forum due to the time difference.

I'd say if it isn't urgent (or a reply to a direct question/request) really think for a bit if you want to 'bother' the person (not a bother here).


MacBook Pro (13-inch, Mid 2012) Mac OS 10.12.6 || Mac Pro (Late 2013) Mac OS 10.14.5

Affinity Designer 1.7.0 | Affinity Photo 1.7.0 | Affinity Publisher beta 1.7.0.384 | Affinity Photo beta 1.7.1.138 | Affinity Designer Beta 1.7.0.14

Share this post


Link to post
Share on other sites

I use ScreenToGIF for making GIFs - link in my signature (no affiliation, just like the tool).

It is Windows only, but tiny, portable, and easy to edit the GIF down to just show the bits where I don't make mistakes!

And thanks for posing such an interesting query, was fun to puzzle out the easiest way to draw it.


Win7 Ultimate x64   |   i5-3570K @ 3.4GHz   |   16 GB RAM   |   120 GB SSD   |   nVidia GTX 660 Ti   |   Huion 1060 Plus

How I make GIFs >>> ScreenToGIF (Windows only, Open Source, Portable, ~600kB)

Share this post


Link to post
Share on other sites
4 hours ago, CreativeTim said:

As for R C-R's I can see how you managed to do it (thanks for the "History"-tab tip), but the corners don't perfectly align. I tried to replicate it to see if it was accidentally shifted, but it seems that it's a bug in the software itself (I think).

Good catch! I doubt I ever would have noticed that if you had not mentioned it.

It does seem to be a bug in the app, & I think it is somewhere in the snapping precision implementation (not in the Expand Stroke one) because even after I convert the 2 other rectangles to curves & try to snap the expanded stroke object to an edge node of the other two shapes, at ridiculously high zoom levels it very clearly snaps to a point slightly offset from the nearest node, just like shown in your screenshot.

You probably should report this in the bugs forums.


Affinity Photo 1.7.0 & Affinity Designer 1.7.0; macOS High Sierra 10.13.6 iMac (27-inch, Late 2012); 2.9GHz i5 CPU; NVIDIA GeForce GTX 660M; 8GB RAM
Affinity Photo 1.7.0.135 & Affinity Designer 1.7.0.9 for iPad; 6th Generation iPad 32 GB; Apple Pencil; iOS 12.3.1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×