Jump to content
You must now use your email address to sign in [click for more info] ×

Transforming An Object Relative To Its Position


Recommended Posts

Hello,

I've recently moved from Adobe Illustrator to Affinity Designer, and this is a wonderful software so far. A question I have is about transforming - it looks like Affinity Designer only supports exactly specifying the X and Y of an object relative to the document.

Illustrator had options where you could change both the coordinates relative to its current position, both in terms of X and Y (e.g. move +10X and -10Y from where you currently are), and in a sort of "polar" system (e.g. position this 10 units away from where I currently am at a 45 degree angle).

Does this kind of relative positioning exist in Affinity Designer? I'd rather not do trigonometry every single time I have to offset a line to be parallel at a certain angle.

Edited by bobthepanda
Link to comment
Share on other sites

You can use the Point Transform Tool.

  1. So draw a diagonal line
  2. Duplicate it (Cmd+J)
  3. Select the Point Transform Tool
  4. Use the Transform Panel to accurately move the line 10 units on the X:
  5. Note: Power duplicate doesn't work when using the Point Transform Tool for some odd reason???

You can also do the same thing with the move tool and in the Transform Panels X: input add +10 e.g (495.6px+10)

iMac 27" 2019 Somona 14.3.1, iMac 27" Affinity Designer, Photo & Publisher V1 & V2, Adobe, Inkscape, Vectorstyler, Blender, C4D, Sketchup + more... XP-Pen Artist-22E, - iPad Pro 12.9  
B| (Please refrain from licking the screen while using this forum)

Affinity Help - Affinity Desktop Tutorials - Feedback - FAQ - most asked questions

Link to comment
Share on other sites

Welcome to the forums bobthepanda.
In addition to the suggestion above, you can use expressions in a lot of input fields, see attached GIF.
More information is in the Help, right at the bottom of the contents under “Expressions for field input”.
I don’t know much about polar coordinates but there might be something there.

relative-movement.gif

Link to comment
Share on other sites

15 minutes ago, haakoo said:

+10 would suffice in this case Garry

I’ve just tried this and +10, in the X and Y fields X and Y moves the layer to the coordinate +10 position rather than moving it by 10.
Similarly, +10 in the W and H fields would give it a size of +10 rather than resizing it relatively.
However, +=10 would change the value relatively.

Link to comment
Share on other sites

14 hours ago, bobthepanda said:

it looks like Affinity Designer only supports exactly specifying the X and Y of an object relative to the document.

https://affinity.help/designer/English.lproj/pages/Workspace/expressions.html

Affinity Store (MSI/EXE): Affinity Suite (ADe, APh, APu) 2.4.0.2301
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.3155.
Dell Latitude E5570, i5-6440HQ 2.60 GHz, 8 GB, Intel HD Graphics 530, 1920 x 1080, Windows 11 Pro, Version 23H2, Build 22631.3155.
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

4 hours ago, GarryP said:

relative-movement.gif

Enough "/2", it is not necessary to write "wh/2" for the WH field.

Affinity Store (MSI/EXE): Affinity Suite (ADe, APh, APu) 2.4.0.2301
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.3155.
Dell Latitude E5570, i5-6440HQ 2.60 GHz, 8 GB, Intel HD Graphics 530, 1920 x 1080, Windows 11 Pro, Version 23H2, Build 22631.3155.
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

6 hours ago, Pšenda said:

That doesn't look like it supports trigonometry :(

So let me make this clearer about what I mean WRT relative positioning and polar coordinates (I don't know if polar coordinates is the correct term)

I say that I want to move an item 10 units 30 degrees (where 0 is just +Y and degrees go counter-clockwise). Based on this, AI is able to do trigonometric calculations and conclude that the equivalent translation is +5X and -8.66Y. More or less what this calculator does if you say "given a side and an angle".

Is that a thing I can do in Affinity Designer?

Link to comment
Share on other sites

2 hours ago, bobthepanda said:

That doesn't look like it supports trigonometry :(

Trigonometry is supported (function sin, cos, tan, ... ), but not supported is setting up both coordinates with one function.

Affinity Store (MSI/EXE): Affinity Suite (ADe, APh, APu) 2.4.0.2301
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.3155.
Dell Latitude E5570, i5-6440HQ 2.60 GHz, 8 GB, Intel HD Graphics 530, 1920 x 1080, Windows 11 Pro, Version 23H2, Build 22631.3155.
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

The only way I can think of, at the moment, to do this is to:
* draw a line with a length equal to the spacial movement required;
* rotate the line by the required number of degrees;
* set Snapping ON (Object Creation preset will do);
* move one corner of the line to the corner of the layer you want to move;
* move the layer to the other end of the line;
* delete the line (if you don’t need it for something else).
Not great but it works.

I tried to do this with the old SOH CAH TOA method but I can’t get the formula to work.
For example, to move something 2 units at a 30 degree angle the X distance change should be 1.732 which can be calculated from cos(30)*2.
However, when I try various formulas in the X field they do nothing (value remains as it was):
* cos(30)*2
* x+cos(30)*2
* x=x+cos(30)*2
* +=cos(30)*2
* +=cos(rad*30)*2
* +=cos(0.5236)*2 – Where 0.5236 is the radian equivalent of 30 degrees
* x+cos(0.5236)*2
* +=cos(0.5) – Where I missed out the extra multiplication
* +=cos(30) – Just in case
None of these does anything, that I can see (I tried using capitals too).

The Help doesn’t say what the t value is in the example for cos(t) etc. – radians or degrees? - and there is a “rad” constant which isn’t explained.

I think I could do with a tutorial showing me how to use these kinds of things because there’s not enough information.
Has anyone had much luck in using this sort of thing? Am I doing it wrong or does it not work for everyone?

Link to comment
Share on other sites

 

Hi GarryP,

Been playing around with this. Try x+cos(30)*2 where x is a specific number in the x (or y) transform panel, say 5.

Like you, could not get +=cos(30)*2 to work - probably a bug.I agree that there is a need for better documentation with examples.

Link to comment
Share on other sites

Thanks for confirming that Wasp11b.
Your first example was one of those that I had tried with no effect.
Can anyone else confirm or deny that this is happening to them?
I’m using Windows 10, so is this just a Windows thing or OSX / iPad too?
My attached GIF shows what’s not happening.

no-cos-functionality.gif

Link to comment
Share on other sites

Garry, on my mac I tired leaving the original setting "2 in" then added the cos so it read 2 in +cos(30)*2 it resulted in still being 2.  I also tried 2+cos(30)*2 and still resulted in 2.  Likewise x+cos(30)*2 still resulted in a 2.  Upper case no change.  Mike

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

Link to comment
Share on other sites

15 minutes ago, Wasp11b said:

on Windows 2+cos(20)*2 in the x transform box gives a result of 3.88 as expected.

For me (Windows 10) don't work - input field stay unmodified.

What document units do you use?

Affinity Store (MSI/EXE): Affinity Suite (ADe, APh, APu) 2.4.0.2301
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.3155.
Dell Latitude E5570, i5-6440HQ 2.60 GHz, 8 GB, Intel HD Graphics 530, 1920 x 1080, Windows 11 Pro, Version 23H2, Build 22631.3155.
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

13 minutes ago, Wasp11b said:

Just to clarify, on Windows 2+cos(20)*2 in the x transform box gives a result of 3.88 as expected. Same for retail and beta.

Doesn't work for me on Windows. 

-- Walt
Designer, Photo, and Publisher V1 and V2 at latest retail and beta releases
PC:
    Desktop:  Windows 11 Pro, version 23H2, 64GB memory, AMD Ryzen 9 5900 12-Core @ 3.00 GHz, NVIDIA GeForce RTX 3090 

    Laptop:  Windows 11 Pro, version 23H2, 32GB memory, Intel Core i7-10750H @ 2.60GHz, Intel UHD Graphics Comet Lake GT2 and NVIDIA GeForce RTX 3070 Laptop GPU.
iPad:  iPad Pro M1, 12.9": iPadOS 17.4.1, Apple Pencil 2, Magic Keyboard 
Mac:  2023 M2 MacBook Air 15", 16GB memory, macOS Sonoma 14.4.1

Link to comment
Share on other sites

Has zero effect on Mac too.

iMac 27" 2019 Somona 14.3.1, iMac 27" Affinity Designer, Photo & Publisher V1 & V2, Adobe, Inkscape, Vectorstyler, Blender, C4D, Sketchup + more... XP-Pen Artist-22E, - iPad Pro 12.9  
B| (Please refrain from licking the screen while using this forum)

Affinity Help - Affinity Desktop Tutorials - Feedback - FAQ - most asked questions

Link to comment
Share on other sites

 

 

1 hour ago, Wasp11b said:

If I have not done anything silly, then the question is why it's working here if it's not working elsewhere?

Probably since you used mm inside the field edit at end etc. Though works with px too, as far as the units are left inside a field edit at the end of an expression (expr+space+unit). Leaving a unit too inside the text field is mandantory here for the whole to work at all for the text field input parser in this case!

☛ Affinity Designer 1.10.8 ◆ Affinity Photo 1.10.8 ◆ Affinity Publisher 1.10.8 ◆ OSX El Capitan
☛ Affinity V2.3 apps ◆ MacOS Sonoma 14.2 ◆ iPad OS 17.2

Link to comment
Share on other sites

I’ve just done a few more experiments and created the attached table from the results.
In each case I started with a new A4 document – with no artboard – and a different Unit Of Measure (UOM).
I drew a randomly-sized rectangle, added guides snapped to the left and bottom of the rectangle and moved the origin to the bottom-left of the rectangle, so I could more easily see what was happening (if anything).
For the four UOM I tried, when entering each different equation in the “X” field, I only got movement when including the UOM but, strangely, not when I also included the “x” field name at the start of the equation (first two columns of the table).
Obviously this isn’t an exhaustive test but, to me, it shows there’s a problem somewhere, either with the calculations made by the software, or how I have entered the equation, or maybe something else. If the problems is with how I have entered the equation then I need more help on what I should be doing, and a reason why I should be doing it that way instead of what feels natural.

Annotation 2019-12-27 093402.png

Link to comment
Share on other sites

43 minutes ago, GarryP said:

...strangely, not when I also included the “x” field name at the start of the equation (first two columns of the table).

The first colomn (B) misses the UOM thus won't work. Further the line parser doesn't handle x or y etc. variables, so you have to use number values instead. With that, your column (C) should work with {x = 1, 2, 3, 4 ... integer or float/double values} instead.

The Affinity line expression parsers have their weaknesses here, as has the documentation, which is pretty minimalistic if not to say bad for those specific things!

☛ Affinity Designer 1.10.8 ◆ Affinity Photo 1.10.8 ◆ Affinity Publisher 1.10.8 ◆ OSX El Capitan
☛ Affinity V2.3 apps ◆ MacOS Sonoma 14.2 ◆ iPad OS 17.2

Link to comment
Share on other sites

The parser handles the variable names well in some other instances – see my first post in this thread where I use “x+10” and “w/2”, and some Help examples – just not, it seems, when some other expression fields are also used.
I’ve tried a few more examples using spaces and extra parentheses – e.g. “(x + cos(30) * 10) mm”, and others - and can’t make it work that way either. However, other things, such as “x+fraction(2.5)” (without UOM) do work, so some things work and others don’t; it’s a coin toss that the user can’t rely on.
Unless there’s a specific way that these things have to be used, a way that isn’t documented or easily guessed, then I would say that this functionality is broken.

Link to comment
Share on other sites

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.