Jump to content
Our response time is longer than usual currently. We're working to answer users as quickly as possible and thank you for your continued patience.

Dash Line Style with symetric corners?


Recommended Posts

Hi everyone,

I have one square (4,5 x 3,5mm). Im try to show a measure limits with a Dash Line Style and i don´t know what happen with.
In the image below you can see what i wanna do. How put the corners in a square with dash line? Anyone can help me, i try everything whit Cap, Phase, Miter,...

Thanks!

LesterFM

image-dash-line-example.jpg

Link to comment
Share on other sites

  • Moderators

Hi ljfm :) 

There's no direct option to make this kind of shape in Affinity, however it's possible by changing the stroke settings.

I've drawn a rectangle that measures 4.5 x 3.5mm and applied a dash line style to this. I then used the following settings, which provided me the below result-

image.png

I hope this helps!

Link to comment
Share on other sites

Thanks a lot. @Dan C 

Helps for this measure, but, is not similar to my example and what happen if i need another height or width? I think that this tool need improvements because take too much time for do it as you want.

Maybe i can go fast if the decimals in the input fields, can be changed with the mouse wheel. 

After all, thanks.

Link to comment
Share on other sites

  • Moderators

I understand, it does require a little bit of 'trial and error' in its current state to achieve this effect, I'd recommend creating a Feedback post for our devs to see and consider changing this in the future :) 

12 minutes ago, ljfm said:

Maybe i can go fast if the decimals in the input fields, can be changed with the mouse wheel. 

The fields can be edited using the mouse wheel, but this will always increase in increments of 1, not decimals. 

Link to comment
Share on other sites

3 minutes ago, Dan C said:

The fields can be edited using the mouse wheel, but this will always increase in increments of 1, not decimals.

No for all fields. Enter e.g. 2 into the second field from the left and move the scroll wheel down. Next value is 1, but after that not 0 but 0,05.

------
Windows 10 | i5-8500 CPU | Intel UHD 630 Graphics | 32 GB RAM | Latest Retail and Beta versions of complete Affinity range installed

Link to comment
Share on other sites

13 minutes ago, Dan C said:

The fields can be edited using the mouse wheel, but this will always increase in increments of 1, not decimals

Erm... hold Control (on PC, so Command on Mac?) to scroll by 0.1

Should work in every box throughout Affinity suite.

Win10 Home x64   |   AMD Ryzen 7 2700X @ 3.7GHz   |   16 GB RAM   |   1TB SSD   |   nVidia GTX 1660   |   Wacom Intuos Pro

Link to comment
Share on other sites

  • Moderators
13 minutes ago, Joachim_L said:

No for all fields. Enter e.g. 2 into the second field from the left and move the scroll wheel down. Next value is 1, but after that not 0 but 0,05.

This is due to the fact the second field here cannot be 0, therefore it defaults to its lowest value possible, in this case 0.05

5 minutes ago, Aammppaa said:

Erm... hold Control (on PC, so Command on Mac?) to scroll by 0.1

 Should work in every box throughout Affinity suite.

I'll be totally honest - I wasn't aware of that before now! Thanks Aammppaa :D 

Link to comment
Share on other sites

  • Moderators
9 minutes ago, PixelPest said:

I found an entry about the shift-key and ^(ctrl) in the German Help file at Transforming Objects.

I believe this is related to nudging objects using the arrow keys, not editing values with the scroll wheel - but thank you :)

10 minutes ago, PixelPest said:

Never been sure what ^(ctrl) for Mac user means

A Mac keyboard has 4 modifiers (5 including fn) -

Shift - image.png

Control - image.png

Option/Alt - image.png

Command (CMD) - image.png

All of which are found in the bottom left hand corner of the keyboard (at least in the UK English variant) and Affinity utilises all of these modifiers across the app!

Mac Keyboard.jpg

Link to comment
Share on other sites

  • 2 years later...

I know this is a very old topic, but I found a more reliable (manual) solution, until Serif implements an automated version. It might need some adjustments for your particular needs. But let me specify my goal:

I want to have a box around some content, that is dashed and that the corners are symmetric around this box. The segment and the empty space in my case have the same length.

Now, let's understand a little bit on how the dashed stroke works in Affinity designer: The value you insert in the dash and phase boxes are multiples of the width of the stroke in pt units. So let's say you have a line with stroke of 2pt and you use a dash that is (2,2,0,0). The actual result are dashes that are (4pt,4pt,0,0) in your design. And phase, let's say (1), corresponds to a 2pt shift.

A more elaborate example:

- Create a rectangle that is 10mm x 20mm.
- Set the stroke to the desired width, e.g. 2 pt.
- You can then convert the rectangle to curves and break the edges using the Node Tool. But, that is not necessary if your dashes have all the same length and your rectangle has an integer aspect ratio.
- Now, you have four lines that form your rectangle. Or just a rectangle for equally spaced dashes.
- Next, specify how many dashes you want in the horizontal lines, e.g. 3.
- Then calculate the value as dash=10mm/3/0.3527777778/2/2, e.g. dash=2.3622 (which corresponds to line_length/n_segments/pt2mm/stroke_width/2).
- The phase for symmetric edges is just phase=dash/2, e.g. phase=1.1811.
- Finally, you recalculate dash and phase for the vertical lines by changing the line_length to the new line_length and scale up/down the number of segments as n_segments_new = n_segments * line_length_new / line_length.
- In this example because height and width of the box are just an integer multiple of each other you will see that recalculating dash and phase will lead to the same values of dash and phase that were obtained for the horizontal lines. If they are not integer multiples of each other, you might have to round up or down the number of segments to the nearest integer and then dash and phase will be different from those of the horizontal lines.

Try performing those steps and see if you get the same result as I did! I hope it helps everyone!

PS: I know it is a little bit tricky, it might be confusing to some of you. But I really hope it helps!

 

Screen Shot 2022-07-17 at 10.59.25 AM.png

Link to comment
Share on other sites

@ Nizer: well that's quite elaborate, I’d say! But honestly: it's a shame that we're still left to calculations like that. As I wrote quite some time ago: this kind of job (doing that arithmetic) is exactly what computers have been invented for in the first place and we can only hope the devs at Serif finally come to this conclusion as well...

It may be comparing apples to oranges but really: this kind of everyday problem in a lot of general design jobs should certainly have been prioritized to – e.g. – enabling users to do fancy astrophotography editing (even if possibly millions of AP user would have dearly missed THAT 😉)...

Link to comment
Share on other sites

7 minutes ago, Lorox said:

@ Nizer: well that's quite elaborate, I’d say! But honestly: it's a shame that we're still left to calculations like that. As I wrote quite some time ago: this kind of job (doing that arithmetic) is exactly what computers have been invented for in the first place and we can only hope the devs at Serif finally come to this conclusion as well...

It may be comparing apples to oranges but really: this kind of everyday problem in a lot of general design jobs should certainly have been prioritized to – e.g. – enabling users to do fancy astrophotography editing (even if possibly millions of AP user would have dearly missed THAT 😉)...

I do agree with you. I did a feature request as well, lets hope it gets implemented as soon as possible.

This is the link for the feature request: @Dan C

 

Edited by Nizer
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...
 Share

×
×
  • Create New...

Important Information

Please note there is currently a delay in replying to some post. See pinned thread in the Questions forum. These are the Terms of Use you will be asked to agree to if you join the forum. | 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.