Inkscape.org
Beyond the Basics Is there a way to add evenly spaced makers to a curved line?
  1. #1
    PeterCornelissen PeterCornelissen @PeterCornelissen

    I want to add a marker evenly spaced in a lines which are almost always curved as in the attached (done in QGIS). I've tried add nodes etc. to space nodes evenly, but unless the line is straight, it does not seem to work.

    Or is there a better way to create this sort of effect?

    Thanks, Peter

    Cuts
  2. #2
    Polygon Polygon @Polygon🌶

    Check out extension "Distribute along Path".

  3. #3
    Lazur Lazur @Lazur

    Would try stacking path effects. A repeating pattern can be a good start, except it bends.

    It'd add in more markers when a node is generated at the core path's nodes, not just on nodes related to the pattern.

    Maybe a simplify path lpe could make it more linear and remove those "extra nodes"?

    Needs some experimentation. Rather complicated just for the sake of making it live and using markers.

  4. #4
    Paddy_CAD Paddy_CAD @Paddy_CAD

    I suggest [Extensions > Generate from Path > Pattern along Path...]

  5. #5
    Paddy_CAD Paddy_CAD @Paddy_CAD
    *

    Addendum: Pattern results vary of course depending on the input paths. There's some distortion of the triangles to fit the curvature of the skeleton path.

  6. #6
    PeterCornelissen PeterCornelissen @PeterCornelissen

    Thanks everyone for your suggestions. I'll experiment later and feedback once I've found a suitable solution. I've got many dozens of these lines, all curved and as they are archaeologically determined, they can't deviate from that. It's a shame Inkscape doesn't have a QGIS type of style management.

  7. #7
    Paddy_CAD Paddy_CAD @Paddy_CAD
    *

    Unlike my previous static entry, this image is dynamic. You can change the contour and the triangles will follow, or you can redistribute the triangles along the contour. There are two path effects here: [Clone original] duplicates the contour, then [Pattern Along Path] applies the triangles. Use the node tool [n] to modify paths, not the select tool [s]. The cloned path is locked to make it easy to select the parent shape. Use the Layers and Objects dialog [shift+ctrl+l] to unlock it.

    Note that the vertical subpath is top-alighned with the triangle and is twice the height. This keeps the base of the triangle on the centreline of the skeleton path.

    Select all the template nodes then use [,] and [.] to shrink and grow the pattern.

  8. #8
    PeterCornelissen PeterCornelissen @PeterCornelissen

    Hi Paddy_CAD

    Hmmm. I got the first version working, but I'm not quite understanding your 'dynamic' sequence. I seem to end up with the line along the path and around the triangle.

    Apart from that, if I change values in the Pattern along Path dialog, it almost always corrupts my drawing and deletes all the layers apart from the last one in the list!!

    Peter

  9. #9
    Paddy_CAD Paddy_CAD @Paddy_CAD

    That's surprising. I can manipulate the pattern and the contour. See the attachment.

  10. #10
    PeterCornelissen PeterCornelissen @PeterCornelissen
    *

    Hi Paddy_CAD

    That's great and exactly what I was looking for, but I think it is the process to get there I'm getting wrong. I'm not sure what to group, what to select when I use Pattern Along Path etc. Is there a tutorial anywhere that would help?

    BTW, I'm using Inkscape 1.3

    Peter

  11. #11
    Paddy_CAD Paddy_CAD @Paddy_CAD

    I didn't ghost you, I actually forgot you - if that's any comfort.

    Here's my workflow. I hope it makes sense.

    Draw the contour.  Draw an arbitrary path then [Path  > Path Effects...] [Clone original] and link to the contour. Duplicate.

    Draw the triangle. Select the duplicated clone. Apply [Path  > Path Effects...] [Pattern Along Path] and link to the triangle. Format the pattern with [Stroke: None].

    Align the pattern-clone over the clone. Use the Node tool to edit the parent contour and parent triangle.

     

  12. #12
    PeterCornelissen PeterCornelissen @PeterCornelissen

    Hi Paddy_CAD

    Thanks and no problem :-)

    I'm not quite there but understand the process a little more now, I just need to play about a bit more.

    Regards, Peter

Inkscape Inkscape.org Inkscape Forum Beyond the Basics Is there a way to add evenly spaced makers to a curved line?