Page 1 of 1

Zigzag fill

Posted: Wed Mar 03, 2010 3:41 am
by knobba
Do anybody have some ideas how to solve the following problem using Inkscape:

In this example image

Image

there is a leaf filled with zigzags. I have drawn the zigzags point by point, but I'd like to automate this to create so-called satin stitches for machine embroidery.

I have created zigzags along paths by repeating one zigzag along a path, but to take this further to zigzag-fill I'm a bit stuck on how to force the zigzag to the outlines.

Any ideas on tools in Inkscape that can help me with this? The fill has to be a path (or something that can be converted to a path) i.e. not a texture fill.

Re: Zigzag fill

Posted: Wed Mar 03, 2010 5:40 am
by brynn
You could use Object to Pattern, and use a pattern fill. But the fill does not remain a path.

I know there's a way to do what you want, I just don't know what it is. But I'm sure other members will.

Re: Zigzag fill

Posted: Wed Mar 03, 2010 7:54 am
by llogg
http://screencasters.heathenx.org/episode-071/

This episode of heathenx's tutorials uses 0.46 to get this effect. I don't think much is different in 0.47 so it should still be useful for your purpose.

Re: Zigzag fill

Posted: Thu Mar 04, 2010 6:06 am
by knobba
The heathenx's tutorial shows how to create zigzag with one width only. I have used the same technique with pattern along path to get this type of zigzag, but now I need zigzag that stretches out between two paths. Thanks for trying to help, I really learned some new things during the tutorial :)

Re: Zigzag fill

Posted: Thu Mar 04, 2010 12:45 pm
by syllie
What about a Live Path Effect?

Image

Step 1
Create your leaf

Step 2

  • Duplicate the leaf if you want the orignal path to show in the end result (Ctrl+D)
  • Open from the menu Path > Path Effect Editor (Shift+Ctrl+7)
  • Select the effect "Hatches (rough)" from the drop down list and click the "Add" button.
  • A dialog with an overwhelming amount of setting appears. Don't let this intimidate you. In the dialog:
    • Set "Frequency Randomness" to 0 (you want tidy stitches)
    • Set all the values for Jitter to 0
    • Not demonstrated in above preview but if you set the values for half-turn smoothness to 0 you'll end up with sharp spiked turns.
    • Untick "Bend Hatches"
    • Untick "Generate thick/thin path"
  • Use the node tool to manipulate the frequency, scale and direction of the hatches.

See my "Sketch and Hatch" tutorial or the chapter on Hatches in Tav's Inkscape Guide on how to manipulate the strokes.

Step 3
Combine the original path with the path result from the LPE.

NOTE: when you edit/manipulate/transform paths with LPE's applied unexpected things may happen. Use Path > Object to Path from the menu to embed the LPE permanently (in other words to turn the LPE path into a normal path).

Of course experimenting with the hatch settings will open plenty of new ways to display creative stitches and the like.

I hope this helps.

Cheers,
Syllie

Re: Zigzag fill

Posted: Thu Mar 04, 2010 4:55 pm
by sunaden
This is an interesting problem.

Image a path that have n nodes.
I made a 'netting' extension that netting nodes 1, n, 2, n-1, 3, n-2.....with a string line.

If you want two lines, finally use "break path at selected node".
Image


tutorial videos. ( no sound)
http://dp48069596.lolipop.jp/sd/inkscape_video.html

netting extension program.
http://dp48069596.lolipop.jp/sd/inkscape_script.html

refer to similar 'zigzag' extension.
http://www.inkscapeforum.com/viewtopic.php?f=9&t=4173

if you interest about stroke font :
http://www.inkscapeforum.com/viewtopic.php?f=14&t=3798&start=0 posted to "Inkscape & the Web" .

Re: Zigzag fill

Posted: Thu Mar 04, 2010 7:31 pm
by syllie
Hi Sunaden, I just had a look at these extensions - tho I think they are not the best option for this problem (as with the hatch you can control direction and frequency independent from the number of nodes) - they sure are very interesting and I am already thinking on some application. I am glad you pointed this post to it or I would never have known of their existence :D.

Cheers,
Syllie

Re: Zigzag fill

Posted: Fri Mar 05, 2010 3:25 am
by knobba
syllie wrote:What about a Live Path Effect?

Wonderful! Even better than I had hoped for. Thank you! Great tutorial also. Love the hatch effect.

I did not get the bending to work, though. Which is the reference point? I tried extreme positions with the bend-diamond, but couldn't see any bending.

Re: Zigzag fill

Posted: Fri Mar 05, 2010 3:35 am
by knobba
sunaden wrote:I made a 'netting' extension that netting nodes 1, n, 2, n-1, 3, n-2.....with a string line.

Thank you for the idea. I find syllie's solution more flexible for the zigzag fill, but this netting effect is certainly something that could work well for embroidery.

Re: Zigzag fill

Posted: Fri Mar 05, 2010 4:01 am
by brynn
AWESOME syllie and sunaden, well done!
I knew it could be done, I'm just not quite "there" yet, with LPEs.

Re: Zigzag fill

Posted: Fri Mar 05, 2010 4:23 am
by knobba
Ah - now the bending works. I had deselected bend in the path effect editor and then the bending diamond didn't respond. :mrgreen:

Re: Zigzag fill

Posted: Mon Mar 08, 2010 6:52 am
by knobba
Now I realize that both the hatch effect and the netting extension will be useful. The hatch effect for satin fill in one direction, the netting extension to have the direction of the zigzag follow the object. Here's an work-in-progress image of an elephant motive I'm going to put on a textile gift to a very little boy. The eye is filled with the hatch effect and the ear is zigzagged by the netting effect.

Image

Re: Zigzag fill

Posted: Mon Mar 08, 2010 7:03 am
by syllie
Wow knobba,
looks like you found a working combination!
Cool to see an actual application as feedback. It looks great!

Cheers,
Syllie

Re: Zigzag fill

Posted: Mon Mar 08, 2010 10:52 am
by sunaden
Oh, it's a very pretty applique.

knobba, You're using the hatch effect and the netting effectively , I'm glad
Elephant's eye looks like laughing :lol: .


Hi, syllie.
sorry, answer is too lately.
I didn't think of using the hatches of PEE in his problem.

I have look at your webs of very elegant designs, and very useful tutorials :P .