[solved] Stitch Subpath effect

Post questions on how to use or achieve an effect in Inkscape.
msandersen
Posts: 11
Joined: Fri Dec 21, 2007 1:59 pm

[solved] Stitch Subpath effect

Postby msandersen » Fri Jan 04, 2008 1:00 am

Does anyone have a good idea on how to use this feature in 0.46? I've read the release notes, and I can create a basic effect between 2 straight lines, but other shapes creates what seems like random lines, not anything resembling String Art, as the notes mention, let alone anything like the art from the link in the notes.

Any ideas?

User avatar
prkos
Posts: 1625
Joined: Tue Nov 06, 2007 8:45 am
Location: Croatia

Re: Stitch Subpath effect

Postby prkos » Fri Jan 04, 2008 4:55 am

You can only create stitches between 2 subpaths, the string art is also created that way, you can see it if you look at one of those nice objects. But nice objects aren't created with only 1 path (that contains 2 subpaths and stitches in between them). They are made by duplicating that path many times and arranging them symmetrically.

Image

In this image you see 2 paths, top and bottom one. The top one has 2 subpaths and 30 stitches connecting them.
The bottom path has the same 2 subpaths as the top one, and it also has 30 stitches, but it's different because of the path directions. In the bottom path, the right-hand path has been reversed.

Now if you want to create a nice symmetrical object duplicate one of those paths, rotate and flip each one as necessary, and arrange them to overlap forming a circle or something like that....
I made an entry for About screen contest using stitches: http://prkos.deviantart.com/art/Stitched-Gold-73418805 here I used 8 paths (each has 2 subpaths), the trick is in drawing and arranging subpaths.

btw in the image above both paths subpaths are visible, you can actually only see one at the time in Inkscape, I added the second one from a different screenshot and blended it in.
just hand over the chocolate and nobody gets hurt

Inkscape Manual on Floss
Inkscape FAQ
very comprehensive Inkscape guide
Inkscape 0.48 Illustrator's Cookbook - 109 recipes to learn and explore Inkscape - with SVG examples to download

msandersen
Posts: 11
Joined: Fri Dec 21, 2007 1:59 pm

Re: Stitch Subpath effect

Postby msandersen » Fri Jan 04, 2008 11:48 am

Thanks, nice reply nicely illustrated.
To reverse the direction of the path, do you have to redraw it, starting from the other end, or is there a function to do that?

I'm not a mathematician or programmer, but the site they link to has little Java programs to recreate string art; the first one, Parabolas in a Polygon, you can enter number of sides for a polygon, eg 5, as well as the number of steps. I can see it uses 2 lines at a time, but it steps through each side to make a complete polygon, just like the Spirograph makes a complete shape. Maybe this is a feature request, or merely unimplemented at the moment but planned.
In Inkscape, I can make one of those sides (except the original lines are not kept), I just thought there was a way to have it step through and do a polygon, as an automated process. I know I can do it manually with a bit of care and a lot of trouble to calculate the angles, but that's not the point. As it is, it's a bit like the Interpolate effect.
I may make a feature request if I understand you right.

msandersen
Posts: 11
Joined: Fri Dec 21, 2007 1:59 pm

Re: Stitch Subpath effect

Postby msandersen » Fri Jan 04, 2008 1:24 pm

Ok, had a play, and I'll post my own screenshot:
Image
Edit:
i just found out how to rotate an object by an arbitrary amount (eg 120deg for a hexagon), so I guess it can be reproduced, though not automatically.
A pity.

Simarilius
Posts: 626
Joined: Wed Jun 06, 2007 2:37 am

Re: Stitch Subpath effect

Postby Simarilius » Fri Jan 04, 2008 11:39 pm

Path>reverse will flip the order of a path.
For the ones where their repeated, you could create one then use tile clones to create the rest, which will update if you modify the original.

User avatar
prkos
Posts: 1625
Joined: Tue Nov 06, 2007 8:45 am
Location: Croatia

Re: Stitch Subpath effect

Postby prkos » Sat Jan 05, 2008 12:24 am

As Simarilius said there is an option for reversing paths (Path > Reverse). It's nothing complicated; every path has nodes that you can see when you select the node tool :tool_node:. Nodes in a path are numbered, Inkscape knows which node is the first, second etc. When you click Tab on your keyboard while using Node tool the very first node will be selected. If the path is open it will always be one of the end nodes. If you reverse path you'll see that the first node is now on the other end of the path.

I'll also support the feature request to upgrade Stitching, thanx for the report :D https://bugs.launchpad.net/inkscape/+bug/180273

(I presume it was you msandersen ;) )
just hand over the chocolate and nobody gets hurt

Inkscape Manual on Floss
Inkscape FAQ
very comprehensive Inkscape guide
Inkscape 0.48 Illustrator's Cookbook - 109 recipes to learn and explore Inkscape - with SVG examples to download

User avatar
capnhud
Posts: 435
Joined: Mon Jun 04, 2007 8:30 pm
Location: U.S.A

Re: Stitch Subpath effect

Postby capnhud » Sat Jan 05, 2008 7:46 am

Off topic:
Prkos where did you get that icon set for inkscape development

User avatar
prkos
Posts: 1625
Joined: Tue Nov 06, 2007 8:45 am
Location: Croatia

Re: Stitch Subpath effect

Postby prkos » Sat Jan 05, 2008 8:16 am

There is a work in progress to make Inkscape icons Tango compliant, it may be released in the upcoming 0.46.

The icons file was published on the development list, I adjusted a couple of those to suit me better.
just hand over the chocolate and nobody gets hurt

Inkscape Manual on Floss
Inkscape FAQ
very comprehensive Inkscape guide
Inkscape 0.48 Illustrator's Cookbook - 109 recipes to learn and explore Inkscape - with SVG examples to download

User avatar
capnhud
Posts: 435
Joined: Mon Jun 04, 2007 8:30 pm
Location: U.S.A

Re: Stitch Subpath effect

Postby capnhud » Thu Feb 07, 2008 12:20 am

Ok I tried the tutorial on doing this effect but I must be doing it incorrectly

1. I created two paths
2. I combined them
3. Create another path to replace default paths
4. Applied stitch subpath (left at default, but increased the number of stitches to 20
5. Copied step 3 and pasted in the stroke path.
6. Nothing happens.

Is one of these steps wrong?

User avatar
prkos
Posts: 1625
Joined: Tue Nov 06, 2007 8:45 am
Location: Croatia

Re: Stitch Subpath effect

Postby prkos » Thu Feb 07, 2008 12:53 am

do you mean nothing happens when you apply the Stitch? The combined path should be selected before you hit Apply button.

could you explain steps 3 and 5, I didn't understand them, but also they seem unnecessary
just hand over the chocolate and nobody gets hurt

Inkscape Manual on Floss
Inkscape FAQ
very comprehensive Inkscape guide
Inkscape 0.48 Illustrator's Cookbook - 109 recipes to learn and explore Inkscape - with SVG examples to download

User avatar
capnhud
Posts: 435
Joined: Mon Jun 04, 2007 8:30 pm
Location: U.S.A

Re: Stitch Subpath effect

Postby capnhud » Thu Feb 07, 2008 3:31 am

Those steps are taken from .46 inkscape share>examples>live-path-effects-curvestitch.svg

User avatar
prkos
Posts: 1625
Joined: Tue Nov 06, 2007 8:45 am
Location: Croatia

Re: Stitch Subpath effect

Postby prkos » Thu Feb 07, 2008 4:12 am

your steps seem ok

you said that nothing happens, did you mean that you dont get any stitches (the 20 you mentioned), or just the last part where you wanted to replace straight stitches with curved ones? It works ok for me, after I got the normal straight stitches I created a curve, copied it and hit the Paste Path button in LPE dialog
just hand over the chocolate and nobody gets hurt

Inkscape Manual on Floss
Inkscape FAQ
very comprehensive Inkscape guide
Inkscape 0.48 Illustrator's Cookbook - 109 recipes to learn and explore Inkscape - with SVG examples to download

User avatar
capnhud
Posts: 435
Joined: Mon Jun 04, 2007 8:30 pm
Location: U.S.A

Re: Stitch Subpath effect

Postby capnhud » Thu Feb 07, 2008 9:09 pm

I do not get any stitches so that is why I assumed I am doing something incorrectly.

User avatar
prkos
Posts: 1625
Joined: Tue Nov 06, 2007 8:45 am
Location: Croatia

Re: Stitch Subpath effect

Postby prkos » Fri Feb 08, 2008 12:12 am

Maybe its a bug then, what version are you using?

1. draw a path (pencil tool will do)
2. draw a second path
3. select them both and go to Path > Combine
4. you now have 1 object that has 2 subpaths. You can go to the LPE dialog (with the object selected) and hit Apply button after choosing Stitch effect. You should immediately see 5 stitches (5 straight lines) on your drawing and you will no longer see the subpaths.

Can you get this far? Post a screenshot, maybe that might clear things up...
just hand over the chocolate and nobody gets hurt

Inkscape Manual on Floss
Inkscape FAQ
very comprehensive Inkscape guide
Inkscape 0.48 Illustrator's Cookbook - 109 recipes to learn and explore Inkscape - with SVG examples to download

User avatar
prkos
Posts: 1625
Joined: Tue Nov 06, 2007 8:45 am
Location: Croatia

Re: Stitch Subpath effect

Postby prkos » Fri Feb 08, 2008 12:21 am

I got an idea why you might not see the stitches - you don't have the Stroke set! Give stroke some color and you'll see the stitches in that color ;)

I think this happens if your original paths have only fill and no stroke. How did you create your paths? If you use Pencil or Bezier you'll have stroke automatically.
just hand over the chocolate and nobody gets hurt

Inkscape Manual on Floss
Inkscape FAQ
very comprehensive Inkscape guide
Inkscape 0.48 Illustrator's Cookbook - 109 recipes to learn and explore Inkscape - with SVG examples to download

User avatar
capnhud
Posts: 435
Joined: Mon Jun 04, 2007 8:30 pm
Location: U.S.A

Re: Stitch Subpath effect

Postby capnhud » Fri Feb 08, 2008 10:04 pm

I was using the 2/5/2008, but when I used 2/07/2008 the effect went without a hitch. 8-).

I was using the pen tool, but as far as I can tell if you make a straight line with the :tool_pen: you will not see anything if you have only fill and no stroke, but I could be wrong.

Ok now I can play with this new feature. Don't really know what was going on with the 5th, but more than likely I was doing the step wrong.


Return to “Help with using Inkscape”