Mobile app version of vmapp.org
Login or Join
Shakeerah625

: Create a custom stroke with an exact pattern of many different square and rectangular dashes Can anyone suggest a method that will essentially allow me to use the pattern shown in the below

@Shakeerah625

Posted in: #AdobeIllustrator #IllustratorEffects #Stroke

Can anyone suggest a method that will essentially allow me to use the pattern shown in the below image as a stroke? I want to be able to apply this to any path, and want to ensure that the each component/dash will remain as it is in the image; that the squares, for example, will remain perfect squares and exactly the same size as they appear in the below image? At corners, either overlaps or a specific shape will be fine, as long as they retain visual consistency.



I have tried Art and Pattern and Scatter brushes, but each of these in some way or another manipulates or stretches the pattern; in line with the previous example, a square will either get bigger or smaller, or become a rectangle.

10.03% popularity Vote Up Vote Down


Login to follow query

More posts by @Shakeerah625

3 Comments

Sorted by latest first Latest Oldest Best

 

@Jessie844

Is this the sort of result you're looking for?



If it's not and you need no curved segments at all, ever, even on curved lines, you'll need to just do something like this as a guide then place and rotate the rectangular segments over it by hand.

If this is what you want, you can exceed Illustrator's dash-gap-dash-gap-dash-gap maximum (with some compromises) by saving as SVG from Illustrator, then hacking the SVG. Full steps below.

But first, be aware that with this approach:


You lose any features Illustrator can't convert to SVG. There aren't many, but some complex effects like blends or raster effects may break or cause the file size to balloon absurdly.
You can't edit the doc in Illustrator after applying this pattern. I'd recommend applying this when finishing the file - if you need any further file conversion or finishing, an SVG-based editor like Inkscape (free and open source) is your friend.


Here's how to do it:


Prepare your shapes in Illustrator. Give them a solid stroke, no dots or dashes at all else Illustrator will muck up the SVG. Tip: making anything you can into a compound path (object > compound path) will make the next steps slightly easier. For example, all the lines above making the second Hello are combined into one compound path.
Save as SVG
Open the SVG in a plain text editor / code editor. There are thousands of free ones, or you can use Windows Notepad or Mac TextEdit (but first set TextEdit to plain text mode before opening any file), or even Dreamweaver if you have it...
Add something like this to each <path you want to have this pattern:

stroke-dasharray="2 1 4 1 5 1 3 1 5 1 2 1 4 1 1 1 3 1 1 1"


The numbers define the pattern and are relative to the stroke width - so if you want a stroke width of two, for example, double all the numbers (4 2 8...). It's length of dash, length of gap, length of dash, length of gap, repeat.

Then open it in something that can read SVG (e.g. a web browser)

Here's how the code behind the above example looks after adding the stroke-dasharrays:

10% popularity Vote Up Vote Down


 

@Caterina889

You are kind of asking for the impossible. At least with any automated function.

The simple nature of having something "along any path" means it will distort to a degree. It's impossible to have something follow a path with absolutely no distortion. There are always curves and distortions introduced in order to mimic the path. Even if that pattern was created as a font, you'd see distortion along a curved path.

A pattern brush will work, but only if A) your paths have no curves and B) all path segments are long enough to encompass the entire pattern. "Any path" falls apart with brushes. And as @EddieA mentions in the comments, Illustrator doesn't provide enough gap and dash options to generate that particular pattern.

In order to have absolutely zero distortion everywhere, along a non-linear path, you would need each piece to be able to swivel and rotate independently of the other pieces. Which, to me, means the pattern would be broken in that respect.

You'll have to manually place the pattern and position it. Using a Symbol would help, but in the end it will take some manual precision if you don't want distortion anywhere.

10% popularity Vote Up Vote Down


 

@Radia289

In Adobe Illustrator


Create a stroke using pen tool, Keep it selected.
After making a stroke, Go to Menu on top of screen. Click on Window>Stroke...
A menu will be shown similar to the image attached. (If you cant see Dashed Lane Options. You need to click the icon on the right side of the Stroke window and show options).
And now you need to check Dashed lane to make it working, play with the settings. Then you can now enjoy creating custom dashed lane.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme