Wavy sine line using pen tool (like dash option)?

Asked by David Maa on 2018-04-22

Is it possible to automatically create a sine line using the pen tool or any other tool? I'd like to create a line like this:
https://stackoverflow.com/questions/45365158/matplotlib-wavy-arrow

I'd love to have a sine line that extend itself automatically.

Thanks

Question information

Language:
English Edit question
Status:
Answered
For:
Inkscape Edit question
Assignee:
No assignee Edit question
Last query:
2018-04-22
Last reply:
2018-04-23
Hachmann (marenhachmann) said : #1

There's the 'Pattern along Path' Path effect you can use for this:

Make (Extensions > Render > Function plotter... ) or import your sine curve (just the pattern, one up and one down curve).

Copy the curve to your clipboard.

Draw your line.

Path -> Path effects -> + -> Pattern along path: from clipboard, repeat (or repeat-stretch), if looks wrong: pattern is vertical.

Add a triangle at the end.

Hachmann (marenhachmann) said : #2

You can then copy the two objects, and use the node tool to modify the length and shape of the arrow.

David Maa (dava895) said : #3

Thanks for the answer, that's currently the workaround I am using to create this kind of shape. I was hoping for something easier and prettier. I'd love to be able to choose this kind of curve from the dash line menu.

But at least that does the job. It even work on curved stroke.

Btw I was using an extension to make the pattern along path. Thanks for the tip with path effect.

Hachmann (marenhachmann) said : #4

It couldn't be a dash choice, as those are dashes as defined by the SVG specification, and they cannot have any patterns like this (only parts of the stroke that are visible and parts that are not).

There exists an option to add a predefined pattern-along-path effect directly from the tool bar of the Bézier and the Pen tool, namely the 'Shape' option. However, right now, that option only allows for the 'single, stretched' version, not the 'repeated' version, which you would need in your case.

If you would like to make that a feature request (maybe copying an object which already has the desired pattern-along-path path effect with all the right settings could be used for this?) (after trying it out in the current form a bit first , perhaps), hop over to the bug section:

https://bugs.launchpad.net/inkscape

Personally, I think this sounds like a feature that would be good to have in Inkscape.

Can you help with this problem?

Provide an answer of your own, or ask David Maa for more information if necessary.

To post a message you must log in.