Path to stroke?

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

Path to stroke?

Postby Antionius » Sat Jan 10, 2009 9:26 pm

Has a stroke always one beginning and one end? T-shaped strokes are not possible?

It is possible to convert stroke into path. Is the reversion possible as well:
How to convert path to stroke?

Application: I vectorized a drawing. The painter used a pencil, the thickness of lines varies. But I only need lines without the shape.

Thanks for help!

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

Re: Path to stroke?

Postby brynn » Sat Jan 10, 2009 11:00 pm

Has a stroke always one beginning and one end? T-shaped strokes are not possible?

Correct.
It is possible to convert stroke into path.

Path menu > Stroke to Path
Is the reversion possible as well:
How to convert path to stroke?

Um, I probably can't explain it properly. But you can apply a Stroke to a Path (using the Fill and Stroke dialog, Object menu). But it always remains a path, even though it has a stroke.
Application: I vectorized a drawing. The painter used a pencil, the thickness of lines varies. But I only need lines without the shape.

If you don't need the shape, which I suspect you mean Object, then you will be dealing strictly with Paths, and specifically stroked paths. So if I understand what you're saying, you shouldn't need Stroke to Path because you already have paths. But you may use the Fill and Stroke dialog to change the thickness of the strokes.

I hope I've answered your questions. If anything is confusing, no worries, other more knowledgeable members will clear it up :mrgreen:

All best :D

Antonius

Re: Path to stroke?

Postby Antonius » Sat Jan 10, 2009 11:27 pm

Thanks for reply. So the answer is no, conversion of "path to stroke" is not possible, right?

Let me put the question in different way:

Given a bent line which was converted to path. Now I want to change curvature of the line. But the path has two borders, each of them has to be changed accordingly.

Question: is it possible to reduce the two borders of a path into a single line (called "stroke")?

In pixel graphics you would call it "skeletonize".

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

Re: Path to stroke?

Postby prkos » Sun Jan 11, 2009 12:17 am

You can't do reverse, meaning path to stroke, you can only draw a new object that follows the curvature.

But if you have the object you got from a stroke of another object you can change the curvature using the Tweak tool :tool_tweak: using the Push option, so you won't have to edit both "borders" separately.
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

Antonius

Re: Path to stroke?

Postby Antonius » Sun Jan 11, 2009 12:38 am

Thanks. Unfortunately it does not help. The tool does not know that both borders should be kept parallel. Let me put the question in a different context:

Imagine you draw a map, with streets. All streets are path objects. Now you want to change the curvature of a street. How would you do it without changing width of the street?

Simarilius
Posts: 626
Joined: Wed Jun 06, 2007 2:37 am

Re: Path to stroke?

Postby Simarilius » Sun Jan 11, 2009 12:51 am

Just use a path on the centerline with the stroke turned on and set to the width you want. No need to stroke to path it.

Antonius

Re: Path to stroke?

Postby Antonius » Sun Jan 11, 2009 1:05 am

... but I just learned that strokes only have ONE beginning and ONE end. Streets have a lot of them. And I have no idea how to create a centerline automatically.

Simarilius
Posts: 626
Joined: Wed Jun 06, 2007 2:37 am

Re: Path to stroke?

Postby Simarilius » Sun Jan 11, 2009 2:59 am

I'd just use more than one path to create the image of the streets....
As for creating a centerline, just draw it with the path tool, turn on the stroke, turn off the fill. (in the fill/stroke dialog (ctrl+Shift+F))

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

Re: Path to stroke?

Postby brynn » Mon Jan 12, 2009 7:51 am

I think I understand what you're asking Antonius.
I like to make knots with Inkscape, like Celtic Knots (like my avatar). So I want the "rope" to be the same width at every point. But when I need to change the curvature of the "rope", it's very tricky trying to maintain the exact same width of rope. The only way I've found to do this effectively is "freehand". By "freehand", I mean I edit nodes and beziers by hand, and just "eyeball it" to keep the width looking constant.

:idea: You know, there is one thing that might work, that sometimes works for me, IF you're reproducing an existing drawing. And that is to put the drawing itself on a layer below the one you're drawing on. Reduce the opacity by 80% or more (or whatever is comfortable for you). Then you can use the Snap to Path feature, and snap your drawing path to the original stroke. You still have to edit the bezier handles, but it's easier when you have the strokes to help line up your path. (Note that you need to enable snapping to snap the nodes. But to edit the bezier handles, I find it's easier to disable snapping.) (Unless you're working with the current development version -- you can use the Shift key to disable snapping while you edit the beziers -- in the last stable version .46, the Shift key doesn't disable snapping of bezier handles, but in the dev version, it does.) When you're finished, then you can just remove the original.

Or if you don't have an original to use, sometimes I've created circles of an appropriate size to simumlate my curve. Then do the same thing -- make the circle translucent on a layer below, enable the Snap to Path feature, and snap my path to the circle's stroke. The only problem with this is complex curves where you might need several different sized circles.

Maybe other folks might have their own tricks to accomplish this?

I hope some of this info is helpful :)

karpalino

Re: Path to stroke?

Postby karpalino » Wed Jan 28, 2009 10:02 pm

Did you see this:

http://math.univ-lille1.fr/~barraud/Ink ... athdeform/

It's a nice way to create different look to paths

User avatar
EarlyBlake
Posts: 302
Joined: Tue Jun 03, 2008 5:42 pm

Re: Path to stroke?

Postby EarlyBlake » Sat Jan 31, 2009 6:13 pm

Antonius wrote:Thanks for reply. So the answer is no, conversion of "path to stroke" is not possible, right?

Let me put the question in different way:

Given a bent line which was converted to path. Now I want to change curvature of the line. But the path has two borders, each of them has to be changed accordingly.

Question: is it possible to reduce the two borders of a path into a single line (called "stroke")?

In pixel graphics you would call it "skeletonize".


If you are never going to use fill on a path, after you have drawn the T shape you could do a combine from the path menu. You can change the stroke attribute on all of the original paths at once. And it more convenient to manipulate the individual segments of the paths. It will keep the distance between the nodes as you move the path around. It has some unfortunate effects when you tun on the fill attribute though.

You might also want to look at this thread: viewtopic.php?f=5&t=1927


Return to “Help with using Inkscape”