stroke to path with crossing lines - can't get it to do what I want

Post questions on how to use or achieve an effect in Inkscape.
glasslady
Posts: 78
Joined: Wed Jun 26, 2013 12:34 am

stroke to path with crossing lines - can't get it to do what I want

Postby glasslady » Sun Sep 17, 2017 12:10 pm

I created an image made of strokes with parallel and perpendicular lines that cross at several points (1st)
I did "convert to path", adjusting width of the stroke to define the width of the newly created paths. I wound up with an outline of all edges (2), but I wanted to create "weaving" (overlapping) bands (3rd)

1st - overlapping lines - image made up of lines/strokes
2nd - converted stroke to path
3rd - weaving

Is there a way to tell inkscape to convert #1 lines to weave like #3?
Ideally, I'd like the new shapes to meet along their edges so they can be filled with color, leaving white space only where selected.

Inkscape 0.92
Windows 10
Attachments
weaving.svg
(6.23 KiB) Downloaded 182 times
converted stroke to path.svg
(3.49 KiB) Downloaded 222 times
overlapping lines.svg
(2.04 KiB) Downloaded 164 times

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

Re: stroke to path with crossing lines - can't get it to do what I want

Postby Polygon » Sun Sep 17, 2017 4:55 pm

There´s a LPE called "knots" what might get what you want:
LPE Knots.jpeg
LPE Knots.jpeg (59.46 KiB) Viewed 1933 times


Cheers
P.

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

Re: stroke to path with crossing lines - can't get it to do what I want

Postby brynn » Mon Sep 18, 2017 5:30 am

Here's my old avatar file, to show how the over/under needs to be handled. Ungroup and "take it apart", to see. Also it has a white fill and blue stroke. So you could change the fill color, to make it easier to understand.

If I understand what you're doing, you would not use the blue border.

I've found the Knot LPE hard to use. I think it requires a closed path. (I made that long before LPEs were even invented :D)
Attachments
celtknot45.svg
(6.2 KiB) Downloaded 172 times

glasslady
Posts: 78
Joined: Wed Jun 26, 2013 12:34 am

Re: stroke to path with crossing lines - can't get it to do what I want

Postby glasslady » Mon Sep 18, 2017 7:59 am

Brynn - That is just what I want to do. And yes, I would have a thin stroke outlining the forms. Your celtknot - is this how Knot transforms, leaving all segments separate?

What is LPE? How is it used?

What does closed path mean?

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

Re: stroke to path with crossing lines - can't get it to do what I want

Postby brynn » Mon Sep 18, 2017 8:29 am

Oh, sorry for not explaining.

LPE is Live Path Effects. Path menu > Path Effects. There must be 15 or 20 of them by now. Some of them do very simple things and some of them do very complex things, but there's a live aspect to all of them. So that after you apply the effect, you can adjust it from the dialog and see the change happening live. And most of them also have controls on the canvas, so you can drag things around and watch the change happen live.

A closed path means there are no open ends. Like if you were simulating a woven fabric or maybe like a braid, you'd have open ends probably. But for knots, I think you have to start with a path which does not have any open ends. I have not had very good luck with it. But Polygon seems to make it work.

With the Knot LPE, you can adjust whether you want no space where the threads or strings cross over, or you can have a lot of space. It's completely adjustable, automatically. But depending on what else you're going to do with it, you might need to convert it to a regular path, in the end. (That would be with Path menu > Object to Path).

Oh hey! I just got it to work for the first time! Must be the new version of Inkscape. SVG file attached, if you want to look at it. PNG for convenience.

With the Knot LPE, the path remains as a single object. And you can see from the attached PNG, that the gaps in the path don't necessarily adapt to the angle of the line where it crosses over. I'm not sure if there's a way to make it look more realistic.

Also, if you wanted them to be in pieces, you would do

Path menu > Object to Path
and then
Path menu > Break Apart
Attachments
knot1.svg
(4.77 KiB) Downloaded 167 times
k1.png
k1.png (22.6 KiB) Viewed 1874 times

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

Re: stroke to path with crossing lines - can't get it to do what I want

Postby Polygon » Mon Sep 18, 2017 6:46 pm

brynn wrote:I've found the Knot LPE hard to use. I think it requires a closed path. (I made that long before LPEs were even invented :D)

Can´t confirm - works for me right out of the box - even with open paths:
CelticKnots.png
CelticKnots.png (74.74 KiB) Viewed 1833 times

Diagonally drawn or curved lines are of course not covered by the tool - but are not tackled easily manually either.

Cheers
P.

Lazur
Posts: 4717
Joined: Tue Jun 14, 2016 10:38 am

Re: stroke to path with crossing lines - can't get it to do what I want

Postby Lazur » Mon Sep 18, 2017 7:59 pm

Rendering knots/z-order loops is always tricky. Personally I never used the knot lpe for that. Depending on your final output making separate "weaves" may need a different structure.

Like, will there be a stroke and a fill in the output, are there going to be cast shadows etc.
The knot pattern attached above would produce rendering gaps if it didn't have strokes.

Check out this image for an example:

Image

svg source

This one can be adjusted to have different stroke widths, doesn't produce any rendering gaps even if the black outlines are removed.

Lazur
Posts: 4717
Joined: Tue Jun 14, 2016 10:38 am

Re: stroke to path with crossing lines - can't get it to do what I want

Postby Lazur » Mon Sep 18, 2017 8:32 pm

OK, here is one with the mentioned overlapping structure -each part was drawn with strokes and no fill, so the width can be adjusted later on.

overlapping lines.svg
(5.36 KiB) Downloaded 194 times


Return to “Help with using Inkscape”