[solved] Join nodes in a zig zag line

Post questions on how to use or achieve an effect in Inkscape.
JoseMa

[solved] Join nodes in a zig zag line

Postby JoseMa » Thu Aug 07, 2008 11:26 pm

Hello!

I have to draw a line zig zag. I've done this with the "pattern along the way." The pattern is a triangle, and the route is a line segment.

I want to connect all adjacent nodes between each pair of triangles. The nodes are marked with a red circle in the image:

Image

How can I do this without manually join each pair of nodes?

Thanks for all!
Saludos! And sorry for my english...
Jose Maria

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

Re: Join nodes in a zig zag line

Postby prkos » Thu Aug 07, 2008 11:55 pm

You can change the stroke style in the Fill and Stroke dialog, set the Cap to Round or Square. This will make the stroke be drawn around the node, and not be cut off at the node, so essentially it makes it a bit longer.

If your pattern doesn't overlap precisely over the nodes you can edit it in the Pattern along Path dialog - set Spacing to a negative number, it will position the triangles closer together.
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

JoseMa

Re: Join nodes in a zig zag line

Postby JoseMa » Fri Aug 08, 2008 1:12 pm

Changing the line style is a good solution. Thanks prkos.

But anyway I would like to find a way to do this. Does anyone have suggestions? With a little guidance, maybe I can do a script or macro. Maybe it is possible to modify "pattern along the way" or make a special version of this effect, or new styles of line.

Gracias
Jose Maria

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: Join nodes in a zig zag line

Postby brynn » Fri Aug 08, 2008 6:49 pm

Are you trying to make a zig zag pattern, specifically?

If not, a zig zag line is simple to make with a grid and snapping enabled, using the pen :tool_pen: tool. Done this way, the nodes are automatically connected.

User avatar
microUgly
Site Admin
Posts: 2985
Joined: Sat Jun 02, 2007 3:13 pm
Contact:

Re: Join nodes in a zig zag line

Postby microUgly » Fri Aug 08, 2008 7:21 pm

Outside of prkos suggestion, if you want the nodes joined (rather than just looking like they are joined) then you will need to either join them manually one-by-one, or draw the zigzag as one path as brynn has suggested.

Having said that, if you have the know-how then it would be possible to write an extension to do it. I couldn't imagine it would be easy though.

JoseMa

Re: Join nodes in a zig zag line

Postby JoseMa » Wed Aug 13, 2008 9:01 pm

Thank you for your suggestions.
Is this enough to use "patter along path" and the solution proposed by prkos.

Maybe one day try to write an extension, to learn and practice a little.

Saludos
José María


Return to “Help with using Inkscape”