Adding one-sided markers

Post questions on how to use or achieve an effect in Inkscape.
VictorB
Posts: 2
Joined: Sat Jun 17, 2017 4:15 pm

Adding one-sided markers

Postby VictorB » Sat Jun 17, 2017 5:28 pm

Hey everyone, thank you for your attention regarding my problem. In brief, I would like to know how I can add markers along a stroke line without having them stretch on both sides of the path? Or another method that will help me achieve my goal in a short amount of time.


I have been faced with many projects where I would have found this function very useful, such as drawing right angle triangles along the outside edge of a small shape where adding the other half of the arrowhead would just confuse the drawing.

In my current project, due the 24rth, I am faced with recreating an illustration that has a lot of ropes in it. The project is to mimic a famous art style and the artist's method to draw rope is as follows:

_________________________________
LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL

The easiest way I can see to create the basic shape is to use the bezier tool :tool_node: to create the basic shape of the rope, thicken the stroke and use [ Path -> Stroke to Path ] to end up with a flexible shape that stays equal in thickness along the whole line.


______________________________________
______________________________________


Next, I would duplicate the shape and remove the top half of the path using :tool_node: and removing the undesired segments leaving me with a path that I can use a small rectangle and [ Extension -> Generate from Path -> Pattern Along Path ] to end up with my desired result.

The problem with using this method is that, with a lot of pieces of rope to look at, this process is still quite time consuming. Even if I were to clip the markers into the rope's object, I'm still left with the same amount of work.

However, I realized that if I could simply use markers without it centering to my stroke line, then I would be able to do this to all of the ropes at once. This same application could go for uncentered markers that you'd like to add to a stoke, such as an uneven curve to make a braided feature, or chain links.


Does anyone know how to use markers in this way? Or a faster way to achieve the same result?

Polygon
Posts: 393
Joined: Thu Dec 19, 2013 3:27 am

Re: Adding one-sided markers

Postby Polygon » Sat Jun 17, 2017 8:00 pm

Not sure what you expect "visually" from the end-result - but maybe consider to use Glyph-on-path:
GlyphOnPath.png
GlyphOnPath.png (80.2 KiB) Viewed 2634 times


Cheers
P.

tylerdurden
Posts: 2344
Joined: Sun Apr 14, 2013 12:04 pm
Location: Michigan, USA

Re: Adding one-sided markers

Postby tylerdurden » Sat Jun 17, 2017 10:45 pm

Maybe this...?
A custom Marker can be created by selecting the object or objects that you wish to use as a Marker and then using the Object → Object to Marker command. The selected objects will disappear and a new entry will appear in the Marker pull-down menus of the Fill and Stroke dialog. The Marker is created assuming a horizontal orientation for the path. The point of attachment to a node is the center of the bounding box for the Marker. Warning: While the marker will display fine in Inkscape, only a fourth of it will be displayed in most other SVG renderers. Adding the attribute style="overflow:visible" to the Marker definition will fix the problem (Bug).

http://tavmjong.free.fr/INKSCAPE/MANUAL ... ke-Markers

I'd create a marker that had the "L" shape mirrored top/bottom and grouped, with the bottom L having no stroke/fill. That group converted to marker will center on the line with only the top portion visible.
Image
Have a nice day.

I'm using Inkscape 0.92.2 (5c3e80d, 2017-08-06), 64 bit win8.1

The Inkscape manual has lots of helpful info! http://tavmjong.free.fr/INKSCAPE/MANUAL/html/

Moini
Posts: 3381
Joined: Mon Oct 05, 2015 10:44 am

Re: Adding one-sided markers

Postby Moini » Sun Jun 18, 2017 6:02 am

I'd probably use pattern along path, with an offset.
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!

Inkscape FAQ - Learning Resources - Website with tutorials (German and English)

Polygon
Posts: 393
Joined: Thu Dec 19, 2013 3:27 am

Re: Adding one-sided markers

Postby Polygon » Mon Jun 19, 2017 2:51 am

Or get the pattern right at the beginning:
PaternAlongPath.png
PaternAlongPath.png (29.51 KiB) Viewed 2523 times

:mrgreen:

Cheers
P.

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

Re: Adding one-sided markers

Postby brynn » Mon Jun 19, 2017 11:08 am

If you want the pattern to be distorted around tight curves - or even gentle curves, depending on the pattern, I would suggest Pattern Along Path. (Besides PAP extension, be sure to try PAP LPE (Path menu > Path Effects) which is a way to use PAP in a "live" way.) However, if you don't want any distortion, you would want to use Extensions menu > Generate from path > Scatter.

I didn't quite understand your questions, so it's hard to answer them. But by now you've received answers regarding all the possible techniques that I know of.

I would only add that to use Markers as tylerdurden showed in the animation, you need to add extra nodes on the path. A marker is placed at each node. It's easy to add more nodes quickly.

Draw a path with 2 nodes.
Click the segment with the Node tool, to select both nodes.
Click Add Nodes button (first on the left on the control bar).
You'll see the nodes being added as you click, so you can stop when you have the right amount.

There is Extensions menu > Modify Path > Add Nodes, which offers a couple more ways of adding new nodes. Each way has its pros and cons. Your choice.

There's an old, but nice mini tutorial on drawing a realistic rope or braid pattern (using pap extn), in a thread on this forum. Searching "rope" should find it. I guess you can't get search results by date in this forum, but it's going to be 4 or more years ago, I'd estimate.

Edit
For the time consuming part -- for all the little pieces of rope that you need, are they supposed to be different patterns? If so, I don't know of any shortcut. But if they can be the same pattern, using the pap lpe, it would be easy to copy the pattern, and paste it into each path (that's the live part).
Last edited by brynn on Mon Jun 19, 2017 11:11 am, edited 1 time in total.
Reason: add another thought

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

Re: Adding one-sided markers

Postby brynn » Mon Jun 19, 2017 11:26 am

(Nice, Polygon! I wasn't aware of Glyphs on Path. Good to know :D )

theozh
Posts: 437
Joined: Fri Mar 23, 2012 6:30 pm

Re: Adding one-sided markers

Postby theozh » Mon Jun 19, 2017 7:47 pm

my first thought would also be the LPE "Pattern along path"...

Have you checked this link?
https://inkscapetutorials.org/2014/10/2 ... any-shape/
Anything wrong/inconvenient with this method...?
Win7/64, Inkscape 0.92.2

theozh
Posts: 437
Joined: Fri Mar 23, 2012 6:30 pm

Re: Adding one-sided markers

Postby theozh » Mon Jun 19, 2017 10:42 pm

...just another idea... using LPE Ruler...

RulerRope.png
RulerRope.png (34.22 KiB) Viewed 2437 times
Win7/64, Inkscape 0.92.2

VictorB
Posts: 2
Joined: Sat Jun 17, 2017 4:15 pm

Re: Adding one-sided markers

Postby VictorB » Wed Jun 21, 2017 5:19 pm

Thank you everyone.

The reason I did not want to use pattern or objects along path is because of the distortion that curves tend to create. The nice things about the markers, from my experience, is that they are unaltered by curves. Because of that, mostly, I wanted to create a custom marker set.

A special thanks to Tylerdruden for his animation. It was the solution I was hoping for, which will allow me to use this trick for future projects.

To Bryn, I will definitely look for that tutorial, and am happy it's here, however, the artist I am modeling after has drawn his rope in a way that I needed to find an alternate method.



I will post the end results on this thread once I am done. Thanks again to everyone.

theozh
Posts: 437
Joined: Fri Mar 23, 2012 6:30 pm

Re: Adding one-sided markers

Postby theozh » Wed Jun 21, 2017 7:18 pm

VictorB wrote:The nice things about the markers, from my experience, is that they are unaltered by curves.

Just be aware, that the marker size is not independent of the stroke width (correct me if I am wrong). If you increase the stroke width of your curve the markers might grow faster than you want...
Win7/64, Inkscape 0.92.2

Moini
Posts: 3381
Joined: Mon Oct 05, 2015 10:44 am

Re: Adding one-sided markers

Postby Moini » Fri Jun 23, 2017 5:59 am

The Scatter extension brynn mentioned doesn't deform, so perhaps that is still an option.
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!

Inkscape FAQ - Learning Resources - Website with tutorials (German and English)


Return to “Help with using Inkscape”