Jump to content

Snap Object Center to Node


Recommended Posts

If you "convert to curves" the circle shape.  Use the node tool, making sure the at least the first 3 icons are selected in the Snap toolbar.

1398349353_ScreenShot2020-09-17at5_14_24AM.png.3984f2cd8cb6402850ed6aaf80a17e6f.png

Then select the layers of the circle and the line (in the layer panel).  Then select the 4 nodes of the circle, but not the node in the line.  Now if you drag the circle, it will snap to the line's node.

iMac (27-inch, Late 2009) with macOS Sierra

Link to comment
Share on other sites

Manually: Transform panel, Anchor point selector to Center, set X, Y to Node position.

Affinity Store (MSI/EXE): Affinity Suite (ADe, APh, APu) 2.5.5.2636 (Retail)
Dell OptiPlex 7060, i5-8500 3.00 GHz, 16 GB, Intel UHD Graphics 630, Dell P2417H 1920 x 1080, Windows 11 Pro, Version 23H2, Build 22631.4317.
Dell Latitude E5570, i5-6440HQ 2.60 GHz, 8 GB, Intel HD Graphics 530, 1920 x 1080, Windows 11 Pro, Version 23H2, Build 22631.4317.
Intel NUC5PGYH, Pentium N3700 2.40 GHz, 8 GB, Intel HD Graphics, EIZO EV2456 1920 x 1200, Windows 10 Pro, Version 21H1, Build 19043.2130.

Link to comment
Share on other sites

An alternative to the advice above, in Designer only, is to use the Point Transform Tool.
Select the tool and then drag the layer over to where the node is.
If you have the right snapping options set to ON then the dragged layer should snap to the node.
(See attached video which was recorded with the latest beta but it should work in the latest commercial release too.)

Link to comment
Share on other sites

Using guides...

With the Node tool selected, in the context toolbar, select Align to nodes of selected curves (the left-hand button next to Snap):

1833995084_Screenshot2020-09-17at14_07_39.png.bc68bedc84b4e7c5b78eea37689967cb.png

Ensure snapping is on.

Select the node with the Node tool

Drag a vertical guide from the left margin to snap to the node.

Drag a horizontal guide from the top margin to snap to the node

Snap the circle to the guides.

Hope it helps!

 

 

 

Edited by h_d
Additional screenshot & detail

Affinity Photo 2.5.3,  Affinity Designer 2.5.3, Affinity Publisher 2.5.3, Mac OSX 14.5, 2018 MacBook Pro 15" Intel.

Link to comment
Share on other sites

I am a bit confused by the various suggestions – like the OP I also would expect the circle center to be able to snap to a specific node, entirely without the need for a workaround, at least as far I understand the snapping options "mid points", "key points" and "geometry".

It seems quite strange that the circle's center doesn't snap to the node of the line – whereas vice versa the node snaps easily to the circle's center. Feels like a bug to me.

 

macOS 10.14.6 | MacBookPro Retina 15" | Eizo 27" | Affinity V1

Link to comment
Share on other sites

1 hour ago, thomaso said:

It seems quite strange that the circle's center doesn't snap to the node of the line – whereas vice versa the node snaps easily to the circle's center.

I think - may be wrong - that it's because the node isn't in the centre of the curve, but an arbitrary point on the curve.

694534435_Screenshot2020-09-17at17_05_39.png.de67586eb21200b226ce2bc683fa3f5a.png

If the curve is selected (using the Move tool, as above), then the node is not defined by the bounding box. But even if the node is selected (using the Node tool), you can't move the circle without de-selecting the node. "Align to nodes of selected curves" no longer applies, and there's nothing in snapping prefs that you can snap to:

1324264722_Screenshot2020-09-17at17_06_20.png.92fdadea839ecc0d6ac423a36eb1d72b.png

The node is not part of the bounding box, it's not a bounding box mid point, it's not a shape key point (because the curve isn't a shape). Is it part of the object geometry? I don't think so, because it's an arbitrary point. (That's why you can snap the node to the centre of the circle - the centre is an element of the object geometry.)

But you can snap to guides - hence my original suggestion.

Is it a bug? I'm not convinced.

 

 

 

Affinity Photo 2.5.3,  Affinity Designer 2.5.3, Affinity Publisher 2.5.3, Mac OSX 14.5, 2018 MacBook Pro 15" Intel.

Link to comment
Share on other sites

7 hours ago, h_d said:

The node is not part of the bounding box, it's not a bounding box mid point, it's not a shape key point (because the curve isn't a shape). Is it part of the object geometry? I don't think so, because it's an arbitrary point.

The node isn't an "arbitrary" point but a very specific, which makes it being a node at all. In my understanding all other positions on this line (or curve) are arbitrary, but nodes aren't.

What makes me feel this as bug is the fact that this node IS able to snap/attract another item – but just not the circle's center (geometry): The fact that your workaround with guides does work (because guides do snap to this node) and also @GarryP's workaround with the transform origin (which does snap to this node) makes obvious that this specific node is able to cause snapping. (and is not an arbitrary point this way).

So, because...
1. the circle's center is a position of the circle's geometry, and
2. this node IS able to cause snapping
... it's weird that the combination of 1. + 2. doesn't work with each other in one way but in the other only.

But my concern is not especially about this certain combination of circle-center & line-node but rather nodes in general which obviously are able to snap by themselfs AND to cause snapping of others, but seem to do the latter with layer objects only if their position is congruent with certain geometry spots (bounding box nodes + center), although they do snap on any position (arbitrary!) on a curve, like here along the entire ellipse:

 

macOS 10.14.6 | MacBookPro Retina 15" | Eizo 27" | Affinity V1

Link to comment
Share on other sites

5 hours ago, h_d said:

The node is not part of the bounding box, it's not a bounding box mid point, it's not a shape key point (because the curve isn't a shape). Is it part of the object geometry? I don't think so, because it's an arbitrary point. (That's why you can snap the node to the centre of the circle - the centre is an element of the object geometry.)

I think you have this right. Even if you broaden the interpretation of "shape" to include lines & curves as well as quick shapes, their key points are the 9 points of the geometry of their selection boxes (the 8 along the edges & the center). So unless a node is located at one of those points the circle won't snap to it.

All 3 1.10.8, & all 3 V2.5.5 Mac apps; 2020 iMac 27"; 3.8GHz i7, Radeon Pro 5700, 32GB RAM; macOS 10.15.7
A
ll 3 V2 apps for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 15.7

Link to comment
Share on other sites

6 minutes ago, thomaso said:

The node isn't an "arbitrary" point but a very specific, which makes it being a node at all.

A node defines a specific point on a curve but that does not necessarily make it a key point of that curve.

For example, consider the selected node of this curve:

1963463819_3nodecurve.jpg.978164cddd7d29b0d29e9ef99eb30047.jpg

It is neither at the center or on any of the edges of the curve's selection box. Thus, it is not a key point of that curve.

All 3 1.10.8, & all 3 V2.5.5 Mac apps; 2020 iMac 27"; 3.8GHz i7, Radeon Pro 5700, 32GB RAM; macOS 10.15.7
A
ll 3 V2 apps for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 15.7

Link to comment
Share on other sites

1 hour ago, R C-R said:

Thus, it is not a key point of that curve.

So what? – Being a "Key point" obviously isn't mandatory for a node to snap or cause snapping. Thus, the "key point" doesn't make a point here. See above ...

(btw.: in my understanding it definitely is a key point: it is a mandatory key to describe the curve. A key point doesn't have to be 1 of the 9 points of its curve's bounding box.)

macOS 10.14.6 | MacBookPro Retina 15" | Eizo 27" | Affinity V1

Link to comment
Share on other sites

6 hours ago, thomaso said:

So what? – Being a "Key point" obviously isn't mandatory for a node to snap or cause snapping. Thus, the "key point" doesn't make a point here. See above ...

(btw.: in my understanding it definitely is a key point: it is a mandatory key to describe the curve. A key point doesn't have to be 1 of the 9 points of its curve's bounding box.)

Your understanding of what constitutes a key point for the "Snap to shape key points" snapping option is incorrect.

While you are correct that nodes are necessary to define the shape of a curve object, that does not automatically make them key points of that object. For example, consider the curve in my post above. The selected node is not positioned at any point along its upper edge. That is why with that snapping option enabled you can snap a key point of another object (which may not even be a shape defined by nodes but instead as a quick shape) to anywhere along a straight line that runs along the upper edge of that curve's selection box (as shown by the red snapping indicator line).

IOW, that line runs through a key point of the geometry of the object, that being the unique point where it reaches its maximum upper extent, independently of whatever type of object it may be.

All 3 1.10.8, & all 3 V2.5.5 Mac apps; 2020 iMac 27"; 3.8GHz i7, Radeon Pro 5700, 32GB RAM; macOS 10.15.7
A
ll 3 V2 apps for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 15.7

Link to comment
Share on other sites

The bounding box describes an object's overall size, shape and position on the page. In the case of the circle, the centre is by definition aligned to the mid-points of the bounding box, thus making it an easily calculated snapping target. The position of the node on the curve bears no relationship to the shape, size or position of the bounding box. In this sense its position is arbitrary: its position cannot be derived from any element of the bounding box, and it can only be a snapping target when it is selected. 

Affinity Photo 2.5.3,  Affinity Designer 2.5.3, Affinity Publisher 2.5.3, Mac OSX 14.5, 2018 MacBook Pro 15" Intel.

Link to comment
Share on other sites

1 hour ago, R C-R said:

Your understanding of what constitutes a key point for the "Snap to shape key points" snapping option is incorrect.

1 hour ago, h_d said:

The position of the node on the curve bears no relationship to the shape, size or position of the bounding box. In this sense its position is arbitrary: its position cannot be derived from any element of the bounding box, and it can only be a snapping target when it is selected. 

You both seem to define nodes as "key points" only + always as being congruent to the selection box handles.
And, additionally, a key point in your understanding doesn't have to be a node, too. – Right?

– Can you link me to an Affinity definition of "key point"?

I searched in the Affinity help but didn't find its definition – that makes me suppose a more general, not particularly Affinity related understanding, commonly used for (bezier) animation and the term "key frame", which uses "key" only for those which are relevant to describe a change (e.g. of an angle, as in a curve, + start/end points) and calls others "intermediate", as illustrated here:

1799615618_keypoints.jpg.7a34d597b43636d6b83ed4166462e189.jpg

501376759_keypoints2.jpg.6e00a843de8115a3e1009f92fd5597e7.jpg

macOS 10.14.6 | MacBookPro Retina 15" | Eizo 27" | Affinity V1

Link to comment
Share on other sites

On further reflection I don't think the node snaps to the centre of the circle at all.

I think it snaps to the intersection of the horizontal and vertical lines passing through the mid-points of the circle's bounding box. Which just happen to be the centre of the circle.

 

Affinity Photo 2.5.3,  Affinity Designer 2.5.3, Affinity Publisher 2.5.3, Mac OSX 14.5, 2018 MacBook Pro 15" Intel.

Link to comment
Share on other sites

43 minutes ago, thomaso said:

And, additionally, a key point in your understanding doesn't have to be a node, too. – Right?

As I understand it, in the context of the "Snap to shape key points" snapping option, a key point is either the geometric center of the object or any of the points of its maximum or minimum extent on the canvas, all of which are geometrically unique regardless of the object type & coincide with the handles of the object's bounding box (because that is how the bounding box is defined).

That context has nothing to do with animation or interpolation or the like, only with that specific snapping option.

34 minutes ago, h_d said:

On further reflection I don't think the node snaps to the centre of the circle at all.

I think it snaps to the intersection of the horizontal and vertical lines passing through the mid-points of the circle's bounding box. Which just happen to be the centre of the circle.

Isn't that the same thing?

All 3 1.10.8, & all 3 V2.5.5 Mac apps; 2020 iMac 27"; 3.8GHz i7, Radeon Pro 5700, 32GB RAM; macOS 10.15.7
A
ll 3 V2 apps for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 15.7

Link to comment
Share on other sites

1 hour ago, thomaso said:

Can you link me to an Affinity definition of "key point"?

I can link you to an Affinity example:

  • Snap to shape key points—when checked, objects can be aligned to key points on shapes, such as the start and end of a rounded corner.

That's from Help-Snapping-Snapping options.

I presume those are the points labelled "7" below:

771950685_Screenshot2020-09-18at11_21_08.png.da1a2b3322c8a6958a0ba170261dc172.png

They're not nodes on a curve, they're points on a shape.

 

 

Affinity Photo 2.5.3,  Affinity Designer 2.5.3, Affinity Publisher 2.5.3, Mac OSX 14.5, 2018 MacBook Pro 15" Intel.

Link to comment
Share on other sites

5 minutes ago, R C-R said:

Isn't that the same thing?

Yes, but I don't think the centre of the circle as such is explicitly defined in the software. I'm not absolutely certain though.

Affinity Photo 2.5.3,  Affinity Designer 2.5.3, Affinity Publisher 2.5.3, Mac OSX 14.5, 2018 MacBook Pro 15" Intel.

Link to comment
Share on other sites

33 minutes ago, R C-R said:

As I understand it, in the context of the "Snap to shape key points" snapping option, a key point is either the geometric center of the object or any of the points of its maximum or minimum extent on the canvas, all of which are geometrically unique regardless of the object type & coincide with the handles of the object's bounding box (because that is how the bounding box is defined).

Do you mean that "key points" actually aren't nodes in the curve but rather positions on the always rectangular bounding box (incl. mid point) only?
And, when they appear to be nodes, then it's only because key point and node have the same position (as in the center of the circle) and thus coincidental?

Correct?

Again, where do you get this understanding from? Did you find any Serif/Affinity definition or description – or is it rather conclusions from visual observations of the app behaviour?
 

33 minutes ago, R C-R said:

Isn't that the same thing?

For the initial question of this thread @h_d's hint is indeed the same and therefore irrelevant. But generally it is right of course, whereas objects often have more than one center or mid point (which actually would require to define which in particular you are talking about). It gets more obvious with non-symmetrical curves, e.g. spiral or triangle, and this also makes it probable that this kind of centers aren't calculated ("known") by the app at all.

1402236018_centerpoints.jpg.1093524303c15dbabeb55f0983a93cd1.jpg

 

macOS 10.14.6 | MacBookPro Retina 15" | Eizo 27" | Affinity V1

Link to comment
Share on other sites

2 minutes ago, thomaso said:

Again, where do you get this understanding from? Did you find any Serif/Affinity definition or description – or is it rather conclusions from observations and experiences?

It is from observing how that snapping option works when tested with a variety of different object types, particularly when testing it with all the other snapping options disabled. I never really thought about looking for a definition in the documentation until you mentioned it. Now that you have, it does not seem to be defined very well anywhere there, much like a lot of other features.

As for an object having more than one midpoint or center, I do not think that is true for the Affinity apps. That point is always at the default position of the Transform Origin, which is always at the geometric center of the current selection box. That may be at a different position for a 'Base box' vs. a 'Regular bounds' box. (I discovered that by observation, too!)

All 3 1.10.8, & all 3 V2.5.5 Mac apps; 2020 iMac 27"; 3.8GHz i7, Radeon Pro 5700, 32GB RAM; macOS 10.15.7
A
ll 3 V2 apps for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 15.7

Link to comment
Share on other sites

38 minutes ago, h_d said:

I can link you to an Affinity example:

  • Snap to shape key points—when checked, objects can be aligned to key points on shapes, such as the start and end of a rounded corner.

That's from Help-Snapping-Snapping options.

Unfortunately this sample does not allow an unambiguous conclusion whether a circle's center or the node in my sample video above is a key point or not, I'd rather conclude from this example that it is a key point because it reflects or defines a position on the curve where the curve direction changes, according to the points at "7" for the rounded corners sample.

So, to detect or decide whether not snapping is a bug it would require a definition of "key point".
The idea "If it's not snapping than it's no key point" seems too simple and not sufficient to exclude here a bug.

macOS 10.14.6 | MacBookPro Retina 15" | Eizo 27" | Affinity V1

Link to comment
Share on other sites

38 minutes ago, R C-R said:

It is from observing how that snapping option works

If we judge about bugs from observing only then ... no bugs would exist, and all bugs would simply be "by design" ;)

That's why I do suppose here a bug as long "key point" isn't defined clearly, distinguishing from the existing, common "key point" understanding in (bezier) animation.
(while one of various possible object centers is named in the snapping options unmistakable as "bounding box mid point")

By the way: what does "geometry" mean here? Is it "anywhere but on a curve (or shape)"?

macOS 10.14.6 | MacBookPro Retina 15" | Eizo 27" | Affinity V1

Link to comment
Share on other sites

Apart from observing with my tongue very firmly in my cheek that one person's 'bug' is another person's 'works as intended', I'm all done here. Interesting discussion!

Best, H

Affinity Photo 2.5.3,  Affinity Designer 2.5.3, Affinity Publisher 2.5.3, Mac OSX 14.5, 2018 MacBook Pro 15" Intel.

Link to comment
Share on other sites

1 hour ago, thomaso said:

If we judge about bugs from observing only then ... no bugs would exist, and all bugs would simply be "by design" ;)

That's why I do suppose here a bug as long "key point" isn't defined clearly, distinguishing from the existing, common "key point" understanding in (bezier) animation.

Bug or no bug, something not being clearly defined in the documentation does not justify arbitrarily defining it as it might be defined in some other (in this instance totally unrelated) application area.

2 hours ago, thomaso said:

(while one of various possible object centers is named in the snapping options unmistakable as "bounding box mid point")

So what? While an object box can be cycled through more than one kind of selection box, it can have only one bounding box, which has exactly one mid point that is always in the same place in & defined by that object's geometry.

2 hours ago, thomaso said:

By the way: what does "geometry" mean here? Is it "anywhere but on a curve (or shape)"?

It means the two dimensional geometric space the object is defined in. It has nothing to do with the temporal dimension of an animated object because that dimension does not exist in the Affinity apps.

A snapping point in that 2D space may or may not be on the path of a curve. It could even be at some point far removed from any of the nodes of that curve or its path. The red & green snapping indicators make that clear even if the documentation does not.

All 3 1.10.8, & all 3 V2.5.5 Mac apps; 2020 iMac 27"; 3.8GHz i7, Radeon Pro 5700, 32GB RAM; macOS 10.15.7
A
ll 3 V2 apps for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 15.7

Link to comment
Share on other sites

  • 4 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.