Take the 2-minute tour ×
Graphic Design Stack Exchange is a question and answer site for Graphic Design professionals, students, and enthusiasts. It's 100% free, no registration required.

Of course I've seen Create and Edit Parallel Paths in Inkscape - Graphic Design Stack Exchange, but the "Stroke to Path" answer there doesn't cut it for me - because I want to draw "parallel lines" as "bus connections" in technical diagrams, like this poor fellow:

Inkscape-User - Parallel lines brush?

I would like to have a sort of "hatched" parallel line brush (useful for representing busses in diagrams). This is what I could get to: * Draw three parallel lines [...]

Can you show a sample image of what you want? Your description is somewhat confusing.

Well, here is an image then (using inkscape 0.48.1 on Ubuntu):

inkscape14

I basically want a single path (stroke), which is "styled" with parallel lines (strokes), and which still allows for editing through the nodes; as it can be seen on the image, I'm almost there - except the "styling" lines are not parallel, as there is a distortion (widening towards the ends of the master path). This distortion is a known issue, apparently:

InkscapeForum.com • View topic - Non-destructive Pattern Along Path ?

Both Pattern Along Path, and its LPE version, skew the objects/paths after aligning them to each node. While this is desirable in maintaining continuity when applying a single shape to a curve, it results in distorting repeated objects at corners.

OK, here is a step by step of what I've tried so far (for full size of the images, copy their imgur link, open it in another tab, and then remove the last m from the filename, so e.g. wHTbjm.png becomes wHTbj.png):

  1. Draw a simple line with pen tool - a horizontal path:
    inkscape00

  2. Copy this line three times - that is my "parallel" pattern:
    inkscape01

  3. Select all three lines, and choose Path / Combine:
    inkscape02

  4. Now all three lines are considered as a single path with 6 nodes:
    inkscape03

  5. Start drawing a "master" line with the Pen tool:
    inkscape04

  6. The final "master" line, that I want to make a "parallel bus", is now made of three segments with right angle corners:
    inkscape05

  7. Select the "parallel pattern" path, and then Object / Raise to Top:
    inkscape06

  8. Then choose Extensions / Generate from path / Pattern along Path:
    inkscape07

  9. Having set up the resulting window as shown below, I simply cannot get anything resembling the parallel line styling of the master line I had in mind:
    inkscape08

  10. So, dropping that approach - and trying the other Pattern along Path; for this, we need to copy the "parallel pattern" first:
    inkscape09

  11. Then choose Path / Path effect editor:
    inkscape10

  12. Then from the Path effect editor window, choose Pattern along path from the Apply new effect dropdown, and click Add:
    inkscape11

  13. Once the effect is added, click on Link to path button in the Pattern source row (the link refers to the object currently in clipboard, which is the parallel pattern that we copied previously)
    inkscape12

  14. There we go - almost parallel lines styling of the master line, if there wasn't for the distortion towards the ends:
    inkscape13

  15. At least the nodes of the master line are still editable, and the effect follows:
    inkscape14

Actually, since here the "parallel pattern" path is linked - you can edit that one too (with the pen tool), and the master line style will update accordingly; and I tried turning the parallel pattern lines into curves (so as to compensate for the distortion manually) - needless to say, that works very poorly...

Well - anyone know how to get proper parallel "bus" lines in Inkscape?

share|improve this question

1 Answer 1

OK, here's one way (a bit tedious though) - thanks to Bug #493318 “Clone behavior is broken with style inheritance” : Bugs : Inkscape:

  • Using pen tool, draw an outline of the "master" line
  • Select the master line, Alt-D to "clone" it
  • Select the cloned line, set a different stroke color - you will notice it has no effect at that time
  • Select the master line again, open the Fill & Stroke menu (Shift+Ctrl+F); on the Stroke paint tab, choose ? to unset the stroke (NB: this is different from the x option, which means "set - but no paint")
  • You should instantly see the cloned line get the stroke color you set previously
  • You can now Ctrl-D (Duplicate) the cloned line (don't clone the cloned line :))
  • Make one of the clones' stroke 8 px wide and black; and the other 4 px wide and white
  • Select all (the master and the clone lines) - choose Align, and align vertically and horizontally, so all lines have the same positions
  • From the XML editor (Shift+Ctrl+X - as there is no other "object list" in Inkscape), select the master line - and then Object / Raise to top
  • Select all (the master and the clone lines) again - and group them

So right now:

  • the master line is invisible, and on top - and it has nodes to edit
  • the clones lie below the master line, are visible - but do not have nodes to edit

Thus, if you select the pen tool, you can actually manipulate/edit the nodes of the master line - and since there are no nodes on the clones (and they must follow the nodes of the master), there is the effect of editable "parallel style" line:

enter image description here

Unfortunately, it's a bit difficult to select the master line (given it's in a group), so one must use the XML editor to select it, before one can edit the nodes with the pen tool (easy enough for a simple example - but I can imagine, a bit tedious in a big document)...

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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