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

Dashed stroke that breaks on a grid?


Recommended Posts

My first guess would be that you probably can’t do what you want because the first and last – ‘outside’ – strokes of the dashed line will need to be of different lengths to the ‘inside’ strokes.
See my attached image where the ‘outside’ strokes in red are of different lengths to the ‘inside’ strokes in blue and the arrows show the differences.
(Even if it were possible, because the stroke width alters where the gaps are, you might have to do some manual arithmetic to get something close and you would have to repeat the arithmetic on every line which has a different length/stroke width.)
I might be wrong though, so check back later to see if someone has a solution.

Annotation 2020-08-02 091139.png

Link to comment
Share on other sites

Based on Garry’s observations, I simplified things by reducing the stroke width to 1px made a dash of 8 units and a space of 2 to total 10, I then adjusted the phase and ended up with this.
image.png.64f025a1043b45f81d2c248270b8ecb7.png

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

3 hours ago, GarryP said:

My first guess would be that you probably can’t do what you want because the first and last – ‘outside’ – strokes of the dashed line will need to be of different lengths to the ‘inside’ strokes.

The appearance panel allows multiple strokes.

If the OP requires that the first and last strokes start and end on the grid lines then it should be doable with multiple strokes.

To save time I am currently using an automated AI to reply to some posts on this forum. If any of "my" posts are wrong or appear to be total b*ll*cks they are the ones generated by the AI. If correct they were probably mine. I apologise for any mistakes made by my AI - I'm sure it will improve with time.

Link to comment
Share on other sites

Because getting the dash parameters perfect can be so hard, I think I would be tempted to instead use snapping & a combination of multiple straight lines expanded to curves placed in a compound object, something like this:

1708004551_fakedashLayers.jpg.c05c21d1a6ba7688d7f8c090b11788a6.jpg  1353922414_fakedashedline.jpg.52174ba05770452c04a9a98cb7332753.jpg

By using a compound, the gaps can be adjusted as desired by selecting all the subtracted curves & using the Transform Objects Separately feature of the Move Tool together with the resize around center modifier key to keep the gaps centered on the grid lines.

Dashed line fake.afdesign

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

Link to comment
Share on other sites

Thanks everyone! GarryP what settings did you use in your example? Thanks for your examples firstdefense and R C-R. This is very helpful!

R C-R, how did you create the "Compound" folder group? I'm familiar with selecting objects and then selecting the "add, subtract, etc.," but I haven't created them in the way you did.

 

 

Link to comment
Share on other sites

29 minutes ago, Sirenetta said:

R C-R, how did you create the "Compound" folder group?

I’m not @R C-R (obviously!) but to create a ‘Compound’ object from multiple selected objects you either (a) choose ‘Create Compound’ from the Layer menu or (b) hold down the Alt key and click on one of the Geometry icons (‘Subtract’ in this particular case) on the Toolbar.

Alfred spacer.png
Affinity Designer/Photo/Publisher 2 for Windows • Windows 10 Home/Pro
Affinity Designer/Photo/Publisher 2 for iPad • iPadOS 17.4.1 (iPad 7th gen)

Link to comment
Share on other sites

15 hours ago, Sirenetta said:

GarryP what settings did you use in your example?

I’ve attached a document which shows how the two strokes can be put together.
Line C is a version of the idea that firstdefence gave,
Line D is a version of the idea that carl123 gave.
Line B is a combination of lines C and D using the Appearance Panel to add two strokes at the same time.
Line A is the same as line B but all strokes are coloured the same.
Select each line, open the Appearance Panel, then click on the “x pt” link (after “Stroke”) for each stroke and look at the Dash and Phase settings.

Annotation 2020-08-03 093745.png

two-dashed-strokes.afdesign

Link to comment
Share on other sites

2 hours ago, GarryP said:

I’ve attached a document which shows how the two strokes can be put together.

Compare that document to this two-dashes vs compounds.afdesign one that uses the expand stroke + compound method I mentioned earlier. E is the same as A except that it is an 8 curve compound. Now imagine trying to create variations like F, G, or H using the two stroke method.

Those variations & many others can be made in a few seconds from the E one. In each one the grid alignment is exact & height, gap width(s), or both can be changed independently at any time without altering the alignment.

It involves a little more work to set up but by using power duplicate to create the verticals it is less than one might think.

Also, this method can be used with AP, which lacks AD's Appearance panel.

compare.jpg.1a865974f5a654ae03d87f3be3b3b1e4.jpg

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

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.