Like the title says, I want to make a stroke along the lines made with the mesh tool.

How can this be achieved?

enter image description here


2 Answers 2


You have a possibility to get strokes which have same lengths and directions as the curves in the mesh. Use the mesh to envelope distort actual strokes. Generally you will not get exactly the same strokes as the curves in the mesh, but they can be near enough. An example:

enter image description here

In the left there's a mesh which was originally rectangular but it is mangled a little with the direct selection tool. It was originally made by clicking few times with the mesh tool on a rectangle.

In the right there's horizontal and vertical lines which are grouped and the group is sent to back

The mesh and the group are selected. The group is mangled to the same form by applying Object > Envelope Distort > Make with Top Object. There's no need to move the mesh, it only must be on top. The result is in the left:

enter image description here

The version in the right is a copy. It's there only to show the lines really have became independent curves. To make them free apply

  • Object > Envelope Distort > Expand
  • Object > Ungroup . You must apply it twice or more depending on how many grouping levels the line group has.

No guarantee it works with more complex meshes. But it works equally with gradient meshes, too. You must have a copy because using it as top object for envelope distortion destroys colors. See an example:

enter image description here

If you need as strokes exactly the same curves as the mesh you generally must tinker substantially more. If you are lucky you have uniformly spaced original mesh. Then you envelope distort uniformly spaced line grid and that's that. The previous gradient mesh example is good for showing also this.

For irreqular mesh curve spacings you need Inkscape.

Open in Inkscape the Ai file which contains the mesh. Use Internal Import option.

Apply Extension> Arrange > Deep Ungroup to disassemble the complex grouping that imported Ai files and PDFs have

Select all. Apply Object > Clip > Release to get everything visible under clipping paths. Every part seems to have one. This is the view after releasing:

enter image description here

The items "usexxx" in the objects panel are the released clipping paths. They all seem to have black fill and they cover the whole mesh area. They can be selected and deleted by selecting one, then applying Edit > Select same > Fill color and pressing DEL.

The actual paths become visible after you give to them some stroke width and color. Remove the possible fill color. It seems to be inherited from the original shape which was converted to mesh in Illustrator. I cannot prove the dependency exactly. The mesh is now as closed paths, every cell of the mesh is separate closed path. In the next image one of the cells is moved apart and colored to red:

enter image description here

The result can be taken back to Illustrator if you save it as Plain SVG.

  • "possibility to expand the mesh to strokes" -- that is a tad misleading. You aren't expanding a gradient mesh at all. You are creating a grid, distorting that grid, then expanding the distortion. Interesting approach and +1 --- but I think this starts off very misleading. Envelope Distort > Make with Mesh is considerably different than a Gradient Mesh.
    – Scott
    May 15, 2020 at 18:11
  • It's fixed. BTW If the mesh happens to be created as gradient mesh it works anyway as a top object in envelope distorting. Mesh is a mesh.
    – user82991
    May 15, 2020 at 18:59
  • Not really a distortion mesh is quite different than the color mesh of the gradient mesh. I realize it's still a mesh.. but a user wouldn't be able to stroke the inner paths of an envelope mesh either. You're distorting a grid, which is quite different. It may work for this user, but it's not the same thing.
    – Scott
    May 15, 2020 at 20:11
  • omg thank you so much for answering my question, this definitely helps a lot!! thank you so much!! May 16, 2020 at 6:54

You can't apply strokes to inner mesh paths. They aren't actually paths. And there's nothing you can do to "expand" or otherwise turn them into paths. They are data constructs. You'll have to find another way to achieve what you want.

Your best bet is to probably to take a screenshot of the highlighted mesh (because the inner lines only show when the mesh is selected). Then use that as a template and manually reconstruct the inner paths tracing the screenshot.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.